LCL: added IsParentFont:Boolean and IsParentColor: Boolean to read protected ParentFont and ParentColor from TControl.Needed by widgetsets.

git-svn-id: trunk@33282 -
This commit is contained in:
zeljko 2011-11-04 09:30:36 +00:00
parent d381754c91
commit a54eb80b2f
2 changed files with 30 additions and 0 deletions

View File

@ -1361,6 +1361,8 @@ type
function IsVisible: Boolean; virtual;// checks parents too
function IsControlVisible: Boolean; virtual;// does not check parents
function IsEnabled: Boolean; // checks parent too
function IsParentColor: Boolean; // checks protected ParentColor, needed by widgetsets
function IsParentFont: Boolean; // checks protected ParentFont, needed by widgetsets
function IsParentShowHint: Boolean; // checks protected ParentShowHint prop.
function FormIsUpdating: boolean; virtual;
function IsProcessingPaintMsg: boolean;

View File

@ -675,6 +675,34 @@ begin
until (TheControl = nil) or (not Result);
end;
{------------------------------------------------------------------------------
Method: TControl.IsParentColor
Params: none
Returns: Boolean
Used at places where we need to check ParentColor property from TControl.
Property is protected, so this function avoids hacking to get
protected property value.
------------------------------------------------------------------------------}
function TControl.IsParentColor: Boolean;
begin
Result := FParentColor;
end;
{------------------------------------------------------------------------------
Method: TControl.IsParentFont
Params: none
Returns: Boolean
Used at places where we need to check ParentFont property from TControl.
Property is protected, so this function avoids hacking to get
protected property value.
------------------------------------------------------------------------------}
function TControl.IsParentFont: Boolean;
begin
Result := FParentFont;
end;
{------------------------------------------------------------------------------
Method: TControl.IsParentShowHint
Params: none