Function

TTemplate.GetText

Module

uTemplates

Last Modified

7/15/2014 3:26:44 PM

Comments

Gets the object-expanded boilerplated text

Visibility

Protected

Owner

TTemplate

Declaration

function GetText: string;

Calls Hierarchy


TTemplate.GetText
 ├TTemplate.IsDialog
 ├TTemplate.FullBoilerplate
 │ ├TTemplate.GetBoilerplate
 │ │ └GetTemplateBoilerplate
 │ ├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...
 ├SetTemplateBPHasObjects
 ├GetTemplateText
 │ └TEncounter.GetVisitStr
 │   └TEncounter.GetVisitCategory
 └DoTemplateDialog
   ├SetTemplateDialogCanceled
   ├TfrmBase508Form.Create
   │ ├TfrmBase508Form.UpdateAccessibilityActions
   │ ├UnfocusableControlEnter
   │ └AdjustControls
   │   ├TfrmBase508Form.ModifyUnfocusableControl
   │   └..(rec)..
   ├AssignFieldIDs
   │ └AssignFieldIDs
   │   └GetNewFieldID
   ├CountDlgProps
   │ └IncDlgID
   ├TfrmTemplateDialog.BuildAllControls
   │ └TfrmTemplateDialog.BuildCB
   │   ├TfrmTemplateDialog.FindObjectByID
   │   │ └TfrmTemplateDialog.GetObjectID
   │   ├GetDialogEntry
   │   │ └TTemplateDialogEntry.Create
   │   │   ├TDlgFieldPanel.Create
   │   │   ├GetTemplateField
   │   │   │ ├LoadTemplateFieldByIEN
   │   │   │ ├LoadTemplateField
   │   │   │ └TTemplateField.Create
   │   │   │   ├TemplateFieldCode2Field
   │   │   │   └TemplateDateCode2DateType
   │   │   ├TTemplateField.GetRequired
   │   │   └TTemplateField.CreateDialogControls
   │   │     ├TCPRSDialogFieldEdit.Create
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├TTemplateField.GetRequired
   │   │     ├ht
   │   │     ├wdth
   │   │     ├TTemplateField.Width
   │   │     │ └StripEmbedded
   │   │     ├TTemplateDialogEntry.DoChange
   │   │     ├TCPRSDialogComboBox.Create
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├StripEmbedded
   │   │     ├TfraTemplateFieldButton.Create
   │   │     │ ├TfraTemplateFieldButton.ButtonKeyDown
   │   │     │ │ └TfraTemplateFieldButton.pnlBtnMouseDown
   │   │     │ │   ├TfraTemplateFieldButton.GetButtonText
   │   │     │ │   └TfraTemplateFieldButton.SetButtonText
   │   │     │ ├TfraTemplateFieldButton.ButtonKeyUp
   │   │     │ │ └TfraTemplateFieldButton.pnlBtnMouseUp
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├TfraTemplateFieldButton.SetButtonText
   │   │     ├TCPRSDialogCheckBox.Create
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├UpdateIndents
   │   │     │ └wdth
   │   │     ├StrToFMDateTime
   │   │     ├TCPRSDialogDateCombo.Create
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├TCPRSDialogDateBox.Create
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├TCPRSDialogNumber.CreatePanel
   │   │     │ └TCPRSDialogComponent.Create
   │   │     ├TTemplateDialogEntry.UpDownChange
   │   │     │ ├EnsureText
   │   │     │ └TTemplateDialogEntry.DoChange
   │   │     ├TCPRSDialogHyperlinkLabel.Create
   │   │     │ ├TCPRSDialogComponent.Create
   │   │     │ └TCPRSDialogHyperlinkLabel.KeyPressed
   │   │     │   └TCPRSDialogHyperlinkLabel.Clicked
   │   │     │     └GotoWebPage
   │   │     ├TCPRSDialogHyperlinkLabel.Init
   │   │     │ └TCPRSDialogHyperlinkLabel.Clicked...
   │   │     └TCPRSDialogRichEdit.Create
   │   │       └TCPRSDialogComponent.Create
   │   ├TTemplateDialogEntry.SetAutoDestroyOnPanelFree
   │   │ └PanelDestroy
   │   ├TfrmTemplateDialog.EntryDestroyed
   │   ├TTemplateDialogEntry.GetPanel
   │   │ ├Init
   │   │ │ ├TTemplateDialogEntry.KillLabels
   │   │ │ └ScreenReaderSystem_CurrentCheckBox
   │   │ │   └ScreenReaderSystem_Stop
   │   │ │     ├UpdateCheckBox
   │   │ │     ├UpdatePending
   │   │ │     └ScreenReaderSystem_Clear
   │   │ ├Text508Work
   │   │ │ ├TTemplateDialogEntry.StripCode
   │   │ │ ├ScreenReaderSystem_Stop...
   │   │ │ ├StripSRCode
   │   │ │ └ScreenReaderSystem_Continue
   │   │ ├TTemplateDialogEntry.StripCode
   │   │ ├NextLine
   │   │ ├DoLabel
   │   │ │ ├Add2TabOrder
   │   │ │ ├ScreenReaderSystem_CurrentLabel
   │   │ │ │ └ScreenReaderSystem_Stop...
   │   │ │ └ScreenReaderSystem_AddText
   │   │ ├Ctrl508Work
   │   │ │ ├ScreenReaderSystem_CurrentLabel...
   │   │ │ ├ScreenReaderSystem_AddText
   │   │ │ ├ScreenReaderSystem_Stop...
   │   │ │ ├Add2TabOrder
   │   │ │ └ScreenReaderSystem_CurrentComponent
   │   │ │   ├UpdateCheckBox
   │   │ │   ├UpdatePending
   │   │ │   └ScreenReaderSystem_Stop...
   │   │ ├TTemplateDialogEntry.SetFieldValues
   │   │ │ └TTemplateDialogEntry.SetControlText
   │   │ │   └TfraTemplateFieldButton.SetButtonText
   │   │ └ScreenReaderSystem_Stop...
   │   ├TTemplateDialogEntry.GetText
   │   │ └ResolveTemplateFields
   │   │   ├TTemplateDialogEntry.GetControlText
   │   │   │ ├GetTemplateField...
   │   │   │ ├GetOriginalItem
   │   │   │ │ ├GetTemplateField...
   │   │   │ │ └StripEmbedded
   │   │   │ └TfraTemplateFieldButton.GetButtonText
   │   │   ├GetTemplateField...
   │   │   ├AddNewTxt
   │   │   └WordWrapText
   │   │     └WrappedText
   │   ├TfrmTemplateDialog.FieldChanged
   │   │ └TTemplateDialogEntry.GetText...
   │   ├TfrmTemplateDialog.ParentCBEnter
   │   ├TfrmTemplateDialog.ParentCBExit
   │   ├TfrmTemplateDialog.ItemChecked
   │   └NextTabCtrl
   ├GetText
   │ └ResolveTemplateFields...
   ├TimedOut
   └CheckBoilerplate4Fields
     ├HasTemplateField
     ├BoilerplateTemplateFieldsOK
     │ └ListTemplateFields
     │   └GetTemplateField...
     ├DoTemplateDialog...
     └StripScreenReaderCodes
       └StripScreenReaderCodes

