Function

TfrmTemplateEditor.IsTemplateLocked

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

function IsTemplateLocked(Node: TTreeNode): boolean;

Calls Hierarchy


TfrmTemplateEditor.IsTemplateLocked
 ├TTemplate.AutoLock
 │ └TTemplate.LinkType
 ├TTemplate.IsLocked
 │ └TTemplate.AutoLock...
 └..(rec)..

Called-By Hierarchy


               TfrmTemplateEditor.IsTemplateLocked
                                       ..(rec)..┤ 
                 TfrmTemplateEditor.tvTreeChange┤ 
              TfrmTemplateEditor.cbActiveClick┤ │ 
                TfrmTemplateEditor.tvTreeEnter┤ │ 
              TfrmTemplateEditor.cbShHideClick┤ │ 
            TfrmTemplateEditor.cbActiveClick┘ │ │ 
             TfrmTemplateEditor.cbPerHideClick┤ │ 
            TfrmTemplateEditor.cbActiveClick┘ │ │ 
              TfrmTemplateEditor.sbDeleteClick┤ │ 
       TfrmTemplateEditor.mnuNodeDeleteClick┤ │ │ 
            TfrmTemplateEditor.tvTreeKeyDown┘ │ │ 
                     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.tvTreeDragDrop┤ │ │ 
        TfrmTemplateEditor.sbCopyLeftClick┤ │ │ │ 
       TfrmTemplateEditor.sbCopyRightClick┤ │ │ │ 
      TfrmTemplateEditor.mnuNodePasteClick┘ │ │ │ 
             TfrmTemplateEditor.mnuSortClick┤ │ │ 
           TfrmTemplateEditor.TemplateLocked┘ │ │ 
             TfrmTemplateEditor.FormCreate┘   │ │ 
              TfrmTemplateEditor.SharedEditing┤ │ 
               TfrmTemplateEditor.FormCreate┤ │ │ 
        TfrmTemplateEditor.cbEditSharedClick┘ │ │ 
              TfrmTemplateEditor.cbxTypeChange┘ │ 
                     TfrmTemplateEditor.ShowInfo┤ 
                              EditTemplates...┤ │ 
            TfrmTemplateEditor.tvTreeChange...┤ │ 
               TfrmTemplateEditor.reBoilChange┤ │ 
            TfrmTemplateEditor.mnuAutoGenClick┤ │ 
     TfrmTemplateEditor.mnuImportTemplateClick┘ │ 
                    TfrmTemplateEditor.AllowMove┘ 
          TfrmTemplateEditor.EnableNavControls┤   
           TfrmTemplateEditor.EnableControls┤ │   
        TfrmTemplateEditor.tvTreeChange...┘ │ │   
            TfrmTemplateEditor.cbActiveClick┤ │   
         TfrmTemplateEditor.cbShHideClick...┤ │   
        TfrmTemplateEditor.cbPerHideClick...┤ │   
                TfrmTemplateEditor.Resync...┘ │   
             TfrmTemplateEditor.tvTreeDragOver┤   
          TfrmTemplateEditor.tvTreeDragDrop...┤   
                    TfrmTemplateEditor.PasteOK┘   
        TfrmTemplateEditor.popTemplatesPopup┤     
        TfrmTemplateEditor.mnuNodePasteClick┤     
         TfrmTemplateEditor.mnuTemplateClick┘     

Calls

Name Declaration Comments
TTemplate.AutoLock function AutoLock: boolean; -
TTemplate.IsLocked function IsLocked: boolean; -
TfrmTemplateEditor.IsTemplateLocked function IsTemplateLocked(Node: TTreeNode): boolean; -

Called-By

Name Declaration Comments
TfrmTemplateEditor.AllowMove function AllowMove(ADropNode, ADragNode: TTreeNode): boolean; -
TfrmTemplateEditor.IsTemplateLocked function IsTemplateLocked(Node: TTreeNode): boolean; -
TfrmTemplateEditor.ShowInfo procedure ShowInfo(Node: TTreeNode); -
TfrmTemplateEditor.tvTreeChange procedure tvTreeChange(Sender: TObject; Node: TTreeNode); -


Source

817   function TfrmTemplateEditor.IsTemplateLocked(Node: TTreeNode): boolean;
818   var
819     Template: TTemplate;
820   
821   begin
822     Result := FALSE;
823     if assigned(Node) then
824     begin
825       Template := TTemplate(Node.Data);
826       if Template.AutoLock then
827         Result := TRUE
828       else
829         if (Template.PersonalOwner = 0) then
830         begin
831           if RootTemplate.IsLocked then
832             Result := TRUE
833           else
834           begin
835             Result := TTemplate(Node.Data).IsLocked;
836             if (not Result) and assigned(Node.Parent) and
837               (TTemplate(Node.Parent).PersonalOwner = 0) then
838               Result := IsTemplateLocked(Node.Parent);
839           end;
840         end;
841     end;
842   end;