- Timestamp:
- Nov 3, 2021, 5:31:17 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Inp.pas
r352 r408 5 5 6 6 uses 7 ScreenTools, Messg, 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, DrawDlg, 9 ButtonA, StdCtrls; 7 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 8 DrawDlg, ButtonA, StdCtrls; 10 9 11 10 type … … 38 37 TitleHeight := Height; 39 38 InitButtons; 40 Center := true;39 Center := True; 41 40 end; 42 41 … … 64 63 ModalResult := mrCancel 65 64 else 66 ModalResult := mrOK 65 ModalResult := mrOK; 67 66 end; 68 67 … … 72 71 begin 73 72 Key := #0; 74 ModalResult := mrOK 73 ModalResult := mrOK; 75 74 end 76 75 else if Key = #27 then 77 76 begin 78 77 Key := #0; 79 ModalResult := mrCancel 80 end 78 ModalResult := mrCancel; 79 end; 81 80 end; 82 81 … … 93 92 procedure TInputDlg.FormClose(Sender: TObject; var Action: TCloseAction); 94 93 begin 95 Center := true94 Center := True; 96 95 end; 97 96 98 97 procedure TInputDlg.CenterToRect(Rect: TRect); 99 98 begin 100 Center := false;99 Center := False; 101 100 Left := Rect.Left + (Rect.Right - Rect.Left - Width) div 2; 102 101 Top := Rect.Top + (Rect.Bottom - Rect.Top - Height) div 2; -
trunk/Packages/CevoComponents/BaseWin.pas
r352 r408 14 14 TBufferedDrawDlg = class(TDrawDlg) 15 15 public 16 UserLeft, UserTop: integer; 16 UserLeft: Integer; 17 UserTop: Integer; 17 18 constructor Create(AOwner: TComponent); override; 18 19 destructor Destroy; override; … … 21 22 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 22 23 procedure FormDeactivate(Sender: TObject); 23 procedure SmartUpdateContent(ImmUpdate: boolean = false);24 procedure SmartUpdateContent(ImmUpdate: Boolean = false); 24 25 procedure StayOnTop_Workaround; 25 26 protected 26 FWindowMode, ModalFrameIndent: integer; 27 FWindowMode: Integer; 28 ModalFrameIndent: Integer; 27 29 HelpContext: string; 28 procedure ShowNewContent(NewMode: integer; forceclose: boolean = false);29 procedure MarkUsedOffscreen(xMax, yMax: integer);30 procedure ShowNewContent(NewMode: Integer; ForceClose: Boolean = False); 31 procedure MarkUsedOffscreen(xMax, yMax: Integer); 30 32 procedure OffscreenPaint; virtual; 31 33 procedure VPaint; virtual; 32 34 public 33 UsedOffscreenWidth, UsedOffscreenHeight: integer; 35 UsedOffscreenWidth: Integer; 36 UsedOffscreenHeight: Integer; 34 37 Offscreen: TBitmap; 35 38 OffscreenUser: TForm; … … 53 56 procedure InitWindowRegion; 54 57 procedure VPaint; override; 55 procedure FillOffscreen(Left, Top, Width, Height: integer);58 procedure FillOffscreen(Left, Top, Width, Height: Integer); 56 59 end; 57 60 … … 155 158 procedure TBufferedDrawDlg.OffscreenPaint; 156 159 begin 157 if (OffscreenUser <> nil) and (OffscreenUser <> self) then160 if (OffscreenUser <> nil) and (OffscreenUser <> Self) then 158 161 OffscreenUser.Update; // complete working with old owner to prevent rebound 159 OffscreenUser := self;162 OffscreenUser := Self; 160 163 end; 161 164 … … 165 168 end; 166 169 167 procedure TBufferedDrawDlg.ShowNewContent(NewMode: integer; 168 forceclose: boolean); 169 begin 170 if Visible then 171 begin 172 assert((NewMode = wmModal) or (FWindowMode <> wmModal)); 170 procedure TBufferedDrawDlg.ShowNewContent(NewMode: Integer; 171 ForceClose: Boolean); 172 begin 173 if Visible then begin 174 Assert((NewMode = wmModal) or (FWindowMode <> wmModal)); 173 175 // don't make modal window non-modal 174 176 if (NewMode = wmModal) and (forceclose or (FWindowMode <> wmModal)) then … … 194 196 OnShow(nil); 195 197 Invalidate; 196 BringToFront 197 end 198 BringToFront; 199 end; 198 200 end 199 201 else … … 205 207 ShowModal 206 208 else 207 Show 208 end 209 end; 210 211 procedure TBufferedDrawDlg.SmartUpdateContent(ImmUpdate: boolean); 212 begin 213 if Visible then 214 begin 209 Show; 210 end; 211 end; 212 213 procedure TBufferedDrawDlg.SmartUpdateContent(ImmUpdate: Boolean); 214 begin 215 if Visible then begin 215 216 OffscreenPaint; 216 217 SmartInvalidate; … … 220 221 end; 221 222 222 procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: integer);223 procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: Integer); 223 224 begin 224 225 if xMax > UsedOffscreenWidth then … … 256 257 CaptionLeft := 0; 257 258 CaptionRight := $FFFF; 258 WideBottom := false;259 FullCaption := true;260 TexOverride := false;261 ModalIndication := true;259 WideBottom := False; 260 FullCaption := True; 261 TexOverride := False; 262 ModalIndication := True; 262 263 Canvas.Brush.Style := bsClear; 263 264 InnerWidth := Width - 2 * SideFrame; … … 284 285 DeleteObject(r1); 285 286 end; 286 InvalidateRgn(Handle, r0, false);287 InvalidateRgn(Handle, r0, False); 287 288 DeleteObject(r0); 288 289 end; … … 348 349 // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1, 349 350 // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); 350 if FullCaption then 351 begin 351 if FullCaption then begin 352 352 if (FWindowMode <> wmModal) or not ModalIndication then 353 353 begin … … 479 479 // DeleteObject(r1); 480 480 end; 481 SetWindowRgn(Handle, r0, false);481 SetWindowRgn(Handle, r0, False); 482 482 // DeleteObject(r0); // causes crash with Windows 95 483 483 end; 484 484 485 procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: integer);485 procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: Integer); 486 486 begin 487 487 Fill(Offscreen.Canvas, Left, Top, Width, Height, … … 493 493 begin 494 494 if Offscreen <> nil then 495 exit;495 Exit; 496 496 Offscreen := TBitmap.Create; 497 497 Offscreen.PixelFormat := pf24bit; -
trunk/Packages/CevoComponents/DrawDlg.pas
r395 r408 46 46 MessgText: string; 47 47 protected 48 Lines, TopSpace: integer; 48 Lines: Integer; 49 TopSpace: Integer; 49 50 procedure SplitText(preview: boolean); 50 51 procedure CorrectHeight; … … 71 72 begin 72 73 inherited; 74 Color := clBlack; 73 75 TitleHeight := 0; 74 76 MoveActive := False; -
trunk/Settings.pas
r386 r408 37 37 procedure FormPaint(Sender: TObject); 38 38 procedure FormShow(Sender: TObject); 39 procedure ListKeyBindingsSelectionChange(Sender: TObject; User: boolean);39 procedure ListKeyBindingsSelectionChange(Sender: TObject; User: Boolean); 40 40 procedure ButtonOkClick(Sender: TObject); 41 41 procedure Up2BtnClick(Sender: TObject); … … 166 166 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 167 167 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 168 EditFrame(Canvas, EditShortCutPrimary.BoundsRect, MainTexture); 169 EditFrame(Canvas, EditShortCutSecondary.BoundsRect, MainTexture); 168 170 EditFrame(Canvas, ListLanguages.BoundsRect, MainTexture); 169 171 BtnFrame(Canvas, ButtonOk.BoundsRect, MainTexture); … … 196 198 LoadData; 197 199 LocalKeyBindings.LoadToStrings(ListKeyBindings.Items); 200 EditShortCutPrimary.Font.Color := MainTexture.ColorMark; 201 EditShortCutSecondary.Font.Color := MainTexture.ColorMark; 198 202 end; 199 203 200 204 procedure TSettingsDlg.ListKeyBindingsSelectionChange(Sender: TObject; 201 User: boolean);205 User: Boolean); 202 206 begin 203 207 if Assigned(CurrentKeyBinding) then begin
Note:
See TracChangeset
for help on using the changeset viewer.