mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 19:30:06 +01:00
lcl: implement TMenu.GetHelpContext
git-svn-id: trunk@22742 -
This commit is contained in:
parent
ecc39989c4
commit
a49f888148
@ -233,6 +233,17 @@ begin
|
||||
Result:=Find(Items);
|
||||
end;
|
||||
|
||||
function TMenu.GetHelpContext(AValue: PtrInt; ByCommand: Boolean): THelpContext;
|
||||
const
|
||||
FindKind: array[Boolean] of TFindItemKind = (fkHandle, fkCommand);
|
||||
var
|
||||
Item: TMenuItem;
|
||||
begin
|
||||
Item := FindItem(AValue, FindKind[ByCommand]);
|
||||
if Item <> nil then
|
||||
Result := Item.HelpContext;
|
||||
end;
|
||||
|
||||
function TMenu.IsShortcut(var Message: TLMKey): boolean;
|
||||
var
|
||||
Item: TMenuItem;
|
||||
|
||||
@ -342,6 +342,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure DestroyHandle; virtual;
|
||||
function FindItem(AValue: PtrInt; Kind: TFindItemKind) : TMenuItem;
|
||||
function GetHelpContext(AValue: PtrInt; ByCommand: Boolean): THelpContext;
|
||||
function IsShortcut(var Message: TLMKey): boolean;
|
||||
function HandleAllocated: Boolean;
|
||||
function IsRightToLeft: Boolean; virtual;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user