Changeset 476 for trunk/Packages
- Timestamp:
- Dec 4, 2023, 9:46:31 PM (12 months ago)
- Location:
- trunk/Packages/DpiControls
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/DpiControls/Dpi.Common.pas
r475 r476 15 15 XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean; 16 16 function CreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; 17 {$IFDEF WINDOWS} 17 18 function ScrollDC(hDC: HDC; dx: longint; dy: longint; const lprcScroll: RECT; 18 19 const lprcClip:RECT;hrgnUpdate:HRGN; lprcUpdate: LPRECT): WINBOOL; overload; 20 {$ENDIF} 19 21 function ScrollDC(Canvas: TCanvas; dx: Longint; dy: Longint; const lprcScroll: TRect; 20 22 const lprcClip:TRect; hrgnUpdate: Handle; lprcUpdate: PRect): Boolean; overload; … … 51 53 end; 52 54 55 {$IFDEF WINDOWS} 53 56 function ScrollDC(hDC: HDC; dx: longint; dy: longint; const lprcScroll: RECT; 54 57 const lprcClip: RECT; hrgnUpdate: HRGN; lprcUpdate: LPRECT): WINBOOL; … … 63 66 ScaleRectToNative(lprcScroll), ScaleRectToNative(lprcClip), hrgnUpdate, lprcUpdate); 64 67 end; 68 {$ENDIF} 65 69 66 70 function ScrollDC(Canvas: TCanvas; dx: Longint; dy: Longint; -
trunk/Packages/DpiControls/Dpi.Controls.pas
r471 r476 20 20 TControlEx = class(Controls.TControl) 21 21 public 22 property ParentColor; 22 23 property OnMouseDown; 23 24 property OnMouseUp; … … 98 99 function GetOnClick: TNotifyEvent; 99 100 function GetOnDblClick: TNotifyEvent; 101 function GetParentColor: Boolean; 100 102 function GetParentFont: Boolean; 101 103 function GetShowHint: Boolean; … … 117 119 procedure SetOnClick(AValue: TNotifyEvent); 118 120 procedure SetOnDblClick(AValue: TNotifyEvent); 121 procedure SetParentColor(AValue: Boolean); 119 122 procedure SetParentFont(AValue: Boolean); 120 123 procedure SetShowHint(AValue: Boolean); … … 133 136 procedure MouseEnterHandler(Sender: TObject); virtual; 134 137 procedure SetWindowProc(AValue: TWndMethod); 138 function ColorIsStored: Boolean; virtual; 135 139 protected 136 140 procedure DoBorderSpacingChange(Sender: TObject; InnerSpaceChanged: Boolean); virtual; … … 158 162 property Text: TCaption read GetText write SetText; 159 163 property ParentFont: Boolean read GetParentFont write SetParentFont default True; 164 property ParentColor: Boolean read GetParentColor write SetParentColor default True; 160 165 public 161 166 function ScreenToClient(const APoint: TPoint): TPoint; virtual; … … 172 177 procedure Update; 173 178 procedure Refresh; 174 function IsParentOf(AControl: TControl): boolean; virtual;179 function IsParentOf(AControl: TControl): Boolean; virtual; 175 180 function Scale96ToScreen(const ASize: Integer): Integer; 176 181 constructor Create(TheOwner: TComponent); override; … … 196 201 property Font: TFont read FFont write SetFont; 197 202 property Align: TAlign read GetAlign write SetAlign; 198 property Color: TColor read GetColor write SetColor ;203 property Color: TColor read GetColor write SetColor stored ColorIsStored default {$ifdef UseCLDefault}clDefault{$else}clWindow{$endif}; 199 204 property Constraints: TSizeConstraints read FConstraints write FConstraints; 200 205 property Cursor: TCursor read GetCursor write SetCursor default crDefault; … … 643 648 end; 644 649 650 function TControl.ColorIsStored: Boolean; 651 begin 652 Result := not ParentColor; 653 end; 654 645 655 procedure TControl.DoBorderSpacingChange(Sender: TObject; 646 656 InnerSpaceChanged: Boolean); … … 747 757 end; 748 758 749 function TControl.IsParentOf(AControl: TControl): boolean;759 function TControl.IsParentOf(AControl: TControl): Boolean; 750 760 begin 751 761 Result := False; … … 887 897 end; 888 898 899 function TControl.GetParentColor: Boolean; 900 begin 901 Result := TControlEx(GetNativeControl).ParentColor; 902 end; 903 889 904 function TControl.GetParentFont: Boolean; 890 905 begin … … 976 991 begin 977 992 TControlEx(GetNativeControl).OnDblClick := AValue; 993 end; 994 995 procedure TControl.SetParentColor(AValue: Boolean); 996 begin 997 TControlEx(GetNativeControl).ParentColor := AValue; 978 998 end; 979 999 -
trunk/Packages/DpiControls/Dpi.StdCtrls.pas
r468 r476 139 139 property Count: Integer read GetCount; 140 140 published 141 property ParentColor; 141 142 property TopIndex: Integer read GetTopIndex write SetTopIndex default 0; 142 143 property ScrollWidth: Integer read GetScrollWidth write SetScrollWidth default 0;
Note:
See TracChangeset
for help on using the changeset viewer.