Changeset 460 for trunk/Packages/CevoComponents
- Timestamp:
- Nov 28, 2023, 3:16:24 PM (12 months ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/BaseWin.pas
r447 r460 14 14 15 15 TBufferedDrawDlg = class(TDrawDlg) 16 public17 UserLeft: Integer;18 UserTop: Integer;19 constructor Create(AOwner: TComponent); override;20 destructor Destroy; override;21 procedure FormClose(Sender: TObject; var Action: TCloseAction);22 procedure FormPaint(Sender: TObject);23 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);24 procedure FormDeactivate(Sender: TObject);25 procedure SmartUpdateContent(ImmUpdate: Boolean = False);26 procedure StayOnTop_Workaround;27 16 protected 28 17 FWindowMode: TWindowMode; … … 34 23 procedure VPaint; virtual; 35 24 public 25 UserLeft: Integer; 26 UserTop: Integer; 36 27 UsedOffscreenWidth: Integer; 37 28 UsedOffscreenHeight: Integer; 38 29 Offscreen: TBitmap; 39 30 OffscreenUser: TForm; 31 constructor Create(AOwner: TComponent); override; 32 destructor Destroy; override; 33 procedure FormClose(Sender: TObject; var Action: TCloseAction); 34 procedure FormPaint(Sender: TObject); 35 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 36 procedure FormDeactivate(Sender: TObject); 37 procedure SmartUpdateContent(ImmUpdate: Boolean = False); 38 procedure StayOnTop_Workaround; 40 39 property WindowMode: TWindowMode read FWindowMode; 41 40 end; 42 41 43 42 TFramedDlg = class(TBufferedDrawDlg) 44 public45 constructor Create(AOwner: TComponent); override;46 procedure FormCreate(Sender: TObject);47 procedure SmartInvalidate; override;48 43 protected 49 44 CaptionLeft: Integer; … … 58 53 procedure VPaint; override; 59 54 procedure FillOffscreen(Left, Top, Width, Height: Integer); 55 public 56 constructor Create(AOwner: TComponent); override; 57 procedure FormCreate(Sender: TObject); 58 procedure SmartInvalidate; override; 60 59 end; 61 60 … … 120 119 UserTop := Top; 121 120 end; 122 if OffscreenUser = self then121 if OffscreenUser = Self then 123 122 OffscreenUser := nil; 124 123 end; … … 126 125 procedure TBufferedDrawDlg.FormPaint(Sender: TObject); 127 126 begin 128 if OffscreenUser <> self then127 if OffscreenUser <> Self then 129 128 OffscreenPaint; 130 129 VPaint; -
trunk/Packages/CevoComponents/DrawDlg.pas
r447 r460 46 46 Lines: Integer; 47 47 TopSpace: Integer; 48 procedure SplitText( preview: boolean);48 procedure SplitText(Preview: Boolean); 49 49 procedure CorrectHeight; 50 50 end; … … 206 206 procedure TDrawDlg.InitButtons; 207 207 var 208 cix: integer;208 cix: Integer; 209 209 // ButtonDownSound, ButtonUpSound: string; 210 210 begin … … 228 228 procedure TDrawDlg.SmartInvalidate; 229 229 var 230 i: integer;230 i: Integer; 231 231 r0, r1: HRgn; 232 232 begin … … 240 240 DeleteObject(r1); 241 241 end; 242 InvalidateRgn(Handle, r0, false);242 InvalidateRgn(Handle, r0, False); 243 243 DeleteObject(r0); 244 244 end; … … 260 260 procedure TBaseMessgDlg.FormPaint(Sender: TObject); 261 261 var 262 i, cix: integer;262 i, cix: Integer; 263 263 begin 264 264 if csDesigning in ComponentState then Exit; 265 PaintBackground( self, 3 + Border, 3 + Border, ClientWidth - (6 + 2 * Border),265 PaintBackground(Self, 3 + Border, 3 + Border, ClientWidth - (6 + 2 * Border), 266 266 ClientHeight - (6 + 2 * Border)); 267 267 for i := 0 to Border do … … 274 274 ClientHeight - (3 + Border), MainTexture.ColorBevelLight, 275 275 MainTexture.ColorBevelShade); 276 SplitText( false);276 SplitText(False); 277 277 278 278 for cix := 0 to ControlCount - 1 do … … 281 281 end; 282 282 283 procedure TBaseMessgDlg.SplitText( preview: boolean);284 var 285 Start, Stop, OrdinaryStop, LinesCount: integer;283 procedure TBaseMessgDlg.SplitText(Preview: Boolean); 284 var 285 Start, Stop, OrdinaryStop, LinesCount: Integer; 286 286 s: string; 287 287 begin … … 294 294 (BiColorTextWidth(Canvas, Copy(MessgText, Start, Stop - Start + 1)) < 295 295 ClientWidth - 56) do 296 inc(Stop);296 Inc(Stop); 297 297 if Stop <> Length(MessgText) then 298 298 begin … … 303 303 (MessgText[OrdinaryStop + 1] = '\'); 304 304 if (OrdinaryStop + 1 - Start) * 2 >= Stop - Start then 305 Stop := OrdinaryStop 306 end; 307 if not preview then305 Stop := OrdinaryStop; 306 end; 307 if not Preview then 308 308 begin 309 309 s := Copy(MessgText, Start, Stop - Start + 1); … … 313 313 end; 314 314 Start := Stop + 2; 315 inc(LinesCount) 316 end; 317 if preview then315 inc(LinesCount); 316 end; 317 if Preview then 318 318 Lines := LinesCount; 319 319 end; … … 321 321 procedure TBaseMessgDlg.CorrectHeight; 322 322 var 323 i: integer;323 i: Integer; 324 324 begin 325 325 ClientHeight := 72 + Border + TopSpace + Lines * MessageLineSpacing;
Note:
See TracChangeset
for help on using the changeset viewer.