Called-By Hierarchy


                             TTemplate.GetText
                ExecuteTemplateOrBoilerPlate┤ 
                      TfrmDrawers.InsertText┤ 
           TfrmDrawers.tvTemplatesDblClick┤ │ 
            TfrmDrawers.tvTemplatesKeyDown┤ │ 
                TfrmDrawers.NewRECDragDrop┤ │ 
          TfrmDrawers.SetRichEditControl┘ │ │ 
                 TfrmDCSumm.FormCreate┤   │ │ 
               TfrmConsults.FormCreate┤   │ │ 
                TfrmSurgery.FormCreate┤   │ │ 
                  TfrmNotes.FormCreate┘   │ │ 
        TfrmDrawers.mnuInsertTemplateClick┘ │ 
  TfrmDCSumm.popSummMemoInsTemplateClick┤   │ 
TfrmConsults.popNoteMemoInsTemplateClick┤   │ 
 TfrmSurgery.popNoteMemoInsTemplateClick┤   │ 
   TfrmNotes.popNoteMemoInsTemplateClick┘   │ 
         TfrmDrawers.mnuPreviewTemplateClick┤ 
        TfrmDCSumm.popSummMemoPreviewClick┤ │ 
      TfrmConsults.popNoteMemoPreviewClick┤ │ 
       TfrmSurgery.popNoteMemoPreviewClick┤ │ 
         TfrmNotes.popNoteMemoPreviewClick┘ │ 
            TfrmDrawers.mnuCopyTemplateClick┤ 
            TfrmTemplateEditor.mnuBPTryClick┘ 
          TfrmTemplateEditor.tvTreeKeyDown┘   

Calls

Name Declaration Comments
DoTemplateDialog function DoTemplateDialog(SL: TStrings; const CaptionText: string; PreviewMode: boolean = FALSE): boolean; -
TTemplate.FullBoilerplate function FullBoilerplate: string; -
GetTemplateText procedure GetTemplateText(BoilerPlate: TStrings); -
TTemplate.IsDialog function IsDialog: boolean; -
SetTemplateBPHasObjects procedure SetTemplateBPHasObjects(value: Boolean); -

Called-By

Name Declaration Comments
ExecuteTemplateOrBoilerPlate procedure ExecuteTemplateOrBoilerPlate(SL: TStrings; IEN: Integer; LType: TTemplateLinkType; OwningForm: TForm; CaptionText: string; var DocInfo: string); overload; -
TfrmDrawers.InsertText procedure InsertText; -
TfrmTemplateEditor.mnuBPTryClick procedure mnuBPTryClick(Sender: TObject); -
TfrmDrawers.mnuCopyTemplateClick procedure mnuCopyTemplateClick(Sender: TObject); -
TfrmDrawers.mnuPreviewTemplateClick procedure mnuPreviewTemplateClick(Sender: TObject); -


Source

1885  function TTemplate.GetText: string;
1886  var
1887    OldGettingDialogText: boolean;
1888    TmpSL: TStringList;
1889  
1890  begin
1891    Result := '';
1892    if FIsReminderDialog or FIsCOMObject then exit;
1893    TmpSL := TStringList.Create;
1894    try
1895      StatusText('Expanding Boilerplate Text...');
1896      try
1897        OldGettingDialogText := GettingDialogText;
1898        if(IsDialog) then
1899        begin
1900          GettingDialogText := TRUE;
1901          inc(uDlgCount);
1902          if not OldGettingDialogText then
1903            uIndentLevel := 0;
1904        end;
1905        try
1906          TmpSL.Text := FullBoilerplate;
1907          if Pos('|', TmpSL.Text) > 0 then SetTemplateBPHasObjects(TRUE);
1908        finally
1909          if(IsDialog) then
1910            GettingDialogText := OldGettingDialogText;
1911        end;
1912        GetTemplateText(TmpSL);
1913        if(IsDialog) then
1914          FDialogAborted := DoTemplateDialog(TmpSL, 'Template: ' + FPrintName, TemplatePreviewMode);
1915        Result := TmpSL.Text;
1916      finally
1917        StatusText('');
1918      end;
1919    finally
1920      TmpSL.Free;
1921    end;
1922  end;