Procedure

TfrmTemplateEditor.InitTrees

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

procedure InitTrees;

Calls Hierarchy


TfrmTemplateEditor.InitTrees
 ├LoadTemplateData
 │ ├GetTemplateRoots
 │ └AddTemplate
 │   ├TTemplate.Create
 │   │ └TTemplate.ReminderDialogIEN
 │   └TTemplate.AddChild
 │     └TTemplate.GetItems
 │       └ExpandTemplate
 │         ├TTemplate.GetChildren
 │         ├GetTemplateChildren
 │         ├AddTemplate...
 │         └TTemplate.ItemIENs
 │           └TTemplate.GetItems...
 ├SaveTemplate
 │ ├TTemplate.Changed
 │ │ ├TTemplate.ValidID
 │ │ └TTemplate.ItemIENs...
 │ ├TTemplate.Unlock
 │ │ ├TTemplate.ValidID
 │ │ └UnlockTemplate
 │ ├TTemplate.GetBoilerplate
 │ │ └GetTemplateBoilerplate
 │ ├TTemplate.ReminderDialogIEN
 │ ├TTemplate.GetDescription
 │ │ └LoadTemplateDescription
 │ ├UpdateTemplate
 │ │ └UpdateTIURec
 │ ├DisplayErrors
 │ └TTemplate.ClearBackup
 │   └TTemplate.ItemIENs...
 ├AddTemplate...
 ├TdmodShared.AddTemplateNode
 │ ├AddChildObject
 │ │ └TTemplate.AddNode
 │ └TTemplate.GetChildren
 ├UserTemplateAccessLevel
 │ ├GetTemplateRoots
 │ └GetTemplateAccess
 └CanEditLinkType
   └CanEditType
     └IsUserTemplateEditor

Called-By Hierarchy


          TfrmTemplateEditor.InitTrees
       TfrmTemplateEditor.FormCreate┤ 
      TfrmTemplateEditor.RefreshData┘ 
TfrmTemplateEditor.mnuRefreshClick┘   

Calls

Name Declaration Comments
AddTemplate function AddTemplate(DataString: string; Owner: TTemplate = nil): TTemplate; -
TdmodShared.AddTemplateNode procedure AddTemplateNode(Tree: TTreeView; var EmptyCount: integer; const tmpl: TTemplate; AllowInactive: boolean = FALSE; const Owner: TTreeNode = nil); -
CanEditLinkType function CanEditLinkType(LinkType: TTemplateLinkTypes): boolean; -
LoadTemplateData procedure LoadTemplateData; -
SaveTemplate procedure SaveTemplate(Template: TTemplate; Idx: integer; ErrorList: TStrings = nil); -
UserTemplateAccessLevel function UserTemplateAccessLevel: TTemplateAccess; -

Called-By

Name Declaration Comments
TfrmTemplateEditor.FormCreate procedure FormCreate(Sender: TObject); -
TfrmTemplateEditor.RefreshData procedure RefreshData; -


Source

4038  procedure TfrmTemplateEditor.InitTrees;
4039  begin
4040    LoadTemplateData;
4041    if (not assigned(RootTemplate)) then
4042      SaveTemplate(AddTemplate('0^R^A^Shared Templates'), -1);
4043    if (not assigned(MyTemplate)) then
4044      AddTemplate('0^P^A^My Templates^^^' + IntToStr(User.DUZ));
4045    dmodShared.AddTemplateNode(tvPersonal, FPersonalEmptyNodeCount, MyTemplate);
4046    dmodShared.AddTemplateNode(tvShared, FSharedEmptyNodeCount, RootTemplate);
4047    if (UserTemplateAccessLevel = taEditor) then
4048    begin
4049      if CanEditLinkType(ttTitles) then
4050        dmodShared.AddTemplateNode(tvShared, FSharedEmptyNodeCount, TitlesTemplate);
4051      if CanEditLinkType(ttConsults) then
4052        dmodShared.AddTemplateNode(tvShared, FSharedEmptyNodeCount, ConsultsTemplate);
4053      if CanEditLinkType(ttProcedures) then
4054        dmodShared.AddTemplateNode(tvShared, FSharedEmptyNodeCount, ProceduresTemplate);
4055    end;
4056  end;