Procedure

BuildNodes

Module

dShared

Last Modified

7/15/2014 3:26:36 PM

Scope

Local

Local subprogram to

Resync

Declaration

procedure BuildNodes(tmpl: TTemplate; Owner: TTreeNode);

Calls Hierarchy


BuildNodes
 ├TTemplate.AddNode
 ├TTemplate.GetItems
 │ └ExpandTemplate
 │   ├TTemplate.GetChildren
 │   ├GetTemplateChildren
 │   ├AddTemplate
 │   │ ├TTemplate.Create
 │   │ │ └TTemplate.ReminderDialogIEN
 │   │ └TTemplate.AddChild
 │   │   └TTemplate.GetItems...
 │   └TTemplate.ItemIENs
 │     └TTemplate.GetItems...
 ├..(rec)..
 └TTemplate.GetChildren

Called-By Hierarchy


                                        BuildNodes
                                       ..(rec)..┤ 
                              TdmodShared.Resync┘ 
              TfrmTemplateEditor.cbShHideClick┤   
            TfrmTemplateEditor.cbActiveClick┘ │   
             TfrmTemplateEditor.cbPerHideClick┤   
            TfrmTemplateEditor.cbActiveClick┘ │   
                     TfrmTemplateEditor.Resync┘   
              TfrmTemplateEditor.btnNewClick┤     
                             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┘ │ │     
        TfrmTemplateEditor.mnuAutoGenClick┤ │     
 TfrmTemplateEditor.mnuImportTemplateClick┘ │     
            TfrmTemplateEditor.sbMoveUpClick┤     
          TfrmTemplateEditor.sbMoveDownClick┤     
            TfrmTemplateEditor.sbDeleteClick┤     
     TfrmTemplateEditor.mnuNodeDeleteClick┤ │     
          TfrmTemplateEditor.tvTreeKeyDown┘ │     
           TfrmTemplateEditor.tvTreeDragDrop┤     
        TfrmTemplateEditor.sbCopyLeftClick┤ │     
       TfrmTemplateEditor.sbCopyRightClick┤ │     
      TfrmTemplateEditor.mnuNodePasteClick┘ │     
             TfrmTemplateEditor.mnuSortClick┤     
           TfrmTemplateEditor.TemplateLocked┘     
             TfrmTemplateEditor.FormCreate┘       

Calls

Name Declaration Comments
TTemplate.AddNode procedure AddNode(Node: Pointer); -
BuildNodes procedure BuildNodes(tmpl: TTemplate; Owner: TTreeNode); -
TTemplate.GetChildren function GetChildren: TTemplateChildren; -
TTemplate.GetItems function GetItems: TList; -

Called-By

Name Declaration Comments
BuildNodes procedure BuildNodes(tmpl: TTemplate; Owner: TTreeNode); -
TdmodShared.Resync procedure Resync(SyncNode: TTreeNode; AllowInactive: boolean; var EmptyCount: integer); -


Source

357   procedure BuildNodes(tmpl: TTemplate; Owner: TTreeNode);
358   var
359     i: integer;
360     TmpNode: TTreeNode;
361   
362   begin
363     if(tmpl.Active or AllowInactive) then
364     begin
365       if(First) then
366       begin
367         First := FALSE;
368         TmpNode := Owner;
369       end
370       else
371       begin
372         TmpNode := Tree.Items.AddChildObject(Owner, tmpl.PrintName, tmpl);
373         TORTreeNode(TmpNode).StringData := tmpl.ID + U + tmpl.PrintName;
374         TmpNode.Cut := not tmpl.Active;
375         tmpl.AddNode(TmpNode);
376       end;
377       if(tmpl.Expanded) then
378       begin
379         for i := 0 to tmpl.Items.Count-1 do
380           BuildNodes(TTemplate(tmpl.Items[i]), TmpNode);
381       end
382       else
383       if(InEditor or (not tmpl.HideItems)) and
384          ((tmpl.Children in [tcActive, tcBoth]) or
385          (AllowInactive and (tmpl.Children = tcInactive))) then
386       begin
387         Tree.Items.AddChild(TmpNode, EmptyNodeText);
388         inc(EmptyCount);
389       end;
390     end;
391   end;