mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:36: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;
|
function HelpKeyword(Sender: TObject; const Position: TPoint;
|
||||||
const Keyword: String): Boolean;
|
const Keyword: String): Boolean;
|
||||||
function HelpKeyword(const Keyword: String): Boolean;
|
function HelpKeyword(const Keyword: String): Boolean;
|
||||||
procedure ShowHelpForObjecct(Sender: TObject);
|
procedure ShowHelpForObject(Sender: TObject);
|
||||||
procedure HideAllFormsWithStayOnTop;
|
procedure HideAllFormsWithStayOnTop;
|
||||||
function IsWaiting: boolean;
|
function IsWaiting: boolean;
|
||||||
procedure CancelHint;
|
procedure CancelHint;
|
||||||
|
@ -978,7 +978,7 @@ begin
|
|||||||
Result:=HelpKeyword(nil,Point(0,0),Keyword);
|
Result:=HelpKeyword(nil,Point(0,0),Keyword);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TApplication.ShowHelpForObjecct(Sender: TObject);
|
procedure TApplication.ShowHelpForObject(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Sender is TControl then begin
|
if Sender is TControl then begin
|
||||||
TControl(Sender).ShowHelp;
|
TControl(Sender).ShowHelp;
|
||||||
@ -1293,8 +1293,8 @@ begin
|
|||||||
i:=FApplicationHandlers[ahtKeyDownAfter].Count;
|
i:=FApplicationHandlers[ahtKeyDownAfter].Count;
|
||||||
while FApplicationHandlers[ahtKeyDownAfter].NextDownIndex(i) do
|
while FApplicationHandlers[ahtKeyDownAfter].NextDownIndex(i) do
|
||||||
TKeyEvent(FApplicationHandlers[ahtKeyDownAfter][i])(Sender,Key,Shift);
|
TKeyEvent(FApplicationHandlers[ahtKeyDownAfter][i])(Sender,Key,Shift);
|
||||||
if (Shift=[]) and (Key=VK_F1) then
|
if WidgetSet.IsHelpKey(Key, Shift) then
|
||||||
ShowHelpForObjecct(Sender);
|
ShowHelpForObject(Sender);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TApplication.ControlKeyDown(Sender: TObject; var Key: Word;
|
procedure TApplication.ControlKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
@ -1030,6 +1030,12 @@ begin
|
|||||||
Result := false;
|
Result := false;
|
||||||
end;
|
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;
|
function TWidgetSet.AppHandle: Thandle;
|
||||||
begin
|
begin
|
||||||
DebugLn('Warning: AppHandle is not implemented for this widgetset yet');
|
DebugLn('Warning: AppHandle is not implemented for this widgetset yet');
|
||||||
|
@ -93,6 +93,7 @@ type
|
|||||||
procedure SetDesigning(AComponent: TComponent); virtual; abstract;
|
procedure SetDesigning(AComponent: TComponent); virtual; abstract;
|
||||||
|
|
||||||
function InitHintFont(HintFont: TObject): Boolean; virtual;
|
function InitHintFont(HintFont: TObject): Boolean; virtual;
|
||||||
|
function IsHelpKey(Key: Word; Shift: TShiftState): Boolean; virtual;
|
||||||
|
|
||||||
// create and destroy
|
// create and destroy
|
||||||
function CreateComponent(Sender : TObject): THandle; virtual; abstract;
|
function CreateComponent(Sender : TObject): THandle; virtual; abstract;
|
||||||
|
Loading…
Reference in New Issue
Block a user