Procedure

TfrmTemplateEditor.DisplayBoilerplate

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

procedure DisplayBoilerplate(Node: TTreeNode);

Calls Hierarchy


TfrmTemplateEditor.DisplayBoilerplate
 ├TfrmTemplateEditor.pnlBoilerplateResize
 ├TTemplate.GetBoilerplate
 │ └GetTemplateBoilerplate
 ├TTemplate.FullBoilerplate
 │ ├TTemplate.GetBoilerplate...
 │ ├TTemplate.ItemBoilerplate
 │ │ ├TTemplate.GetItems
 │ │ │ └ExpandTemplate
 │ │ │   ├TTemplate.GetChildren
 │ │ │   ├GetTemplateChildren
 │ │ │   ├AddTemplate
 │ │ │   │ ├TTemplate.Create
 │ │ │   │ │ └TTemplate.ReminderDialogIEN
 │ │ │   │ └TTemplate.AddChild
 │ │ │   │   └TTemplate.GetItems...
 │ │ │   └TTemplate.ItemIENs
 │ │ │     └TTemplate.GetItems...
 │ │ ├TTemplate.GetTemplateType
 │ │ ├DlgText
 │ │ └TTemplate.DialogProperties
 │ │   ├TTemplate.GetBoilerplate...
 │ │   └TTemplate.DlgID
 │ ├DlgText
 │ └TTemplate.DialogProperties...
 ├TfrmTemplateEditor.UpdateInsertsDialogs
 │ ├TfrmTemplateObjects.UpdateStatus
 │ └TfrmTemplateFields.UpdateStatus
 │   └TfrmTemplateFields.ValidInsert
 ├TfrmTemplateEditor.ShowBoilerPlate
 └TfrmTemplateEditor.ShowGroupBoilerplate

Called-By Hierarchy


              TfrmTemplateEditor.DisplayBoilerplate
                      TfrmTemplateEditor.ShowInfo┤ 
                                  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.tvTreeChange┤ │ 
             TfrmTemplateEditor.cbActiveClick┤ │ │ 
               TfrmTemplateEditor.tvTreeEnter┤ │ │ 
             TfrmTemplateEditor.cbShHideClick┤ │ │ 
           TfrmTemplateEditor.cbActiveClick┘ │ │ │ 
            TfrmTemplateEditor.cbPerHideClick┤ │ │ 
           TfrmTemplateEditor.cbActiveClick┘ │ │ │ 
             TfrmTemplateEditor.sbDeleteClick┤ │ │ 
      TfrmTemplateEditor.mnuNodeDeleteClick┤ │ │ │ 
           TfrmTemplateEditor.tvTreeKeyDown┘ │ │ │ 
                    TfrmTemplateEditor.Resync┤ │ │ 
             TfrmTemplateEditor.btnNewClick┤ │ │ │ 
                         EditTemplates...┤ │ │ │ │ 
       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.reBoilChange┤ │ 
             TfrmTemplateEditor.mnuAutoGenClick┤ │ 
      TfrmTemplateEditor.mnuImportTemplateClick┘ │ 
                  TfrmTemplateEditor.edtGapChange┘ 

Calls

Name Declaration Comments
TTemplate.FullBoilerplate function FullBoilerplate: string; -
TTemplate.GetBoilerplate function GetBoilerplate: string; -
TfrmTemplateEditor.pnlBoilerplateResize procedure pnlBoilerplateResize(Sender: TObject); -
TfrmTemplateEditor.ShowBoilerPlate procedure ShowBoilerPlate(Hide: Boolean); -
TfrmTemplateEditor.ShowGroupBoilerplate procedure ShowGroupBoilerplate(Visible: boolean); -
TfrmTemplateEditor.UpdateInsertsDialogs procedure UpdateInsertsDialogs; -

Called-By

Name Declaration Comments
TfrmTemplateEditor.edtGapChange procedure edtGapChange(Sender: TObject); -
TfrmTemplateEditor.ShowInfo procedure ShowInfo(Node: TTreeNode); -


Source

1454  procedure TfrmTemplateEditor.DisplayBoilerplate(Node: TTreeNode);
1455  var
1456    OldUpdating, ItemOK, BPOK, LongLines: boolean;
1457    i: integer;
1458    TmpSL: TStringList;
1459  
1460  begin
1461    OldUpdating := FUpdating;
1462    FUpdating := TRUE;
1463    try
1464      pnlBoilerplateResize(pnlBoilerplate);
1465      reBoil.Clear;
1466      ItemOK := FALSE;
1467      BPOK := TRUE;
1468      with Node, TTemplate(Node.Data) do
1469      begin
1470        if (RealType in [ttDoc, ttGroup]) then
1471        begin
1472          TmpSL := TStringList.Create;
1473          try
1474            if (RealType = ttGroup) and (not reBoil.ReadOnly) then
1475            begin
1476              ItemOK := TRUE;
1477              TmpSL.Text := Boilerplate;
1478              reGroupBP.Clear;
1479              reGroupBP.SelText := FullBoilerplate;
1480            end
1481            else
1482              TmpSL.Text := FullBoilerplate;
1483            LongLines := FALSE;
1484            for i := 0 to TmpSL.Count - 1 do
1485            begin
1486              if length(TmpSL[i]) > MAX_ENTRY_WIDTH then
1487              begin
1488                LongLines := TRUE;
1489                break;
1490              end;
1491            end;
1492            cbLongLines.Checked := LongLines;
1493            reBoil.SelText := TmpSL.Text;
1494          finally
1495            TmpSL.Free;
1496          end;
1497        end
1498        else
1499        begin
1500          reBoil.ReadOnly := TRUE;
1501          UpdateReadOnlyColorScheme(reBoil, TRUE);
1502          UpdateInsertsDialogs;
1503        end;
1504  
1505        if (not ItemOK) and (IsReminderDialog or IsCOMObject) then
1506          BPOK := FALSE;
1507  
1508        ShowBoilerPlate(BPOK);
1509        ShowGroupBoilerplate(ItemOK);
1510  
1511        pnlBoilerplateResize(Self);
1512        pnlCOM.Visible := (not BPOK) and IsCOMObject;
1513      end;
1514    finally
1515      FUpdating := OldUpdating;
1516    end;
1517  end;