mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 03:58:15 +02:00
LCL: rename Menus.Shortcut function back to its Delphi compatible name.
git-svn-id: trunk@29859 -
This commit is contained in:
parent
9fae2501ab
commit
4e6e7a17b8
@ -1672,7 +1672,7 @@ begin
|
|||||||
FEndOfTokenChr := '()[].';
|
FEndOfTokenChr := '()[].';
|
||||||
fEditors := TList.Create;
|
fEditors := TList.Create;
|
||||||
fEditstuffs := TList.Create;
|
fEditstuffs := TList.Create;
|
||||||
fShortCut := Key2ShortCut(Ord(' '), [ssCtrl]);
|
fShortCut := Menus.ShortCut(Ord(' '), [ssCtrl]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynCompletion.SetShortCut(Value: TShortCut);
|
procedure TSynCompletion.SetShortCut(Value: TShortCut);
|
||||||
@ -1858,7 +1858,7 @@ begin
|
|||||||
fEditstuffs := TList.Create;
|
fEditstuffs := TList.Create;
|
||||||
FEndOfTokenChr := '()[].';
|
FEndOfTokenChr := '()[].';
|
||||||
fAutoCompleteList := TStringList.Create;
|
fAutoCompleteList := TStringList.Create;
|
||||||
fShortCut := Key2ShortCut(Ord(' '), [ssShift]);
|
fShortCut := Menus.ShortCut(Ord(' '), [ssShift]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynAutoComplete.SetShortCut(Value: TShortCut);
|
procedure TSynAutoComplete.SetShortCut(Value: TShortCut);
|
||||||
|
@ -725,7 +725,7 @@ end;
|
|||||||
|
|
||||||
function TSynEditKeyStroke.GetShortCut: TShortCut;
|
function TSynEditKeyStroke.GetShortCut: TShortCut;
|
||||||
begin
|
begin
|
||||||
Result := Key2ShortCut(Key, Shift);
|
Result := Menus.ShortCut(Key, Shift);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSynEditKeyStroke.GetCommand: TSynEditorCommand;
|
function TSynEditKeyStroke.GetCommand: TSynEditorCommand;
|
||||||
@ -819,7 +819,7 @@ end;
|
|||||||
|
|
||||||
function TSynEditKeyStroke.GetShortCut2: TShortCut;
|
function TSynEditKeyStroke.GetShortCut2: TShortCut;
|
||||||
begin
|
begin
|
||||||
Result := Key2ShortCut(Key2, Shift2);
|
Result := Menus.ShortCut(Key2, Shift2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{begin} //ac 2000-07-05
|
{begin} //ac 2000-07-05
|
||||||
|
@ -363,8 +363,8 @@ begin
|
|||||||
fShortCuts[mcRecord] := QMenus.ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
fShortCuts[mcRecord] := QMenus.ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
||||||
fShortCuts[mcPlayback] := QMenus.ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
fShortCuts[mcPlayback] := QMenus.ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
fShortCuts[mcRecord] := Key2ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
fShortCuts[mcRecord] := Menus.ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
||||||
fShortCuts[mcPlayback] := Key2ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
fShortCuts[mcPlayback] := Menus.ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2034,7 +2034,7 @@ begin
|
|||||||
OnKeyPress:=@OnSynCompletionKeyPress;
|
OnKeyPress:=@OnSynCompletionKeyPress;
|
||||||
OnUTF8KeyPress:=@OnSynCompletionUTF8KeyPress;
|
OnUTF8KeyPress:=@OnSynCompletionUTF8KeyPress;
|
||||||
OnPositionChanged:=@OnSynCompletionPositionChanged;
|
OnPositionChanged:=@OnSynCompletionPositionChanged;
|
||||||
ShortCut:=Key2ShortCut(VK_UNKNOWN,[]);
|
ShortCut:=Menus.ShortCut(VK_UNKNOWN,[]);
|
||||||
TheForm.ShowSizeDrag := True;
|
TheForm.ShowSizeDrag := True;
|
||||||
TheForm.Width := Max(50, EnvironmentOptions.CompletionWindowWidth);
|
TheForm.Width := Max(50, EnvironmentOptions.CompletionWindowWidth);
|
||||||
TheForm.NbLinesInWindow := Max(3, EnvironmentOptions.CompletionWindowHeight);
|
TheForm.NbLinesInWindow := Max(3, EnvironmentOptions.CompletionWindowHeight);
|
||||||
|
@ -4651,7 +4651,7 @@ begin
|
|||||||
|
|
||||||
Dlg.AutoSize:=true;
|
Dlg.AutoSize:=true;
|
||||||
if Dlg.ShowModal=mrOk then begin
|
if Dlg.ShowModal=mrOk then begin
|
||||||
NewValue:=Key2ShortCut(Box.Key,Box.ShiftState);
|
NewValue:=Menus.ShortCut(Box.Key,Box.ShiftState);
|
||||||
if OldValue<>NewValue then
|
if OldValue<>NewValue then
|
||||||
SetOrdValue(NewValue);
|
SetOrdValue(NewValue);
|
||||||
end;
|
end;
|
||||||
|
@ -282,7 +282,7 @@ begin
|
|||||||
if AccelIndex > -1 then
|
if AccelIndex > -1 then
|
||||||
begin
|
begin
|
||||||
OldShortCut := FShortCut;
|
OldShortCut := FShortCut;
|
||||||
FShortCut := Key2ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
FShortCut := Menus.ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
||||||
TWSButtonClass(WidgetSetClass).SetShortCut(Self, OldShortCut);
|
TWSButtonClass(WidgetSetClass).SetShortCut(Self, OldShortCut);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -217,7 +217,7 @@ begin
|
|||||||
if AccelIndex > -1 then
|
if AccelIndex > -1 then
|
||||||
begin
|
begin
|
||||||
OldShortCut := FShortCut;
|
OldShortCut := FShortCut;
|
||||||
FShortCut := Key2ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
FShortCut := Menus.ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
||||||
TWSCustomCheckBoxClass(WidgetSetClass).SetShortCut(Self, OldShortCut);
|
TWSCustomCheckBoxClass(WidgetSetClass).SetShortCut(Self, OldShortCut);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -262,7 +262,7 @@ var
|
|||||||
ShiftState: TShiftState;
|
ShiftState: TShiftState;
|
||||||
begin
|
begin
|
||||||
ShiftState := KeyDataToShiftState(Message.KeyData);
|
ShiftState := KeyDataToShiftState(Message.KeyData);
|
||||||
Shortcut := Key2ShortCut(Message.CharCode, ShiftState);
|
Shortcut := Menus.ShortCut(Message.CharCode, ShiftState);
|
||||||
Item := FindItem(Shortcut, fkShortcut);
|
Item := FindItem(Shortcut, fkShortcut);
|
||||||
Result := not (csDesigning in ComponentState) and (Item <> nil);
|
Result := not (csDesigning in ComponentState) and (Item <> nil);
|
||||||
//DebugLn(['TMenu.IsShortcut ',dbgsName(Self),' Result=',Result,' Message.CharCode=',Message.CharCode,' ShiftState=',dbgs(ShiftState)]);
|
//DebugLn(['TMenu.IsShortcut ',dbgsName(Self),' Result=',Result,' Message.CharCode=',Message.CharCode,' ShiftState=',dbgs(ShiftState)]);
|
||||||
|
@ -1421,10 +1421,10 @@ end;
|
|||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TMenuItem.ShortcutChanged
|
Method: TMenuItem.ShortcutChanged
|
||||||
Params: OldValue: Old Key2ShortCut, Value: New Key2ShortCut
|
Params: OldValue: Old shortcut, Value: New shortcut
|
||||||
Returns: Nothing
|
Returns: Nothing
|
||||||
|
|
||||||
Installs a new Key2ShortCut, removes an old one.
|
Installs a new shortCut, removes an old one.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TMenuItem.ShortcutChanged(const OldValue: TShortcut);
|
procedure TMenuItem.ShortcutChanged(const OldValue: TShortcut);
|
||||||
begin
|
begin
|
||||||
|
@ -416,7 +416,7 @@ type
|
|||||||
property OnClose: TNotifyEvent read FOnClose write FOnClose;
|
property OnClose: TNotifyEvent read FOnClose write FOnClose;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function Key2ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
function ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
||||||
procedure ShortCutToKey(const ShortCut : TShortCut; var Key: Word;
|
procedure ShortCutToKey(const ShortCut : TShortCut; var Key: Word;
|
||||||
var Shift : TShiftState);
|
var Shift : TShiftState);
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ end;
|
|||||||
{$I popupmenu.inc}
|
{$I popupmenu.inc}
|
||||||
{$I menuactionlink.inc}
|
{$I menuactionlink.inc}
|
||||||
|
|
||||||
function Key2ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
function ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
||||||
begin
|
begin
|
||||||
Result := LCLType.KeyToShortCut(Key,Shift);
|
Result := LCLType.KeyToShortCut(Key,Shift);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user