mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 15:36:03 +02:00
MG: added keymapping to designer
git-svn-id: trunk@3305 -
This commit is contained in:
parent
109aaa2ab7
commit
93a2f932e9
@ -39,7 +39,8 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, AbstractFormeditor, Controls, PropEdits, TypInfo, ObjectInspector,
|
||||
Forms, IDEComp, JITForms, Compreg, ComponentEditors, Dialogs;
|
||||
Forms, IDEComp, JITForms, Compreg, ComponentEditors, KeyMapping,
|
||||
EditorOptions, Dialogs;
|
||||
|
||||
Const OrdinalTypes = [tkInteger,tkChar,tkENumeration,tkbool];
|
||||
|
||||
@ -142,13 +143,15 @@ TCustomFormEditor
|
||||
OwnerComponent: TComponent): string;
|
||||
// Function CreateComponent(CI : TIComponentInterface; TypeName : String;
|
||||
Function CreateComponentInterface(AComponent: TComponent): TIComponentInterface;
|
||||
|
||||
Function CreateComponent(ParentCI : TIComponentInterface;
|
||||
TypeClass : TComponentClass; X,Y,W,H : Integer): TIComponentInterface; override;
|
||||
Function CreateFormFromStream(BinStream: TStream): TIComponentInterface; override;
|
||||
Procedure SetFormNameAndClass(CI: TIComponentInterface;
|
||||
const NewFormName, NewClassName: shortstring);
|
||||
Procedure ClearSelected;
|
||||
|
||||
function TranslateKeyToDesignerCommand(Key: word; Shift: TShiftState): integer;
|
||||
|
||||
property SelectedComponents: TComponentSelectionList
|
||||
read FSelectedComponents write SetSelectedComponents;
|
||||
property Obj_Inspector : TObjectInspector
|
||||
@ -159,6 +162,7 @@ TCustomFormEditor
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
@ -897,6 +901,12 @@ Begin
|
||||
FSelectedComponents.Clear;
|
||||
end;
|
||||
|
||||
function TCustomFormEditor.TranslateKeyToDesignerCommand(Key: word;
|
||||
Shift: TShiftState): integer;
|
||||
begin
|
||||
Result:=EditorOpts.KeyMap.TranslateKey(Key,Shift,[caDesigner]);
|
||||
end;
|
||||
|
||||
Function TCustomFormEditor.CreateComponentInterface(
|
||||
AComponent: TComponent): TIComponentInterface;
|
||||
Begin
|
||||
|
@ -1677,7 +1677,7 @@ begin
|
||||
ASynEdit.MaxUndo:=fUndoLimit;
|
||||
GetSynEditSelectedColor(ASynEdit);
|
||||
|
||||
KeyMap.AssignTo(ASynEdit.KeyStrokes);
|
||||
KeyMap.AssignTo(ASynEdit.KeyStrokes,[caSourceEditor]);
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.SetSynEditSettings(ASynEdit:TSynEdit);
|
||||
@ -1753,7 +1753,7 @@ begin
|
||||
ASynEdit.ExtraLineSpacing:=fExtraLineSpacing;
|
||||
ASynEdit.ReadOnly:=true;
|
||||
|
||||
KeyMap.AssignTo(ASynEdit.KeyStrokes);
|
||||
KeyMap.AssignTo(ASynEdit.KeyStrokes,[caSourceEditor]);
|
||||
end;
|
||||
|
||||
|
||||
@ -1910,7 +1910,7 @@ begin
|
||||
if EditorOpts.UseSyntaxHighlight then
|
||||
Highlighter:=PreviewSyn;
|
||||
EditorOpts.GetSynEditSettings(PreviewEdits[a]);
|
||||
EditorOpts.KeyMap.AssignTo(PreviewEdits[a].KeyStrokes);
|
||||
EditorOpts.KeyMap.AssignTo(PreviewEdits[a].KeyStrokes,[caSourceEditor]);
|
||||
if a<>3 then begin
|
||||
Lines.Text:=EditorOpts.HighlighterList[CurLanguageID].SampleSource;
|
||||
PreviewEdits[a].Options:=PreviewEdits[a].Options
|
||||
@ -2530,7 +2530,7 @@ begin
|
||||
ANode.Text:=KeyMappingRelationToString(ARelation);
|
||||
for i:=Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[i]<>nil then
|
||||
EditorOpts.KeyMap.AssignTo(PreviewEdits[i].KeyStrokes);
|
||||
EditorOpts.KeyMap.AssignTo(PreviewEdits[i].KeyStrokes,[caSourceEditor]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user