From 950b7a0f72e751ceec64cf19b890255a79d56ebf Mon Sep 17 00:00:00 2001 From: Bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Wed, 30 Jul 2025 11:22:16 +0200 Subject: [PATCH] Win32: rename recently added class helpers, so their names better refelct their purpose. No functional changes. Part of issue #41567. --- lcl/interfaces/win32/win32pagecontrol.inc | 8 ++--- lcl/interfaces/win32/win32wsbuttons.pp | 6 ++-- lcl/interfaces/win32/win32wscomctrls.pp | 8 ++--- .../win32/win32wscustomlistview.inc | 30 +++++++++--------- lcl/interfaces/win32/win32wsdialogs.pp | 31 +++++++++---------- 5 files changed, 40 insertions(+), 43 deletions(-) diff --git a/lcl/interfaces/win32/win32pagecontrol.inc b/lcl/interfaces/win32/win32pagecontrol.inc index d27ea9f664..6310abb1f0 100644 --- a/lcl/interfaces/win32/win32pagecontrol.inc +++ b/lcl/interfaces/win32/win32pagecontrol.inc @@ -10,11 +10,11 @@ type - { TCustomPageHelper } + { TCustomPageAccessHelper } // Provides access to protected methods and properties of TCustomPage, without using a typecast hack, // since such a typecast wil raise an EInvalidCast when compiled with -CR {$OBJECTCHECKS ON} - TCustomPageHelper = class helper for TCustomPage + TCustomPageAccessHelper = class helper for TCustomPage private function _GetFlags: TPageFlags; public @@ -24,12 +24,12 @@ type end; -function TCustomPageHelper._GetFlags: TPageFlags; +function TCustomPageAccessHelper._GetFlags: TPageFlags; begin Result := Flags; end; -function TCustomPageHelper._FindNextControl(CurrentControl: TWinControl; +function TCustomPageAccessHelper._FindNextControl(CurrentControl: TWinControl; GoForward, CheckTabStop, CheckParent: Boolean): TWinControl; begin Result := FindNextControl(CurrentControl, GoForward, CheckTabStop, CheckParent); diff --git a/lcl/interfaces/win32/win32wsbuttons.pp b/lcl/interfaces/win32/win32wsbuttons.pp index 038cfc7bda..02a09835e7 100644 --- a/lcl/interfaces/win32/win32wsbuttons.pp +++ b/lcl/interfaces/win32/win32wsbuttons.pp @@ -71,17 +71,17 @@ uses Win32Int, Win32Proc; type - { TCustomBitBtnHelper } + { TCustomBitBtnAccessHelper } // Provides access to protected methods and properties of TCustomBitBtn, without using a typecast hack, // since such a typecast wil raise an EInvalidCast when compiled with -CR {$OBJECTCHECKS ON} - TCustomBitBtnHelper = class helper for TCustomBitBtn + TCustomBitBtnAccessHelper = class helper for TCustomBitBtn private function GetFButtonGlyph: TButtonGlyph; public property _FButtonGlyph: TButtonGlyph read GetFButtonGlyph; end; -function TCustomBitBtnHelper.GetFButtonGlyph: TButtonGlyph; +function TCustomBitBtnAccessHelper.GetFButtonGlyph: TButtonGlyph; begin Result := FButtonGlyph; end; diff --git a/lcl/interfaces/win32/win32wscomctrls.pp b/lcl/interfaces/win32/win32wscomctrls.pp index cd4b6d04d3..a455360d26 100644 --- a/lcl/interfaces/win32/win32wscomctrls.pp +++ b/lcl/interfaces/win32/win32wscomctrls.pp @@ -291,11 +291,11 @@ const type - { TStatusPanelHelper } + { TStatusPanelAccessHelper } // Provides access to protected methods and properties of TStatusPanel, without using a typecast hack, // since such a typecast wil raise an EInvalidCast when compiled with -CR {$OBJECTCHECKS ON} - TStatusPanelHelper = class helper for TStatusPanel + TStatusPanelAccessHelper = class helper for TStatusPanel private function GetFIntfFlag: Integer; procedure SetFIntfFlag(AValue: Integer); @@ -303,12 +303,12 @@ type property _FIntfFlag: Integer read GetFIntfFlag write SetFIntfFlag; end; -function TStatusPanelHelper.GetFIntfFlag: Integer; +function TStatusPanelAccessHelper.GetFIntfFlag: Integer; begin Result := FIntfFlag; end; -procedure TStatusPanelHelper.SetFIntfFlag(AValue: Integer); +procedure TStatusPanelAccessHelper.SetFIntfFlag(AValue: Integer); begin FIntfFlag := AValue; end; diff --git a/lcl/interfaces/win32/win32wscustomlistview.inc b/lcl/interfaces/win32/win32wscustomlistview.inc index 6c8afb5b0b..d60ff9d1dd 100644 --- a/lcl/interfaces/win32/win32wscustomlistview.inc +++ b/lcl/interfaces/win32/win32wscustomlistview.inc @@ -49,11 +49,11 @@ type type - { TTCustomListViewHelper } + { TTCustomListViewAccessHelper } // Provides access to protected methods and properties of TCustomListView, without using a typecast hack, // since such a typecast wil raise an EInvalidCast when compiled with -CR {$OBJECTCHECKS ON} - TTCustomListViewHelper = class helper for TCustomListView + TTCustomListViewAccessHelper = class helper for TCustomListView private function GetColumnClick: Boolean; function GetColumns: TListColumns; @@ -74,72 +74,72 @@ type function _IsCustomDrawn(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage): Boolean; end; - { TListColumnHelper } + { TListColumnAccessHelper } // Provides access to protected methods and properties of TListColumn, without using a typecast hack, // since such a typecast wil raise an EInvalidCast when compiled with -CR {$OBJECTCHECKS ON} - TListColumnHelper = class helper for TListColumn + TListColumnAccessHelper = class helper for TListColumn public function _GetStoredWidth: Integer; end; { TTCustomListViewHelper } -function TTCustomListViewHelper.GetColumnClick: Boolean; +function TTCustomListViewAccessHelper.GetColumnClick: Boolean; begin Result := ColumnClick; end; -function TTCustomListViewHelper.GetColumns: TListColumns; +function TTCustomListViewAccessHelper.GetColumns: TListColumns; begin Result := Columns; end; -function TTCustomListViewHelper.GetFWinControl: TWinControlFlags; +function TTCustomListViewAccessHelper.GetFWinControl: TWinControlFlags; begin Result := FWinControlFlags; end; -function TTCustomListViewHelper.GetStateImages: TCustomImageList; +function TTCustomListViewAccessHelper.GetStateImages: TCustomImageList; begin Result := StateImages; end; -function TTCustomListViewHelper._CanChange(AItem: TListItem; AChange: Integer): Boolean; +function TTCustomListViewAccessHelper._CanChange(AItem: TListItem; AChange: Integer): Boolean; begin Result := CanChange(AItem, AChange); end; -function TTCustomListViewHelper._DoOwnerDataFind(AFind: TItemFind; +function TTCustomListViewAccessHelper._DoOwnerDataFind(AFind: TItemFind; const AFindString: string; const AFindPosition: TPoint; AFindData: Pointer; AStartIndex: Integer; ADirection: TSearchDirection; AWrap: Boolean): Integer; begin Result := DoOwnerDataFind(AFind, AFindString, AFindPosition, AFindData, AStartIndex, ADirection, AWrap); end; -function TTCustomListViewHelper._DoOwnerDataHint(AStartIndex, AEndIndex: Integer): Boolean; +function TTCustomListViewAccessHelper._DoOwnerDataHint(AStartIndex, AEndIndex: Integer): Boolean; begin Result := DoOwnerDataHint(AStartIndex, AEndIndex); end; -function TTCustomListViewHelper._GetUpdateCount: Integer; +function TTCustomListViewAccessHelper._GetUpdateCount: Integer; begin Result := GetUpdateCount; end; -function TTCustomListViewHelper._IntfCustomDraw(ATarget: TCustomDrawTarget; +function TTCustomListViewAccessHelper._IntfCustomDraw(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage; AItem, ASubItem: Integer; AState: TCustomDrawState; const ARect: PRect): TCustomDrawResult; begin Result := IntfCustomDraw(ATarget, AStage, AItem, ASubItem, AState, ARect); end; -function TTCustomListViewHelper._IsCustomDrawn(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage): Boolean; +function TTCustomListViewAccessHelper._IsCustomDrawn(ATarget: TCustomDrawTarget; AStage: TCustomDrawStage): Boolean; begin Result := IsCustomDrawn(ATarget, AStage); end; { TLisColumnHelper } -function TListColumnHelper._GetStoredWidth: Integer; +function TListColumnAccessHelper._GetStoredWidth: Integer; begin Result := GetStoredWidth; end; diff --git a/lcl/interfaces/win32/win32wsdialogs.pp b/lcl/interfaces/win32/win32wsdialogs.pp index b3d2c5753f..4194eb5aef 100644 --- a/lcl/interfaces/win32/win32wsdialogs.pp +++ b/lcl/interfaces/win32/win32wsdialogs.pp @@ -1737,14 +1737,11 @@ begin end; type - //TTaskDialogAccess = class(TCustomTaskDialog) - //end; - - { TTaskDialogHelper } + { TTaskDialogAccessHelper } // Provides access to protected methods and properties of TCustomTaskDialog, without using a typecast hack, // since such a typecast wil raise an EInvalidCast when compiled with -CR {$OBJECTCHECKS ON} - TTaskDialogHelper = class helper for TCustomTaskDialog + TTaskDialogAccessHelper = class helper for TCustomTaskDialog public procedure _InternalSetDialogHandle(AHandle: THandle); procedure _DoOnDialogConstructed; @@ -1762,63 +1759,63 @@ type { TTsakDialogHelper } -procedure TTaskDialogHelper._InternalSetDialogHandle(AHandle: THandle); +procedure TTaskDialogAccessHelper._InternalSetDialogHandle(AHandle: THandle); begin InternalSetDialogHandle(AHandle); end; -procedure TTaskDialogHelper._DoOnDialogConstructed; +procedure TTaskDialogAccessHelper._DoOnDialogConstructed; begin DoOnDialogConstructed; end; -procedure TTaskDialogHelper._DoOnDialogCreated; +procedure TTaskDialogAccessHelper._DoOnDialogCreated; begin DoOnDialogCreated; end; -procedure TTaskDialogHelper._DoOnDialogDestroyed; +procedure TTaskDialogAccessHelper._DoOnDialogDestroyed; begin DoOnDialogDestroyed; end; -procedure TTaskDialogHelper._DoOnButtonClicked(AModalResult: Integer; +procedure TTaskDialogAccessHelper._DoOnButtonClicked(AModalResult: Integer; var ACanClose: Boolean); begin DoOnButtonClicked(AModalResult, ACanClose); end; -procedure TTaskDialogHelper._DoOnHyperlinkClicked(const AURL: string); +procedure TTaskDialogAccessHelper._DoOnHyperlinkClicked(const AURL: string); begin DoOnHyperlinkClicked(AURL); end; -procedure TTaskDialogHelper._DoOnNavigated; +procedure TTaskDialogAccessHelper._DoOnNavigated; begin DoOnNavigated; end; -procedure TTaskDialogHelper._DoOnTimer(TickCount: Cardinal; var Reset: Boolean); +procedure TTaskDialogAccessHelper._DoOnTimer(TickCount: Cardinal; var Reset: Boolean); begin DoOnTimer(TickCount, Reset); end; -procedure TTaskDialogHelper._DoOnverificationClicked(Checked: Boolean); +procedure TTaskDialogAccessHelper._DoOnverificationClicked(Checked: Boolean); begin DoOnverificationClicked(Checked); end; -procedure TTaskDialogHelper._DoOnExpandButtonClicked(Expanded: Boolean); +procedure TTaskDialogAccessHelper._DoOnExpandButtonClicked(Expanded: Boolean); begin DoOnExpandButtonClicked(Expanded); end; -procedure TTaskDialogHelper._DoOnRadioButtonClicked(ButtonID: Integer); +procedure TTaskDialogAccessHelper._DoOnRadioButtonClicked(ButtonID: Integer); begin DoOnRadioButtonClicked(ButtonID); end; -procedure TTaskDialogHelper._DoOnHelp; +procedure TTaskDialogAccessHelper._DoOnHelp; begin DoOnHelp; end;