mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 07:38:14 +02:00
LCL Application: help key depends on widgetset
git-svn-id: trunk@12923 -
This commit is contained in:
parent
deb98c5756
commit
b81ab6be63
@ -1033,7 +1033,7 @@ type
|
||||
function HelpKeyword(Sender: TObject; const Position: TPoint;
|
||||
const Keyword: String): Boolean;
|
||||
function HelpKeyword(const Keyword: String): Boolean;
|
||||
procedure ShowHelpForObjecct(Sender: TObject);
|
||||
procedure ShowHelpForObject(Sender: TObject);
|
||||
procedure HideAllFormsWithStayOnTop;
|
||||
function IsWaiting: boolean;
|
||||
procedure CancelHint;
|
||||
|
@ -978,7 +978,7 @@ begin
|
||||
Result:=HelpKeyword(nil,Point(0,0),Keyword);
|
||||
end;
|
||||
|
||||
procedure TApplication.ShowHelpForObjecct(Sender: TObject);
|
||||
procedure TApplication.ShowHelpForObject(Sender: TObject);
|
||||
begin
|
||||
if Sender is TControl then begin
|
||||
TControl(Sender).ShowHelp;
|
||||
@ -1293,8 +1293,8 @@ begin
|
||||
i:=FApplicationHandlers[ahtKeyDownAfter].Count;
|
||||
while FApplicationHandlers[ahtKeyDownAfter].NextDownIndex(i) do
|
||||
TKeyEvent(FApplicationHandlers[ahtKeyDownAfter][i])(Sender,Key,Shift);
|
||||
if (Shift=[]) and (Key=VK_F1) then
|
||||
ShowHelpForObjecct(Sender);
|
||||
if WidgetSet.IsHelpKey(Key, Shift) then
|
||||
ShowHelpForObject(Sender);
|
||||
end;
|
||||
|
||||
procedure TApplication.ControlKeyDown(Sender: TObject; var Key: Word;
|
||||
|
@ -1030,6 +1030,12 @@ begin
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
function TWidgetSet.IsHelpKey(Key: Word; Shift: TShiftState): Boolean;
|
||||
{ Asks if the passed key is determined by widgetset to show help }
|
||||
begin
|
||||
Result := (Shift = []) and (Key = VK_F1);
|
||||
end;
|
||||
|
||||
function TWidgetSet.AppHandle: Thandle;
|
||||
begin
|
||||
DebugLn('Warning: AppHandle is not implemented for this widgetset yet');
|
||||
|
@ -93,6 +93,7 @@ type
|
||||
procedure SetDesigning(AComponent: TComponent); virtual; abstract;
|
||||
|
||||
function InitHintFont(HintFont: TObject): Boolean; virtual;
|
||||
function IsHelpKey(Key: Word; Shift: TShiftState): Boolean; virtual;
|
||||
|
||||
// create and destroy
|
||||
function CreateComponent(Sender : TObject): THandle; virtual; abstract;
|
||||
|
Loading…
Reference in New Issue
Block a user