published TControl help properties

git-svn-id: trunk@2393 -
This commit is contained in:
mattias 2002-08-17 23:41:20 +00:00
parent 890c819296
commit 61d2a8145f
2 changed files with 52 additions and 11 deletions

View File

@ -535,6 +535,7 @@ type
function GetClientHeight: Integer; function GetClientHeight: Integer;
function GetClientWidth: Integer; function GetClientWidth: Integer;
function IsHelpContextStored: boolean; function IsHelpContextStored: boolean;
function IsHelpKeyWordStored: boolean;
procedure SetAlign(Value : TAlign); procedure SetAlign(Value : TAlign);
procedure SetBoundsRect(const Rect : TRect); procedure SetBoundsRect(const Rect : TRect);
procedure SetClientHeight(Value: Integer); procedure SetClientHeight(Value: Integer);
@ -675,7 +676,6 @@ type
property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;
property OnStartDrag: TStartDragEvent read FOnStartDrag write FOnStartDrag; property OnStartDrag: TStartDragEvent read FOnStartDrag write FOnStartDrag;
public public
FCompStyle : LongInt; FCompStyle : LongInt;
Function PerformTab : Boolean; Virtual; Function PerformTab : Boolean; Virtual;
@ -733,9 +733,6 @@ type
property OnResize: TNotifyEvent read FOnResize write FOnResize; property OnResize: TNotifyEvent read FOnResize write FOnResize;
property OnClick: TNotifyEvent read FOnClick write FOnClick; property OnClick: TNotifyEvent read FOnClick write FOnClick;
property OnShowHint: TControlShowHintEvent read FOnShowHint write FOnShowHint; property OnShowHint: TControlShowHintEvent read FOnShowHint write FOnShowHint;
property HelpType: THelpType read FHelpType write FHelpType default htContext;
property HelpKeyword: String read FHelpKeyword write SetHelpKeyword stored IsHelpContextStored;
property HelpContext: THelpContext read FHelpContext write SetHelpContext stored IsHelpContextStored default 0;
published published
property Cursor: TCursor read FCursor write SetCursor default crDefault; property Cursor: TCursor read FCursor write SetCursor default crDefault;
property Left: Integer read FLeft write SetLeft; property Left: Integer read FLeft write SetLeft;
@ -743,6 +740,9 @@ type
property Hint: String read FHint write SetHint; property Hint: String read FHint write SetHint;
property Top: Integer read FTop write SetTop; property Top: Integer read FTop write SetTop;
property Width: Integer read FWidth write SetWidth; property Width: Integer read FWidth write SetWidth;
property HelpType: THelpType read FHelpType write FHelpType default htContext;
property HelpKeyword: String read FHelpKeyword write SetHelpKeyword stored IsHelpKeyWordStored;
property HelpContext: THelpContext read FHelpContext write SetHelpContext stored IsHelpContextStored default 0;
end; end;
@ -763,6 +763,14 @@ type
TGetChildProc = procedure(Child: TComponent) of Object; TGetChildProc = procedure(Child: TComponent) of Object;
{ TWinControlActionLink }
TWinControlActionLink = class(TControlActionLink)
end;
TWinControlActionLinkClass = class of TWinControlActionLink;
{ TWinControl } { TWinControl }
TWinControlFlag = (wcfClientRectNeedsUpdate,wcfColorChanged); TWinControlFlag = (wcfClientRectNeedsUpdate,wcfColorChanged);
@ -1453,6 +1461,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.115 2003/04/11 08:09:26 mattias
published TControl help properties
Revision 1.114 2003/04/07 01:59:25 mattias Revision 1.114 2003/04/07 01:59:25 mattias
implemented package iterations implemented package iterations

View File

@ -1,3 +1,5 @@
// included by controls.pp
{****************************************************************************** {******************************************************************************
TControl TControl
****************************************************************************** ******************************************************************************
@ -252,9 +254,26 @@ begin
Result := ClientRect.Right; Result := ClientRect.Right;
end; end;
{------------------------------------------------------------------------------
function TControl.IsHelpContextStored: boolean;
------------------------------------------------------------------------------}
function TControl.IsHelpContextStored: boolean; function TControl.IsHelpContextStored: boolean;
begin begin
Result:=false; if ActionLink=nil then
Result := HelpContext<>0
else
Result := not ActionLink.IsHelpContextLinked;
end;
{------------------------------------------------------------------------------
function TControl.IsHelpKeyWordStored: boolean;
------------------------------------------------------------------------------}
function TControl.IsHelpKeyWordStored: boolean;
begin
if ActionLink=nil then
Result := HelpKeyword<>''
else
Result := not ActionLink.IsHelpContextLinked;
end; end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------}
@ -1602,9 +1621,9 @@ begin
end; end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------
{ TControl SetHeight } TControl SetHeight
{------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TControl.SetHeight(Value: Integer); procedure TControl.SetHeight(Value: Integer);
begin begin
{$IFDEF CHECK_POSITION} {$IFDEF CHECK_POSITION}
@ -1613,21 +1632,27 @@ begin
SetBounds(FLeft, FTop, FWidth, Value); SetBounds(FLeft, FTop, FWidth, Value);
end; end;
{------------------------------------------------------------------------------
procedure TControl.SetHelpContext(const AValue: THelpContext);
------------------------------------------------------------------------------}
procedure TControl.SetHelpContext(const AValue: THelpContext); procedure TControl.SetHelpContext(const AValue: THelpContext);
begin begin
if FHelpContext=AValue then exit; if FHelpContext=AValue then exit;
FHelpContext:=AValue; FHelpContext:=AValue;
end; end;
{------------------------------------------------------------------------------
procedure TControl.SetHelpKeyword(const AValue: String);
------------------------------------------------------------------------------}
procedure TControl.SetHelpKeyword(const AValue: String); procedure TControl.SetHelpKeyword(const AValue: String);
begin begin
if FHelpKeyword=AValue then exit; if FHelpKeyword=AValue then exit;
FHelpKeyword:=AValue; FHelpKeyword:=AValue;
end; end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------
{ TControl SetParent } Procedure TControl.SetParent(AParent : TWinControl);
{------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TControl.SetParent(AParent : TWinControl); Procedure TControl.SetParent(AParent : TWinControl);
begin begin
{ if AParent = nil { if AParent = nil
@ -2077,8 +2102,13 @@ end;
{$C-} {$C-}
{$ENDIF} {$ENDIF}
// included by controls.pp
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.122 2003/04/11 08:09:26 mattias
published TControl help properties
Revision 1.121 2003/04/10 09:22:42 mattias Revision 1.121 2003/04/10 09:22:42 mattias
implemented changing dependency version implemented changing dependency version