Procedure

TfrmTemplateEditor.tvTreeDragOver

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public/Published

Owner

TfrmTemplateEditor

Declaration

procedure tvTreeDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);

Calls Hierarchy


TfrmTemplateEditor.tvTreeDragOver
 └TfrmTemplateEditor.AllowMove
   ├TfrmTemplateEditor.IsTemplateLocked
   │ ├TTemplate.AutoLock
   │ │ └TTemplate.LinkType
   │ ├TTemplate.IsLocked
   │ │ └TTemplate.AutoLock...
   │ └..(rec)..
   └TTemplate.GetItems
     └ExpandTemplate
       ├TTemplate.GetChildren
       ├GetTemplateChildren
       ├AddTemplate
       │ ├TTemplate.Create
       │ │ └TTemplate.ReminderDialogIEN
       │ └TTemplate.AddChild
       │   └TTemplate.GetItems...
       └TTemplate.ItemIENs
         └TTemplate.GetItems...

Calls

Name Declaration Comments
TfrmTemplateEditor.AllowMove function AllowMove(ADropNode, ADragNode: TTreeNode): boolean; -


Source

1894  procedure TfrmTemplateEditor.tvTreeDragOver(Sender, Source: TObject; X,
1895    Y: Integer; State: TDragState; var Accept: Boolean);
1896  var
1897    TmpNode: TTreeNode;
1898    Tree: TTreeView;
1899  
1900  begin
1901    FDropNode := nil;
1902    Accept := FALSE;
1903    if (Source is TTreeView) and (assigned(FDragNode)) then
1904    begin
1905      Tree := TTreeView(Sender);
1906      FDropNode := Tree.GetNodeAt(X, Y);
1907      if (((Tree = tvShared) and (FCanEditShared)) or
1908        ((Tree = tvPersonal) and (FCanEditPersonal))) then
1909      begin
1910        if (assigned(FDropNode)) then
1911        begin
1912          FDropInto := (TTemplate(FDropNode.Data).RealType in AllTemplateFolderTypes);
1913          if (FDropInto) then
1914            TmpNode := FDropNode
1915          else
1916            TmpNode := FDropNode.Parent;
1917          Accept := AllowMove(TmpNode, FDragNode);
1918        end;
1919      end;
1920    end;
1921  end;