Changeset 408 for trunk/Packages
- Timestamp:
- Nov 3, 2021, 5:31:17 PM (3 years ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.