Function

TdmodShared.ExpandNode

Module

dShared

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public

Owner

TdmodShared

Declaration

function ExpandNode(Tree: TTreeView; Node: TTreeNode;
          var EmptyCount: integer; AllowInactive: boolean = FALSE): boolean;

Calls Hierarchy


TdmodShared.ExpandNode
 ├ExpandTemplate
 │ ├TTemplate.GetChildren
 │ ├GetTemplateChildren
 │ ├AddTemplate
 │ │ ├TTemplate.Create
 │ │ │ └TTemplate.ReminderDialogIEN
 │ │ └TTemplate.AddChild
 │ │   └TTemplate.GetItems
 │ │     └ExpandTemplate...
 │ └TTemplate.ItemIENs
 │   └TTemplate.GetItems...
 ├TTemplate.GetItems...
 ├TdmodShared.AddTemplateNode
 │ ├AddChildObject
 │ │ └TTemplate.AddNode
 │ └TTemplate.GetChildren
 └TTemplate.GetChildren

Called-By Hierarchy


                        TdmodShared.ExpandNode
                      TdmodShared.SelectNode┤ 
                    TfrmDrawers.OpenToNode┘ │ 
             TfrmDrawers.ReloadTemplates┤   │ 
          TfrmDrawers.sbTemplatesClick┤ │   │ 
   TfrmDrawers.ExternalReloadTemplates┘ │   │ 
                  TdmodShared.Reload┘   │   │ 
    TfrmTemplateEditor.FormDestroy┘     │   │ 
         TfrmDrawers.mnuGotoDefaultClick┘   │ 
                      TdmodShared.ExpandTree┤ 
                             EditTemplates┘ │ 
     TfrmDCSumm.popSummMemoTemplateClick┤   │ 
          TfrmDCSumm.mnuNewTemplateClick┤   │ 
        TfrmDCSumm.mnuEditTemplatesClick┤   │ 
  TfrmDCSumm.mnuEditSharedTemplatesClick┤   │ 
    TfrmDCSumm.mnuNewSharedTemplateClick┤   │ 
   TfrmConsults.popNoteMemoTemplateClick┤   │ 
      TfrmConsults.mnuEditTemplatesClick┤   │ 
        TfrmConsults.mnuNewTemplateClick┤   │ 
TfrmConsults.mnuEditSharedTemplatesClick┤   │ 
  TfrmConsults.mnuNewSharedTemplateClick┤   │ 
       TfrmDrawers.mnuEditTemplatesClick┤   │ 
         TfrmDrawers.mnuNewTemplateClick┤   │ 
    TfrmSurgery.popNoteMemoTemplateClick┤   │ 
       TfrmSurgery.mnuEditTemplatesClick┤   │ 
         TfrmSurgery.mnuNewTemplateClick┤   │ 
 TfrmSurgery.mnuEditSharedTemplatesClick┤   │ 
   TfrmSurgery.mnuNewSharedTemplateClick┤   │ 
      TfrmNotes.popNoteMemoTemplateClick┤   │ 
         TfrmNotes.mnuEditTemplatesClick┤   │ 
           TfrmNotes.mnuNewTemplateClick┤   │ 
   TfrmNotes.mnuEditSharedTemplatesClick┤   │ 
     TfrmNotes.mnuNewSharedTemplateClick┘   │ 
            TfrmDrawers.tvTemplatesExpanding┤ 
      TfrmTemplateEditor.tvPersonalExpanding┤ 
        TfrmTemplateEditor.tvSharedExpanding┘ 

Calls

Name Declaration Comments
TdmodShared.AddTemplateNode procedure AddTemplateNode(Tree: TTreeView; var EmptyCount: integer; const tmpl: TTemplate; AllowInactive: boolean = FALSE; const Owner: TTreeNode = nil); -
ExpandTemplate procedure ExpandTemplate(tmpl: TTemplate); -
TTemplate.GetChildren function GetChildren: TTemplateChildren; -
TTemplate.GetItems function GetItems: TList; -

Called-By

Name Declaration Comments
TdmodShared.ExpandTree procedure ExpandTree(Tree: TORTreeView; ExpandString: string; var EmptyCount: integer; AllowInactive: boolean = FALSE); -
TdmodShared.SelectNode procedure SelectNode(Tree: TORTreeView; GotoNodeID: string; var EmptyCount: integer); -
TfrmTemplateEditor.tvPersonalExpanding procedure tvPersonalExpanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean); -
TfrmTemplateEditor.tvSharedExpanding procedure tvSharedExpanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean); -
TfrmDrawers.tvTemplatesExpanding procedure tvTemplatesExpanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean); -


Source

213   function TdmodShared.ExpandNode(Tree: TTreeView; Node: TTreeNode;
214                 var EmptyCount: integer; AllowInactive: boolean = FALSE): boolean;
215   
216   var
217     TmpNode: TTreeNode;
218     tmpl: TTemplate;
219     i :integer;
220   
221   begin
222     TmpNode := Node.GetFirstChild;
223     Result := TRUE;
224     if((assigned(TmpNode)) and (TmpNode.Text = EmptyNodeText)) then
225     begin
226       TmpNode.Delete;
227       dec(EmptyCount);
228       tmpl := TTemplate(Node.Data);
229       ExpandTemplate(tmpl);
230       for i := 0 to tmpl.Items.Count-1 do
231         AddTemplateNode(Tree, EmptyCount, TTemplate(tmpl.Items[i]),
232                         AllowInactive, Node);
233       if((tmpl.Children = tcNone) or ((not AllowInactive) and (tmpl.Children = tcInactive))) then
234         Result := FALSE;
235     end;
236   end;