Changeset 431 for trunk/Packages/CevoComponents/BaseWin.pas
- Timestamp:
- Apr 28, 2022, 10:40:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/BaseWin.pas
r408 r431 8 8 9 9 type 10 TShowNewContent = procedure (NewMode: Integer; HelpContext: string) of object; 10 TWindowMode = (wmNone, wmModal, wmPersistent, wmSubmodal); 11 TShowNewContent = procedure (NewMode: TWindowMode; HelpContext: string) of object; 11 12 12 13 { TBufferedDrawDlg } … … 25 26 procedure StayOnTop_Workaround; 26 27 protected 27 FWindowMode: Integer;28 FWindowMode: TWindowMode; 28 29 ModalFrameIndent: Integer; 29 30 HelpContext: string; 30 procedure ShowNewContent(NewMode: Integer; ForceClose: Boolean = False);31 procedure ShowNewContent(NewMode: TWindowMode; ForceClose: Boolean = False); 31 32 procedure MarkUsedOffscreen(xMax, yMax: Integer); 32 33 procedure OffscreenPaint; virtual; … … 37 38 Offscreen: TBitmap; 38 39 OffscreenUser: TForm; 39 property WindowMode: integerread FWindowMode;40 property WindowMode: TWindowMode read FWindowMode; 40 41 end; 41 42 … … 64 65 65 66 const 66 // window modes67 wmNone = 0;68 wmModal = $1;69 wmPersistent = $2;70 wmSubmodal = $3;71 72 67 yUnused = 161; 73 68 NarrowFrame = 11; … … 76 71 77 72 procedure CreateOffscreen(var Offscreen: TBitmap); 73 function WindowModePersistent(Mode: TWindowMode): TWindowMode; 78 74 procedure Register; 79 75 … … 83 79 uses 84 80 ButtonBase, Area; 81 82 function WindowModeMakePersistent(Mode: TWindowMode): TWindowMode; 83 begin 84 if Mode = wmModal then Result := wmSubmodal 85 else Result := wmPersistent; 86 end; 85 87 86 88 procedure Register; … … 142 144 if Key = VK_F1 then begin 143 145 if Assigned(ShowNewContentProc) then 144 ShowNewContentProc( FWindowMode or wmPersistent, HelpContext);146 ShowNewContentProc(WindowModePersistent(FWindowMode), HelpContext); 145 147 end else 146 148 if FWindowMode = wmPersistent then begin … … 168 170 end; 169 171 170 procedure TBufferedDrawDlg.ShowNewContent(NewMode: Integer;172 procedure TBufferedDrawDlg.ShowNewContent(NewMode: TWindowMode; 171 173 ForceClose: Boolean); 172 174 begin
Note:
See TracChangeset
for help on using the changeset viewer.