Ignore:
Timestamp:
Nov 4, 2021, 2:59:11 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r411.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Packages/CevoComponents/BaseWin.pas

    r361 r412  
    1414  TBufferedDrawDlg = class(TDrawDlg)
    1515  public
    16     UserLeft, UserTop: integer;
     16    UserLeft: Integer;
     17    UserTop: Integer;
    1718    constructor Create(AOwner: TComponent); override;
    1819    destructor Destroy; override;
     
    2122    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    2223    procedure FormDeactivate(Sender: TObject);
    23     procedure SmartUpdateContent(ImmUpdate: boolean = false);
     24    procedure SmartUpdateContent(ImmUpdate: Boolean = false);
    2425    procedure StayOnTop_Workaround;
    2526  protected
    26     FWindowMode, ModalFrameIndent: integer;
     27    FWindowMode: Integer;
     28    ModalFrameIndent: Integer;
    2729    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);
    3032    procedure OffscreenPaint; virtual;
    3133    procedure VPaint; virtual;
    3234  public
    33     UsedOffscreenWidth, UsedOffscreenHeight: integer;
     35    UsedOffscreenWidth: Integer;
     36    UsedOffscreenHeight: Integer;
    3437    Offscreen: TDpiBitmap;
    3538    OffscreenUser: TDpiForm;
     
    5356    procedure InitWindowRegion;
    5457    procedure VPaint; override;
    55     procedure FillOffscreen(Left, Top, Width, Height: integer);
     58    procedure FillOffscreen(Left, Top, Width, Height: Integer);
    5659  end;
    5760
     
    155158procedure TBufferedDrawDlg.OffscreenPaint;
    156159begin
    157   if (OffscreenUser <> nil) and (OffscreenUser <> self) then
     160  if (OffscreenUser <> nil) and (OffscreenUser <> Self) then
    158161    OffscreenUser.Update; // complete working with old owner to prevent rebound
    159   OffscreenUser := self;
     162  OffscreenUser := Self;
    160163end;
    161164
     
    165168end;
    166169
    167 procedure TBufferedDrawDlg.ShowNewContent(NewMode: integer;
    168   forceclose: boolean);
    169 begin
    170   if Visible then
    171   begin
    172     assert((NewMode = wmModal) or (FWindowMode <> wmModal));
     170procedure TBufferedDrawDlg.ShowNewContent(NewMode: Integer;
     171  ForceClose: Boolean);
     172begin
     173  if Visible then begin
     174    Assert((NewMode = wmModal) or (FWindowMode <> wmModal));
    173175    // don't make modal window non-modal
    174176    if (NewMode = wmModal) and (forceclose or (FWindowMode <> wmModal)) then
     
    194196        OnShow(nil);
    195197      Invalidate;
    196       BringToFront
    197     end
     198      BringToFront;
     199    end;
    198200  end
    199201  else
     
    205207      ShowModal
    206208    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;
     211end;
     212
     213procedure TBufferedDrawDlg.SmartUpdateContent(ImmUpdate: Boolean);
     214begin
     215  if Visible then begin
    215216    OffscreenPaint;
    216217    SmartInvalidate;
     
    220221end;
    221222
    222 procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: integer);
     223procedure TBufferedDrawDlg.MarkUsedOffscreen(xMax, yMax: Integer);
    223224begin
    224225  if xMax > UsedOffscreenWidth then
     
    256257  CaptionLeft := 0;
    257258  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;
    262263  Canvas.Brush.Style := bsClear;
    263264  InnerWidth := Width - 2 * SideFrame;
     
    284285      DeleteObject(r1);
    285286    end;
    286   InvalidateRgn(Handle, r0, false);
     287  InvalidateRgn(Handle, r0, False);
    287288  DeleteObject(r0);
    288289end;
     
    348349  // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1,
    349350  // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight);
    350   if FullCaption then
    351   begin
     351  if FullCaption then begin
    352352    if (FWindowMode <> wmModal) or not ModalIndication then
    353353    begin
     
    479479    // DeleteObject(r1);
    480480  end;
    481   SetWindowRgn(Handle, r0, false);
     481  SetWindowRgn(Handle, r0, False);
    482482  // DeleteObject(r0); // causes crash with Windows 95
    483483end;
    484484
    485 procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: integer);
     485procedure TFramedDlg.FillOffscreen(Left, Top, Width, Height: Integer);
    486486begin
    487487  Fill(Offscreen.Canvas, Left, Top, Width, Height,
     
    493493begin
    494494  if Offscreen <> nil then
    495     exit;
     495    Exit;
    496496  Offscreen := TDpiBitmap.Create;
    497497  Offscreen.PixelFormat := pf24bit;
Note: See TracChangeset for help on using the changeset viewer.