{USamDialog2, INCLUDE file from USamDialog, to illustrate use of the Dialog Manager} (* 11Apr84 19:30 PrMgrDialog has diGiveToMainWindow as its response to down in main window 05 April 1984 02:00 Preliminary Spring Release -- NOT using latest TDialog.New... methods yet *) {$IFC fRngABC} {$R+} {$ELSEC} {$R-} {$ENDC} {$IFC fSymABC} {$D+} {$ELSEC} {$D-} {$ENDC} METHODS OF TMyProcess; FUNCTION {TMyProcess.}CREATE{: TMyProcess}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} SELF := TMyProcess(TProcess.CREATE(NewObject(mainHeap, THISCLASS), mainHeap)); {$IFC fDbgOK} WRITELN(uSamDiVersion, ' ', uDialogVersion); {$ENDC} {$IFC fTrace}EP;{$ENDC} END; FUNCTION {TMyProcess.}NewDocManager{(volumePrefix: TFilePath; openAsTool: BOOLEAN): TDocManager}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} NewDocManager := TMyDocManager.CREATE(NIL, mainHeap, volumePrefix); {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TMyDocManager; FUNCTION {TMyDocManager.}CREATE{(object: TObject; itsHeap: THeap; itsPathPrefix: TFilePath) : TMyDocManager}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TMyDocManager(TDocManager.CREATE(object, itsHeap, itsPathPrefix)); {$IFC fTrace}EP;{$ENDC} END; FUNCTION {TMyDocManager.}NewWindow{(heap: THeap; wmgrID: TWindowID): TWindow}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} NewWindow := TMyWindow.CREATE(NIL, heap, wmgrID); {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TMyDialogView; FUNCTION {TMyDialogView.}CREATE{(object: TObject; itsHeap: THeap; itsExtentLRect: LRect; itsPanel: TPanel; inDialogBox: BOOLEAN): TMyDialogView}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TMyDialogView(TDialogView.CREATE(object, itsHeap, itsExtentLRect, itsPanel, NIL, screenRes)); {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TMyDialogView.}XDraw; {illustrates another way to add client embellishments; Frames the 'reportMessage' rectangle} BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} PenNormal; FrameLRect(TDemoDialog(SELF.rootDialog.children.First).reportMessage.extentLRect); {$IFC fTrace}EP;{$ENDC} END; FUNCTION {TMyDialogView.}XCursorAt{(mouseLPt: LPoint): TCursorNumber}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF LRectHasLPt(TDemoDialog( SELF.rootDialog.children.First).reportMessage.extentLRect, mouseLPt) THEN XCursorAt := fingerCursor ELSE XCursorAt := arrowCursor; {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TDemoDialog; FUNCTION {TDemoDialog.}CREATE{(object: TObject; itsHeap: THeap; itsPanel: TPanel; inDialogBox: BOOLEAN): TDemoDialog)}; VAR cluster: TCluster; location: LPoint; itsChars: S255; reportMessage: TImageWithID; inputFrame: TInputFrame; checkbox: TCheckbox; button: TButton; anotherButton: TButton; extent: LRect; legend: TLegend; smallType: TTypeStyle; BEGIN {$IFC fTrace}BP(10);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TDemoDialog(TDialog.CREATE(object, itsHeap, 'TEST', itsPanel.view)); IF inDialogBox THEN BEGIN SELF.AddOKButton(noCmdNumber); SELF.AddCancelButton(noCmdNumber); END; MakeTypeStyle(famModern, size15Pitch, [{$IFC libraryVersion <= 20} eFaceBold {$ELSEC} bold {$ENDC}], smallType); legend := SELF.AddStdLegend('Mild', 40, 100, smallType); legend := SELF.AddStdLegend('Spicy', 340, 100, smallType); cluster := SELF.AddRowOfBoxes('Test Row', 80, 90, 8, 21, 18, 12, 14); {Add a row of 8 checkboxes, with ID numbers 21 through 28, each 18 x 12 pixels, allowing 14 pixels spacing between adjacent boxes; Call this cluster "Test Row", and have the first box start at (80, 90)} { ********************** Define a Cluster of Checkboxes *********************** } cluster := SELF.AddStdCluster('Sizes', 80, 60); {locate the cluster at (80,60)} checkbox := cluster.AddAlignedCheckbox('small', TRUE); checkbox := cluster.AddAlignedCheckbox('medium', FALSE); checkbox := cluster.AddAlignedCheckbox('large', FALSE); { ********************** Define a giant Free Checkboxes *********************** } checkbox := SELF.AddBigFreeCheckbox('Lilac-Breasted Roller', 40, 170); { ********************** Define another free checkbox, whose text will change ********************* } checkbox := SELF.AddBigFreeCheckbox('Wren', 40, 210); { *************************** Define the "NEXT" Button **************************** } button := SELF.AddStdButton('NEXT', 420, 60, TButton(SELF.ObjectWithIDNumber(phCancel)), noCmdNumber); {this makes this button always be the same size as the CANCEL button; if not in dialog box, it will evaluate to NIL} {These three buttons will always have the same size:} button := SELF.AddStdButton('Obote', 100, 250, NIL, noCmdNumber); anotherButton := SELF.AddStdButton('Moi', 300, 250, button, noCmdNumber); button := SELF.AddStdButton('Nyerere', 500, 250, anotherButton, noCmdNumber); reportMessage := TImageWithID.CREATE(NIL, SELF.Heap, zeroLRect, 'Report Box', SELF.view, TRUE); reportMessage.AddImage(NewSysLegend(SELF.Heap, 'Report Box', 20, 24, SELF.view)); SELF.reportMessage := reportMessage; legend := TLegend(reportMessage.children.First); legend.isEditable := FALSE; {it's important to realize why!} SELF.AddImage(reportMessage); {make it a child so it'll be drawn, offset, etc., automatically} inputFrame := SELF.AddStdInputFrame('Give me some Keys:', 330, 145, 6); inputFrame.SupplantContents('A, Eb'); SELF.AddImage(TMyFootball.CREATE(NIL, itsHeap, SELF.view)); {$IFC fTrace}EP;{$ENDC} END; {$IFC fDebugMethods} PROCEDURE {TDemoDialog.}Fields{(PROCEDURE Field(nameAndType: S255))}; BEGIN SUPERSELF.Fields(Field); Field('reportMessage: TImageWithID'); Field(''); END; {$ENDC} PROCEDURE {TDemoDialog.}ButtonPushed{(button: TButton)}; VAR newReport: S255; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF (button.idNumber = phOK) OR (button.idNumber = phCancel) THEN SUPERSELF.ButtonPushed(button) {will dismiss dialog box} ELSE BEGIN SELF.ChangeReportMessage(CONCAT('>>> Button "', button.id, '" pushed <<<')); TDialogView(SELF.view).AbandonThatButton; END; {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TDemoDialog.}ChangeReportMessage{(newString: S255)}; VAR extentToInval: LRect; {will incorporate old extent, new extent, and the extra pixels for the box} newExtent: LRect; legend: TLegend; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} extentToInval := SELF.reportMessage.extentLRect; legend := TLegend(SELF.reportMessage.children.First); legend.ChangeString(newString); newExtent := legend.extentLRect; InsetLRect(newExtent, -7, -5); UnionLRect(SELF.reportMessage.extentLRect, newExtent, extentToInval); SELF.reportMessage.Resize(newExtent); InsetLRect(extentToInval, -1, -1); SELF.view.panel.InvalLRect(extentToInval); {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TDemoDialog.}CheckboxHit{(checkbox: TCheckbox; toggleDirection: BOOLEAN)}; VAR newString: S255; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF checkbox.HasId('Lilac-Breasted Roller') THEN BEGIN IF toggleDirection THEN process.GetAlert(xxOnLilac, newString) ELSE process.GetAlert(xxOffLilac, newString); SELF.ChangeReportMessage(newString); END ELSE IF checkbox.HasId('Wren') THEN {it's the free checkbox whose STRING we wish to change} BEGIN IF toggleDirection THEN process.GetAlert(xxTroglodyte, newString) ELSE process.GetAlert(xxWren, newString); checkbox.ChangeLabel(newString); SELF.ChangeReportMessage(newString); END ELSE SELF.ChangeReportMessage(checkBox.id); {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TMyFootball; {a simple-minded illustration of a user-defined dialogImage} FUNCTION {TMyFootball.}CREATE{(object: TObject; itsHeap: THeap; itsView: TView): TMyFootball}; VAR extentLRect: LRect; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} SetLRect(extentLRect, 490, 190, 560, 220); IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TMyFootball(TImageWithID.CREATE(object, itsHeap, extentLRect, 'FuĀ§ball', itsView, FALSE)); {$IFC fTrace}EP;{$ENDC} END; FUNCTION {TMyFootball.}CursorAt{(mouseLPt: LPoint): TCursorNumber}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF SELF.Hit(mouseLPt) THEN CursorAt := smCrossCursor ELSE CursorAt := noCursor; {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TMyFootball.}Draw; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} PenNormal; PaintLOval(SELF.extentLRect); {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TScaleDialog; FUNCTION {TScaleDialog.}CREATE{(object: TObject; itsheap: THeap; itsPanel:TPanel): TScaleDialog}; VAR cluster: TCluster; location: LPoint; checkbox: TCheckbox; legend: TLegend; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TScaleDialog(TDialog.CREATE(object, itsHeap, 'SCAL', itsPanel.view)); legend := SELF.AddSysLegend('There are 2 Dialogs in this view; this is in one of them', 30, 28); cluster := SELF.AddStdCluster('Scale Cluster', 50, 80); checkbox := cluster.AddAlignedCheckbox('1 Week', TRUE); checkbox := cluster.AddAlignedCheckbox('2 Weeks', FALSE); checkbox := cluster.AddAlignedCheckbox('4 Weeks', FALSE); checkbox := cluster.AddAlignedCheckbox('8 Weeks', FALSE); legend := SELF.AddSysLegend('Time Scale of Chart:', 10, 62); SELF.AddOKButton(noCmdNumber); SELF.AddCancelButton(noCmdNumber); SELF.SetDefaultButton(TButton(SELF.ObjectWithIDNumber(phCancel))); {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TScaleDialog.}ButtonPushed{(button: TButton)}; VAR cluster: TCluster; demoDialog: TDemoDialog; {the main-window Dialog of this test program} BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} cluster := TCluster(SELF.ObjWithId('Scale Cluster')); demoDialog := TMyWindow(currentWindow).demoDialog; IF button.idNumber = phOK THEN demoDialog.ChangeReportMessage( CONCAT('Current Scale Choice is ', cluster.hilitBox.id)) {strictly speaking, shd get these from phrase file} ELSE {it was CANCEL} demoDialog.ChangeReportMessage( 'Cancel dismissal'); SUPERSELF.ButtonPushed(button); {dismiss dialog box} {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TExtraDialog; FUNCTION {TExtraDialog.}CREATE{(object: TObject; itsheap: THeap; itsPanel:TPanel): TExtraDialog}; VAR cluster: TCluster; checkbox: TCheckbox; legend: TLegend; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TExtraDialog(TDialog.CREATE(object, itsHeap, 'EXTR', itsPanel.view)); legend := SELF.AddSysLegend('This is the "Extra" Dialog', 140, 140); cluster := SELF.AddStdCluster('doors', 120, 180); checkbox := cluster.AddAlignedCheckbox('Indoors', TRUE); checkbox := cluster.AddAlignedCheckbox('Outdoors', FALSE); {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TPrMgrDialog; FUNCTION {TPrMgrDialog.}CREATE{(object: TObject; itsHeap: THeap; itsPanel: TPanel): TPrMgrDialog}; VAR cluster: TCluster; checkbox: TCheckbox; BEGIN {$IFC fTrace}BP(10);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TPrMgrDialog(TDialog.CREATE(object, itsHeap, 'PRMG', itsPanel.view)); SELF.AddOKButton(noCmdNumber); SELF.AddCancelButton(noCmdNumber); cluster := SELF.AddStdCluster('which kind', 180, 24); checkbox := cluster.AddAlignedCheckbox('Daisy', FALSE); checkbox := cluster.AddAlignedCheckbox('Dot Matrix', TRUE); cluster := SELF.AddStdCluster('LANDPORT', 180, 50); checkbox := cluster.AddAlignedCheckbox('Landscape', FALSE); checkbox := cluster.AddAlignedCheckbox('Portrait', TRUE); cluster := SELF.AddStdCluster('which wheel', 180, 50); checkbox := cluster.AddAlignedCheckbox('Round Wheel', FALSE); checkbox := cluster.AddAlignedCheckbox('Square Wheel', TRUE); SELF.ActivateImage(cluster, FALSE); {initially, make this guy inactive} cluster := SELF.AddStdCluster('LOHIRES', 180, 80); checkbox := cluster.AddAlignedCheckbox('Normal Resolution', TRUE); checkbox := cluster.AddAlignedCheckbox('High Resolution', FALSE); {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TPrMgrDialog.}CheckboxHit{(checkbox: TCheckbox; toggleDirection: BOOLEAN)}; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} IF checkbox.HasId('Daisy') THEN SELF.ActivateImage(SELF.ObjWithId('which wheel'), toggleDirection) ELSE IF checkbox.HasId('Dot Matrix') THEN BEGIN SELF.ActivateImage(SELF.ObjWithId('LANDPORT'), toggleDirection); SELF.ActivateImage(SELF.ObjWithId('LOHIRES'), toggleDirection); END ELSE SUPERSELF.CheckboxHit(checkbox, toggleDirection); {as a matter of form} {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TFrameSampleDialog; FUNCTION {TFrameSampleDialog.}CREATE{(object: TObject; itsHeap: THeap; itsPanel: TPanel) : TFrameSampleDialog}; VAR inputFrame: TInputFrame; promptLoc: LPoint; inputLoc: LPoint; borders: Rect; bigTypeStyle: TTypeStyle; BEGIN {$IFC fTrace}BP(10);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TFrameSampleDialog(TDialog.CREATE(object, itsHeap, 'COLW', itsPanel.view)); SELF.AddOKButton(noCmdNumber); SELF.AddCancelButton(noCmdNumber); inputFrame := SELF.AddStdInputFrame('Standard frame, 4 chars', 50, 50, 4); inputFrame.SupplantContents('248'); SetLPt(promptLoc, 340, 50); SetLPt(inputLoc, 540, 50); inputFrame := SELF.AddInputFrame('Do not draw hit rect', promptLoc, sysTypeStyle, inputLoc, stdInputTypeStyle, 4, stdFrameBorders, TRUE, FALSE); inputFrame.SupplantContents('1088'); SetLPt(promptLoc, 50, 108); SetLPt(inputLoc, 250, 108); inputFrame := SELF.AddInputFrame('Do not draw input rect', promptLoc, sysTypeStyle, inputLoc, stdInputTypeStyle, 4, stdFrameBorders, FALSE, TRUE); SetLPt(promptLoc, 340, 108); SetLPt(inputLoc, 540, 108); borders := stdFrameBorders; {+} InsetRect(borders, 10, 6); {make smaller borders} {+} inputFrame := SELF.AddInputFrame('Smaller Borders', promptLoc, sysTypeStyle, inputLoc, stdInputTypeStyle, 4, borders, TRUE, TRUE); inputFrame.SupplantContents('1981'); SetLPt(promptLoc, 50, 188); SetLPt(inputLoc, 330, 188); MakeTypeStyle(famModern, size18Point, [], bigTypeStyle); {+} inputFrame := SELF.AddInputFrame('Big Prompt Font', promptLoc, bigTypeStyle, inputLoc, stdInputTypeStyle, 4, stdFrameBorders, FALSE, TRUE); inputFrame.SupplantContents('Omo'); SetLPt(promptLoc, 400, 188); SetLPt(inputLoc, 550, 188); inputFrame := SELF.AddInputFrame('Big Input Font', promptLoc, sysTypeStyle, inputLoc, bigTypeStyle, 4, stdFrameBorders, TRUE, FALSE); inputFrame.SupplantContents('241'); {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TFrameSampleDialog.}ButtonPushed{(button: TButton)}; VAR stdString: S255; BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} TInputFrame(SELF.ObjWithId('STANDARD ')).GetContents(stdString); IF button.idNumber = phOK THEN TMyWindow(currentWindow).demoDialog.ChangeReportMessage( CONCAT( 'At OK dismissal of FrameSample, contents of the "standard" box is ', stdString)); SUPERSELF.ButtonPushed(button); {dismiss the dialog box} {$IFC fTrace}EP;{$ENDC} END; PROCEDURE {TFrameSampleDialog.}PrepareToAppear; {+SW+} BEGIN {$IFC fTrace}BP(samDiTraceLevel);{$ENDC} SELF.SelectInputFrame(TInputFrame(SELF.ObjWithID('STANDARD ')));{come up selecting entire contents of 1st fr} {$IFC fTrace}EP;{$ENDC} END; END; METHODS OF TMyWindow; FUNCTION {TMyWindow.}CREATE{(object: TObject; itsHeap: THeap; itsWmgrID: TWindowID): TMyWindow}; BEGIN {$IFC fTrace}BP(10);{$ENDC} IF object = NIL THEN object := NewObject(itsHeap, THISCLASS); SELF := TMyWindow(TWindow.CREATE(object, itsHeap, itsWmgrID, TRUE)); {$IFC fTrace}EP;{$ENDC} END; {$IFC fDebugMethods} PROCEDURE {TMyWindow.}Fields{(PROCEDURE Field(nameAndType: S255))}; BEGIN SUPERSELF.Fields(Field); Field('scaleWindow: TDialogWindow'); Field('frameSampleDialog: TDialogWindow'); Field('prMgrWindow: TDialogWindow'); Field('demoWindow: TDialogWindow'); Field('demoDialog: TDemoDialog'); Field(''); END; {$ENDC} PROCEDURE {TMyWindow.}BlankStationery; VAR panel: TPanel; dialogView: TDialogView; dialogWindow: TDialogWindow; dialog: TDialog; extentLRect: LRect; demoDialog: TDemoDialog; BEGIN {$IFC fTrace}BP(10);{$ENDC} { Set up the panel and view for the main window } panel := TPanel.CREATE(NIL, SELF.Heap, SELF, 30, 20, [aScroll, aSplit], [aScroll, aSplit]); SetLRect(extentLRect, 0, 0, 700, 360); dialogView := TMyDialogView.CREATE(NIL, SELF.Heap, extentLRect, panel, FALSE); demoDialog := TDemoDialog.CREATE(NIL, SELF.Heap, panel, FALSE); dialogView.AddDialog(demoDialog); SELF.demoDialog := demoDialog; { Set up the Scale Dialog } dialogWindow := NewStdDialogWindow(SELF.Heap, 210, diDismiss, diAccept, diDismiss); SELF.scaleWindow := dialogWindow; dialogView := dialogWindow.dialogView; dialogView.AddDialog( TScaleDialog.CREATE(NIL, SELF.Heap, dialogWindow.selectPanel)); dialogView.AddDialog( TExtraDialog.CREATE(NIL, SELF.Heap, dialogWindow.selectPanel)); {NOTE: The 'Scale Window' shows TWO different dialogs, to test the multiple-dialog feature} { Set up the Frame Sample dialog } dialogWindow := NewStdDialogWindow(SELF.Heap, 300, diAccept, diAccept, diRefuse); SELF.frameWindow := dialogWindow; dialogWindow.dialogView.AddDialog(TFrameSampleDialog.CREATE(NIL, SELF.Heap, dialogWindow.selectPanel)); { Set up the Print Manager dialog } dialogWindow := NewStdDialogWindow(SELF.Heap, 120, diAccept, diAccept, diGiveToMainWindow); {+SW+} SELF.prMgrWindow := dialogWindow; dialogWindow.dialogView.AddDialog(TPrMgrDialog.CREATE(NIL, SELF.Heap, dialogWindow.selectPanel)); { Set up another version of the main-window demo dialog, but this time shown in a dialog box (illustrates why it would've been SO NICE to use NewStdDialogWindow) } dialogWindow := TDialogWindow.CREATE(NIL, SELF.Heap, FALSE, 300, diAccept, diAccept, diRefuse); panel := TPanel.CREATE(NIL, SELF.Heap, dialogWindow, 30, 20, [aScroll,aSplit], [aScroll,aSplit]); dialogWindow.controlPanel := panel; noPad.RectToLRect(panel.innerRect, extentLRect); SetLRect(extentLRect, 0, 0, screenBits.bounds.right, screenBits.bounds.bottom - 20); dialogView := TMyDialogView.CREATE(NIL, SELF.Heap, extentLRect, panel, TRUE); demoDialog := TDemoDialog.CREATE(NIL, SELF.Heap, panel, TRUE); dialogView.AddDialog(demoDialog); SELF.demoWindow := dialogWindow; dialogView.paintFreeBoxes := TRUE; {make it thus differ from the the main-window dialog} {$IFC fTrace}EP;{$ENDC} END; FUNCTION {TMyWindow.}CanDoCommand{(cmdNumber: TCmdNumber; VAR checkIt: BOOLEAN): BOOLEAN}; BEGIN {$IFC fTrace}BP(10);{$ENDC} CASE cmdNumber OF muTest, muScale, muFrameSample, muPrMgr, uEditDialog: CanDoCommand := SELF.dialogBox = NIL; OTHERWISE CanDoCommand := SUPERSELF.CanDoCommand(cmdNumber, checkIt); END; {$IFC fTrace}EP;{$ENDC} END; FUNCTION {TMyWindow.}NewCommand{(cmdNumber: TCmdNumber): TCommand}; VAR dialog: TDialog; dialogWindow: TDialogWindow; BEGIN {$IFC fTrace}BP(10);{$ENDC} NewCommand := NIL; CASE cmdNumber OF muTest: { put up standard Test test dialog box } SELF.PutUpDialogBox(SELF.demoWindow); muScale: {put up LisaProjects TIME SCALE dialog} SELF.PutUpDialogBox(SELF.scaleWindow); muFrameSample: {put up LisaCalc-like column width dialog} BEGIN SELF.PutUpDialogBox(SELF.frameWindow); END; muPrMgr: {put up Print-manager-like dialog} SELF.PutUpDialogBox(SELF.prMgrWindow); uEditDialog: {must be a request to edit the Main-window dialog} TDialogDesignWindow.CREATE(NIL, SELF.Heap, TDialogView(SELF.selectPanel.view)).SeizeControl; OTHERWISE NewCommand := SUPERSELF.NewCommand(cmdNumber); END; {$IFC fTrace}EP;{$ENDC} END; END;