mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 03:46:01 +02:00
SynEdit, Mouse Actions: Added Priority
git-svn-id: trunk@20529 -
This commit is contained in:
parent
b1baba1df8
commit
ba5c46c5be
@ -594,7 +594,7 @@ type
|
||||
procedure FindAndHandleMouseAction(AButton: TMouseButton; AShift: TShiftState;
|
||||
X, Y: Integer; ACCount:TSynMAClickCount;
|
||||
ADir: TSynMAClickDir);
|
||||
function DoHandleMouseAction(AnAction: TSynEditMouseAction;
|
||||
function DoHandleMouseAction(AnActionList: TSynEditMouseActions;
|
||||
AnInfo: TSynEditMouseActionInfo): Boolean;
|
||||
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
@ -2423,7 +2423,7 @@ begin
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
|
||||
function TCustomSynEdit.DoHandleMouseAction(AnAction: TSynEditMouseAction;
|
||||
function TCustomSynEdit.DoHandleMouseAction(AnActionList: TSynEditMouseActions;
|
||||
AnInfo: TSynEditMouseActionInfo): Boolean;
|
||||
var
|
||||
CaretDone: Boolean;
|
||||
@ -2438,112 +2438,121 @@ var
|
||||
PrimarySelText: String;
|
||||
ACommand: TSynEditorMouseCommand;
|
||||
Handled: Boolean;
|
||||
AnAction: TSynEditMouseAction;
|
||||
begin
|
||||
if AnAction = nil then exit(False);
|
||||
ACommand := AnAction.Command;
|
||||
AnInfo.CaretDone := False;
|
||||
AnAction := nil;
|
||||
Result := False;
|
||||
while not Result do begin
|
||||
AnAction := AnActionList.FindCommand(AnInfo, AnAction);
|
||||
|
||||
Result := FGutter.DoHandleMouseAction(AnAction, AnInfo);
|
||||
if Result then begin
|
||||
if (not AnInfo.CaretDone) and AnAction.MoveCaret then
|
||||
MoveCaret;
|
||||
exit;
|
||||
end;
|
||||
if AnAction = nil then exit(False);
|
||||
ACommand := AnAction.Command;
|
||||
AnInfo.CaretDone := False;
|
||||
|
||||
Result := True;
|
||||
CaretDone := False;
|
||||
MouseCapture := False;
|
||||
|
||||
case ACommand of
|
||||
emcNone: ; // do nothing, but result := true
|
||||
emcStartSelections, emcStartColumnSelections, emcStartLineSelections:
|
||||
begin
|
||||
if AnAction.Option = emcoSelectionContinue then
|
||||
FBlockSelection.EndLineBytePos := AnInfo.NewCaret.LineBytePos
|
||||
else begin
|
||||
MoveCaret;
|
||||
FBlockSelection.StartLineBytePos := AnInfo.NewCaret.LineBytePos;
|
||||
end;
|
||||
case ACommand of
|
||||
emcStartColumnSelections:
|
||||
FBlockSelection.ActiveSelectionMode := smColumn;
|
||||
emcStartLineSelections:
|
||||
begin
|
||||
if ACommand = emcStartLineSelections then
|
||||
SetLineBlock(AnInfo.NewCaret.LineBytePos, True);
|
||||
FBlockSelection.ActiveSelectionMode := smLine;
|
||||
end;
|
||||
else
|
||||
FBlockSelection.ActiveSelectionMode := FBlockSelection.SelectionMode;
|
||||
end;
|
||||
MouseCapture := True;
|
||||
Include(fStateFlags, sfMouseSelecting);
|
||||
end;
|
||||
emcSelectWord:
|
||||
begin
|
||||
if not (eoNoSelection in fOptions) then
|
||||
SetWordBlock(AnInfo.NewCaret.LineBytePos);
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
emcSelectLine:
|
||||
begin
|
||||
if not (eoNoSelection in fOptions) then
|
||||
SetLineBlock(AnInfo.NewCaret.LineBytePos, AnAction.Option = emcoSelectLineFull);
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
emcSelectPara:
|
||||
begin
|
||||
if not (eoNoSelection in fOptions) then
|
||||
SetParagraphBlock(AnInfo.NewCaret.LineBytePos);
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
emcStartDragMove:
|
||||
begin
|
||||
if SelAvail and (SelectionMode = smNormal) then begin
|
||||
Include(fStateFlags, sfWaitForDragging);
|
||||
MouseCapture := True;
|
||||
end
|
||||
else
|
||||
Result := False; // Currently only drags smNormal
|
||||
end;
|
||||
emcPasteSelection:
|
||||
begin
|
||||
Result := FGutter.DoHandleMouseAction(AnAction, AnInfo);
|
||||
if Result then begin
|
||||
if (not AnInfo.CaretDone) and AnAction.MoveCaret then
|
||||
MoveCaret;
|
||||
PrimarySelText := PrimarySelection.AsText;
|
||||
if ((PrimarySelText<>'') or SelAvail) then begin
|
||||
FBlockSelection.StartLineBytePos := AnInfo.NewCaret.LineBytePos;
|
||||
FBlockSelection.EndLineBytePos := AnInfo.NewCaret.LineBytePos;
|
||||
SelText:=PrimarySelText;
|
||||
end
|
||||
else
|
||||
Result :=False;
|
||||
end;
|
||||
emcMouseLink:
|
||||
begin
|
||||
if assigned(FOnClickLink) then
|
||||
FOnClickLink(Self, AnInfo.Button, AnInfo.Shift, AnInfo.MouseX, AnInfo.MouseY)
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
emcContextMenu:
|
||||
begin
|
||||
Handled := False;
|
||||
inherited DoContextPopup(Point(AnInfo.MouseX, AnInfo.MouseY), Handled);
|
||||
if (PopupMenu <> nil) and not Handled then
|
||||
PopupMenu.PopUp;
|
||||
end;
|
||||
emcSynEditCommand:
|
||||
begin
|
||||
if AnAction.MoveCaret then
|
||||
MoveCaret;
|
||||
CommandProcessor(AnAction.Option, #0, nil);
|
||||
end;
|
||||
else
|
||||
Result := False; // ACommand was not handled => Fallback to parent Context
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
|
||||
if Result and (not CaretDone) and AnAction.MoveCaret then
|
||||
MoveCaret;
|
||||
Result := True;
|
||||
CaretDone := False;
|
||||
MouseCapture := False;
|
||||
|
||||
case ACommand of
|
||||
emcNone: ; // do nothing, but result := true
|
||||
emcStartSelections, emcStartColumnSelections, emcStartLineSelections:
|
||||
begin
|
||||
if AnAction.Option = emcoSelectionContinue then
|
||||
FBlockSelection.EndLineBytePos := AnInfo.NewCaret.LineBytePos
|
||||
else begin
|
||||
MoveCaret;
|
||||
FBlockSelection.StartLineBytePos := AnInfo.NewCaret.LineBytePos;
|
||||
end;
|
||||
case ACommand of
|
||||
emcStartColumnSelections:
|
||||
FBlockSelection.ActiveSelectionMode := smColumn;
|
||||
emcStartLineSelections:
|
||||
begin
|
||||
if ACommand = emcStartLineSelections then
|
||||
SetLineBlock(AnInfo.NewCaret.LineBytePos, True);
|
||||
FBlockSelection.ActiveSelectionMode := smLine;
|
||||
end;
|
||||
else
|
||||
FBlockSelection.ActiveSelectionMode := FBlockSelection.SelectionMode;
|
||||
end;
|
||||
MouseCapture := True;
|
||||
Include(fStateFlags, sfMouseSelecting);
|
||||
end;
|
||||
emcSelectWord:
|
||||
begin
|
||||
if not (eoNoSelection in fOptions) then
|
||||
SetWordBlock(AnInfo.NewCaret.LineBytePos);
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
emcSelectLine:
|
||||
begin
|
||||
if not (eoNoSelection in fOptions) then
|
||||
SetLineBlock(AnInfo.NewCaret.LineBytePos, AnAction.Option = emcoSelectLineFull);
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
emcSelectPara:
|
||||
begin
|
||||
if not (eoNoSelection in fOptions) then
|
||||
SetParagraphBlock(AnInfo.NewCaret.LineBytePos);
|
||||
MouseCapture := FALSE;
|
||||
end;
|
||||
emcStartDragMove:
|
||||
begin
|
||||
if SelAvail and (SelectionMode = smNormal) then begin
|
||||
Include(fStateFlags, sfWaitForDragging);
|
||||
MouseCapture := True;
|
||||
end
|
||||
else
|
||||
Result := False; // Currently only drags smNormal
|
||||
end;
|
||||
emcPasteSelection:
|
||||
begin
|
||||
MoveCaret;
|
||||
PrimarySelText := PrimarySelection.AsText;
|
||||
if ((PrimarySelText<>'') or SelAvail) then begin
|
||||
FBlockSelection.StartLineBytePos := AnInfo.NewCaret.LineBytePos;
|
||||
FBlockSelection.EndLineBytePos := AnInfo.NewCaret.LineBytePos;
|
||||
SelText:=PrimarySelText;
|
||||
end
|
||||
else
|
||||
Result :=False;
|
||||
end;
|
||||
emcMouseLink:
|
||||
begin
|
||||
if assigned(fMarkupCtrlMouse) and fMarkupCtrlMouse.IsMouseOverLink and
|
||||
assigned(FOnClickLink)
|
||||
then
|
||||
FOnClickLink(Self, AnInfo.Button, AnInfo.Shift, AnInfo.MouseX, AnInfo.MouseY)
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
emcContextMenu:
|
||||
begin
|
||||
Handled := False;
|
||||
inherited DoContextPopup(Point(AnInfo.MouseX, AnInfo.MouseY), Handled);
|
||||
if (PopupMenu <> nil) and not Handled then
|
||||
PopupMenu.PopUp;
|
||||
end;
|
||||
emcSynEditCommand:
|
||||
begin
|
||||
if AnAction.MoveCaret then
|
||||
MoveCaret;
|
||||
CommandProcessor(AnAction.Option, #0, nil);
|
||||
end;
|
||||
else
|
||||
Result := False; // ACommand was not handled => Fallback to parent Context
|
||||
end;
|
||||
|
||||
if Result and (not CaretDone) and AnAction.MoveCaret then
|
||||
MoveCaret;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.FindAndHandleMouseAction(AButton: TMouseButton;
|
||||
@ -2573,9 +2582,9 @@ begin
|
||||
if SelAvail and (X >= fGutterWidth + 2) and
|
||||
IsPointInSelection(FInternalCaret.LineBytePos)
|
||||
then
|
||||
if DoHandleMouseAction(FMouseSelActions.FindCommand(Info), Info) then
|
||||
if DoHandleMouseAction(FMouseSelActions, Info) then
|
||||
exit;
|
||||
DoHandleMouseAction(FMouseActions.FindCommand(Info), Info);
|
||||
DoHandleMouseAction(FMouseActions, Info);
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
|
@ -105,6 +105,7 @@ type
|
||||
private
|
||||
FClickDir: TSynMAClickDir;
|
||||
FOption: TSynEditorMouseCommandOpt;
|
||||
FPriority: TSynEditorMouseCommandOpt;
|
||||
FShift, FShiftMask: TShiftState;
|
||||
FButton: TMouseButton;
|
||||
FClickCount: TSynMAClickCount;
|
||||
@ -116,6 +117,7 @@ type
|
||||
procedure SetCommand(const AValue: TSynEditorMouseCommand);
|
||||
procedure SetMoveCaret(const AValue: Boolean);
|
||||
procedure SetOption(const AValue: TSynEditorMouseCommandOpt);
|
||||
procedure SetPriority(const AValue: TSynEditorMouseCommandOpt);
|
||||
procedure SetShift(const AValue: TShiftState);
|
||||
procedure SetShiftMask(const AValue: TShiftState);
|
||||
protected
|
||||
@ -137,11 +139,9 @@ type
|
||||
property Command: TSynEditorMouseCommand read FCommand write SetCommand;
|
||||
property MoveCaret: Boolean read FMoveCaret write SetMoveCaret;
|
||||
property Option: TSynEditorMouseCommandOpt read FOption write SetOption;
|
||||
property Priority: TSynEditorMouseCommandOpt read FPriority write SetPriority;
|
||||
end;
|
||||
|
||||
TSynEditMouseActionHandler = function(AnAction: TSynEditMouseAction;
|
||||
AnInfo: TSynEditMouseActionInfo): Boolean of object;
|
||||
|
||||
{ TSynEditMouseActions }
|
||||
|
||||
TSynEditMouseActions = class(TCollection)
|
||||
@ -158,7 +158,8 @@ type
|
||||
function Add: TSynEditMouseAction;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
procedure AssertNoConflict(MAction: TSynEditMouseAction);
|
||||
function FindCommand(AnInfo: TSynEditMouseActionInfo): TSynEditMouseAction;
|
||||
function FindCommand(AnInfo: TSynEditMouseActionInfo;
|
||||
APrevious: TSynEditMouseAction = nil): TSynEditMouseAction;
|
||||
procedure ResetDefaults; virtual;
|
||||
procedure IncAssertLock;
|
||||
procedure DecAssertLock;
|
||||
@ -188,6 +189,9 @@ type
|
||||
procedure ResetDefaults; override;
|
||||
end;
|
||||
|
||||
TSynEditMouseActionHandler = function(AnActionList: TSynEditMouseActions;
|
||||
AnInfo: TSynEditMouseActionInfo): Boolean of object;
|
||||
|
||||
function MouseCommandName(emc: TSynEditorMouseCommand): String;
|
||||
function MouseCommandConfigName(emc: TSynEditorMouseCommand): String;
|
||||
|
||||
@ -287,6 +291,14 @@ begin
|
||||
TSynEditMouseActions(Collection).AssertNoConflict(self);
|
||||
end;
|
||||
|
||||
procedure TSynEditMouseAction.SetPriority(const AValue: TSynEditorMouseCommandOpt);
|
||||
begin
|
||||
if FPriority = AValue then exit;
|
||||
FPriority := AValue;
|
||||
if Collection <> nil then
|
||||
TSynEditMouseActions(Collection).AssertNoConflict(self);
|
||||
end;
|
||||
|
||||
procedure TSynEditMouseAction.SetShift(const AValue: TShiftState);
|
||||
begin
|
||||
if FShift = AValue then exit;
|
||||
@ -320,6 +332,7 @@ begin
|
||||
FShiftMask := TSynEditMouseAction(Source).ShiftMask;
|
||||
FMoveCaret := TSynEditMouseAction(Source).MoveCaret;
|
||||
FOption := TSynEditMouseAction(Source).Option;
|
||||
FPriority := TSynEditMouseAction(Source).Priority;
|
||||
end else
|
||||
inherited Assign(Source);
|
||||
if Collection <> nil then
|
||||
@ -355,7 +368,8 @@ begin
|
||||
and ((Other.Command <> self.Command) or // Only conflicts, if Command differs
|
||||
(Other.MoveCaret <> self.MoveCaret) or
|
||||
(Other.Option <> self.Option) )
|
||||
and not(Other.IsFallback xor self.IsFallback);
|
||||
and not(Other.IsFallback xor self.IsFallback)
|
||||
and (Other.Priority = self.Priority);
|
||||
end;
|
||||
|
||||
function TSynEditMouseAction.Equals(Other: TSynEditMouseAction;
|
||||
@ -366,6 +380,7 @@ begin
|
||||
and (Other.ClickDir = self.ClickDir)
|
||||
and (Other.Shift = self.Shift)
|
||||
and (Other.ShiftMask = self.ShiftMask)
|
||||
and (Other.Priority = self.Priority)
|
||||
and ((Other.Command = self.Command) or IgnoreCmd)
|
||||
and ((Other.Option = self.Option) or IgnoreCmd)
|
||||
and ((Other.MoveCaret = self.MoveCaret) or IgnoreCmd);
|
||||
@ -456,26 +471,45 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSynEditMouseActions.FindCommand(AnInfo: TSynEditMouseActionInfo): TSynEditMouseAction;
|
||||
function TSynEditMouseActions.FindCommand(AnInfo: TSynEditMouseActionInfo;
|
||||
APrevious: TSynEditMouseAction = nil): TSynEditMouseAction;
|
||||
var
|
||||
i: Integer;
|
||||
act, fback: TSynEditMouseAction;
|
||||
i, MinPriority: Integer;
|
||||
act, found, fback: TSynEditMouseAction;
|
||||
begin
|
||||
MinPriority := 0;
|
||||
if assigned(APrevious) then
|
||||
MinPriority := APrevious.Priority + 1;
|
||||
fback := nil;
|
||||
found := nil;
|
||||
for i := 0 to Count-1 do begin
|
||||
act := Items[i];
|
||||
if act.Priority < MinPriority then
|
||||
continue;
|
||||
|
||||
if act.IsMatchingClick(AnInfo.Button, AnInfo.CCount, AnInfo.Dir) and
|
||||
act.IsMatchingShiftState(AnInfo.Shift)
|
||||
then begin
|
||||
if act.IsFallback then
|
||||
fback := act
|
||||
else
|
||||
exit(act);
|
||||
if act.IsFallback then begin
|
||||
if (fback = nil) or (act.Priority < fback.Priority) then
|
||||
fback := act;
|
||||
end
|
||||
else begin
|
||||
if (found = nil) or (act.Priority < found.Priority) then
|
||||
found := act;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if fback <> nil then
|
||||
exit(fback);
|
||||
Result := nil;
|
||||
if found <> nil then begin
|
||||
if (fback <> nil) and (fback.Priority < found.Priority) then
|
||||
Result := fback
|
||||
else
|
||||
Result := found;
|
||||
end
|
||||
else if fback <> nil then
|
||||
Result := fback
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
procedure TSynEditMouseActions.AddCommand(const ACmd: TSynEditorMouseCommand;
|
||||
|
@ -327,7 +327,7 @@ begin
|
||||
MouseDownPart := PixelToPartIndex(AnInfo.MouseX);
|
||||
Result := Parts[MouseDownPart].MaybeHandleMouseAction(AnInfo, HandleActionProc);
|
||||
if not Result then
|
||||
Result := HandleActionProc(MouseActions.FindCommand(AnInfo), AnInfo);
|
||||
Result := HandleActionProc(MouseActions, AnInfo);
|
||||
end;
|
||||
|
||||
function TSynGutter.DoHandleMouseAction(AnAction: TSynEditMouseAction;
|
||||
|
@ -342,7 +342,7 @@ function TSynGutterPartBase.MaybeHandleMouseAction(var AnInfo: TSynEditMouseActi
|
||||
begin
|
||||
Result := False;
|
||||
if assigned(FMouseActions) then
|
||||
Result := HandleActionProc(MouseActions.FindCommand(AnInfo), AnInfo);
|
||||
Result := HandleActionProc(MouseActions, AnInfo);
|
||||
end;
|
||||
|
||||
function TSynGutterPartBase.DoHandleMouseAction(AnAction: TSynEditMouseAction;
|
||||
|
@ -156,12 +156,12 @@ begin
|
||||
Result := False;
|
||||
case FFoldView.FoldType[FFoldView.TextIndexToScreenLine(AnInfo.NewCaret.LinePos-1)] of
|
||||
cfCollapsed :
|
||||
Result := HandleActionProc(MouseActionsCollapsed.FindCommand(AnInfo), AnInfo);
|
||||
Result := HandleActionProc(MouseActionsCollapsed, AnInfo);
|
||||
cfExpanded :
|
||||
Result := HandleActionProc(MouseActionsExpanded.FindCommand(AnInfo), AnInfo);
|
||||
Result := HandleActionProc(MouseActionsExpanded, AnInfo);
|
||||
end;
|
||||
if not Result then
|
||||
Result := HandleActionProc(MouseActions.FindCommand(AnInfo), AnInfo);
|
||||
Result := HandleActionProc(MouseActions, AnInfo);
|
||||
end;
|
||||
|
||||
function TSynGutterCodeFolding.DoHandleMouseAction(AnAction: TSynEditMouseAction;
|
||||
|
@ -25,7 +25,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
Width = 475
|
||||
Align = alClient
|
||||
AutoEdit = False
|
||||
ColCount = 9
|
||||
ColCount = 10
|
||||
ExtendedSelect = False
|
||||
FixedCols = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect, goSmoothScroll, goHeaderHotTracking]
|
||||
|
@ -8,7 +8,7 @@ LazarusResources.Add('TEditorMouseOptionsFrame','FORMDATA',[
|
||||
+'b'#2#5'Align'#7#8'alClient'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3'z'
|
||||
+#1#11'ClientWidth'#3'b'#2#8'TabOrder'#2#0#0#11'TStringGrid'#10'ActionGrid'#24
|
||||
+'AnchorSideBottom.Control'#7#2'p3'#4'Left'#3#135#0#6'Height'#3'z'#1#3'Top'#2
|
||||
+#0#5'Width'#3#219#1#5'Align'#7#8'alClient'#8'AutoEdit'#8#8'ColCount'#2#9#14
|
||||
+#0#5'Width'#3#219#1#5'Align'#7#8'alClient'#8'AutoEdit'#8#8'ColCount'#2#10#14
|
||||
+'ExtendedSelect'#8#9'FixedCols'#2#0#7'Options'#11#15'goFixedVertLine'#15'goF'
|
||||
+'ixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRangeSelect'#11'goColSizin'
|
||||
+'g'#11'goRowSelect'#14'goSmoothScroll'#19'goHeaderHotTracking'#0#8'RowCount'
|
||||
|
@ -71,7 +71,7 @@ type
|
||||
FGutterActionsLines: TSynEditMouseActions;
|
||||
FCurActions: TSynEditMouseActions;
|
||||
|
||||
FSort1, FSort2, FSort3: Integer;
|
||||
FSort1, FSort2, FSort3, FSort4: Integer;
|
||||
ChangeDlg: TMouseaActionDialog;
|
||||
FColWidths: Array of Integer;
|
||||
FLastWidth: Integer;
|
||||
@ -124,17 +124,18 @@ begin
|
||||
ActionGrid.Cells[4, i] := ShiftName(ssShift);
|
||||
ActionGrid.Cells[5, i] := ShiftName(ssAlt);
|
||||
ActionGrid.Cells[6, i] := ShiftName(ssCtrl);
|
||||
ActionGrid.Cells[7, i] := MMoveName[act.MoveCaret];
|
||||
ActionGrid.Cells[8, i] := '';
|
||||
ActionGrid.Cells[7, i] := IntToStr(act.Priority);
|
||||
ActionGrid.Cells[8, i] := MMoveName[act.MoveCaret];
|
||||
ActionGrid.Cells[9, i] := '';
|
||||
if act.Command = emcSynEditCommand then begin
|
||||
j := KeyMapIndexOfCommand(FKeyMap, Act.Option);
|
||||
if (j >= 0) and (j < FKeyMap.RelationCount) then
|
||||
ActionGrid.Cells[8, i] := FKeyMap.Relations[j].GetLocalizedName;
|
||||
ActionGrid.Cells[9, i] := FKeyMap.Relations[j].GetLocalizedName;
|
||||
end
|
||||
else begin
|
||||
optlist.CommaText := MouseCommandConfigName(act.Command);
|
||||
if act.Option < optlist.Count-1 then
|
||||
ActionGrid.Cells[8, i] := optlist[act.Option+1] +' ('+optlist[0]+')';
|
||||
ActionGrid.Cells[9, i] := optlist[act.Option+1] +' ('+optlist[0]+')';
|
||||
end;
|
||||
end;
|
||||
optlist.Free;
|
||||
@ -146,6 +147,8 @@ procedure TEditorMouseOptionsFrame.ActionGridHeaderClick(Sender: TObject; IsColu
|
||||
Index: Integer);
|
||||
begin
|
||||
If Index <> FSort1 then begin
|
||||
if FSort3 <> index then
|
||||
Fsort4 := FSort3;
|
||||
if FSort2 <> index then
|
||||
Fsort3 := FSort2;
|
||||
Fsort2 := FSort1;
|
||||
@ -175,6 +178,10 @@ begin
|
||||
Result := CompareCol(FSort2);
|
||||
if Result = 0 then
|
||||
Result := CompareCol(FSort3);
|
||||
if Result = 0 then
|
||||
Result := CompareCol(FSort4);
|
||||
if Result = 0 then
|
||||
Result := CompareCol(7); // Priority
|
||||
if Result = 0 then
|
||||
Result := TSynEditMouseAction(ActionGrid.Objects[0, ARow]).ID
|
||||
- TSynEditMouseAction(ActionGrid.Objects[0, BRow]).ID;
|
||||
@ -377,14 +384,16 @@ begin
|
||||
ActionGrid.Cells[5,0] := dlgMouseOptHeadAlt;
|
||||
ActionGrid.Cells[6,0] := dlgMouseOptHeadCtrl;
|
||||
ActionGrid.Cells[7,0] := dlgMouseOptHeadCaret;
|
||||
ActionGrid.Cells[8,0] := dlgMouseOptHeadOpt;
|
||||
ActionGrid.Cells[8,0] := dlgMouseOptHeadPriority;
|
||||
ActionGrid.Cells[9,0] := dlgMouseOptHeadOpt;
|
||||
ActionGrid.ColWidths[0] := ActionGrid.ColWidths[0] * 3;
|
||||
ActionGrid.ColWidths[8] := ActionGrid.ColWidths[8] * 3;
|
||||
ActionGrid.ColWidths[9] := ActionGrid.ColWidths[8] * 3;
|
||||
ActionGridHeaderSized(nil, true, 0);
|
||||
|
||||
FSort1 := 1; // Button
|
||||
FSort2 := 2; // CCount
|
||||
FSort3 := 3; // Cdir
|
||||
FSort4 := 8; // Priority
|
||||
|
||||
DelButton.Caption := dlgMouseOptBtnDel;
|
||||
UpdateButton.Caption := dlgMouseOptBtnUdp;
|
||||
|
@ -1178,6 +1178,7 @@ resourcestring
|
||||
dlgMouseOptHeadAlt = 'Alt';
|
||||
dlgMouseOptHeadCtrl = 'Ctrl';
|
||||
dlgMouseOptHeadCaret = 'Caret';
|
||||
dlgMouseOptHeadPriority = 'Priority';
|
||||
dlgMouseOptHeadOpt = 'Option';
|
||||
dlgMouseOptBtnLeft = 'Left';
|
||||
dlgMouseOptBtnMiddle = 'Middle';
|
||||
@ -1204,6 +1205,7 @@ resourcestring
|
||||
dlgMouseOptBtnOk = 'Ok';
|
||||
dlgMouseOptBtnCancel = 'Cancel';
|
||||
dlgMouseOptBtnModDef = 'Make Fallback';
|
||||
dlgMouseOptPriorLabel = 'Priority';
|
||||
dlgMouseOptDlgTitle = 'Edit Mouse';
|
||||
dlgMouseOptCapture = 'Capture';
|
||||
dlgMouseOptCaretMove = 'Move Caret (extra)';
|
||||
|
@ -1,13 +1,13 @@
|
||||
object MouseaActionDialog: TMouseaActionDialog
|
||||
Left = 283
|
||||
Height = 213
|
||||
Height = 247
|
||||
Top = 237
|
||||
Width = 362
|
||||
AutoSize = True
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'MouseaActionDialog'
|
||||
ClientHeight = 213
|
||||
ClientHeight = 247
|
||||
ClientWidth = 362
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
@ -20,7 +20,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 91
|
||||
Top = 122
|
||||
Width = 64
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -55,6 +55,18 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
Caption = ' '
|
||||
ParentColor = False
|
||||
end
|
||||
object PriorLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = PriorSpin
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 86
|
||||
Width = 54
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'PriorLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object CapturePanel: TPanel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ShiftCheck
|
||||
@ -64,7 +76,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 142
|
||||
Top = 173
|
||||
Width = 262
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
@ -83,7 +95,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 76
|
||||
Height = 19
|
||||
Top = 117
|
||||
Top = 148
|
||||
Width = 77
|
||||
AllowGrayed = True
|
||||
BorderSpacing.Top = 6
|
||||
@ -97,7 +109,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 159
|
||||
Height = 19
|
||||
Top = 117
|
||||
Top = 148
|
||||
Width = 68
|
||||
AllowGrayed = True
|
||||
BorderSpacing.Left = 6
|
||||
@ -111,7 +123,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 233
|
||||
Height = 19
|
||||
Top = 117
|
||||
Top = 148
|
||||
Width = 72
|
||||
AllowGrayed = True
|
||||
BorderSpacing.Left = 6
|
||||
@ -128,7 +140,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 25
|
||||
Top = 142
|
||||
Top = 173
|
||||
Width = 82
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
@ -146,7 +158,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 288
|
||||
Height = 19
|
||||
Top = 90
|
||||
Top = 121
|
||||
Width = 68
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'DirCheck'
|
||||
@ -158,7 +170,7 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideTop.Control = ButtonBox
|
||||
Left = 182
|
||||
Height = 23
|
||||
Top = 88
|
||||
Top = 119
|
||||
Width = 100
|
||||
BorderSpacing.Left = 6
|
||||
ItemHeight = 15
|
||||
@ -168,11 +180,11 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
object ButtonBox: TComboBox
|
||||
AnchorSideLeft.Control = BtnLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = OptLabel
|
||||
AnchorSideTop.Control = PriorSpin
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 76
|
||||
Height = 23
|
||||
Top = 88
|
||||
Top = 119
|
||||
Width = 100
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 12
|
||||
@ -215,8 +227,8 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
AnchorSideTop.Control = BtnDefault
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 34
|
||||
Top = 173
|
||||
Height = 37
|
||||
Top = 204
|
||||
Width = 350
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
TabOrder = 10
|
||||
@ -241,4 +253,16 @@ object MouseaActionDialog: TMouseaActionDialog
|
||||
Style = csDropDownList
|
||||
TabOrder = 11
|
||||
end
|
||||
object PriorSpin: TSpinEdit
|
||||
AnchorSideLeft.Control = OptLabel
|
||||
AnchorSideTop.Control = OptLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 76
|
||||
Height = 25
|
||||
Top = 82
|
||||
Width = 60
|
||||
BorderSpacing.Top = 6
|
||||
MaxValue = 3
|
||||
TabOrder = 12
|
||||
end
|
||||
end
|
||||
|
@ -1,13 +1,15 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TMouseaActionDialog','FORMDATA',[
|
||||
'TPF0'#19'TMouseaActionDialog'#18'MouseaActionDialog'#4'Left'#3#27#1#6'Height'
|
||||
+#3#213#0#3'Top'#3#237#0#5'Width'#3'j'#1#8'AutoSize'#9#11'BorderIcons'#11#12
|
||||
+#3#247#0#3'Top'#3#237#0#5'Width'#3'j'#1#8'AutoSize'#9#11'BorderIcons'#11#12
|
||||
+'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#18'MouseaActionD'
|
||||
+'ialog'#12'ClientHeight'#3#213#0#11'ClientWidth'#3'j'#1#8'OnCreate'#7#10'For'
|
||||
+'ialog'#12'ClientHeight'#3#247#0#11'ClientWidth'#3'j'#1#8'OnCreate'#7#10'For'
|
||||
+'mCreate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.27'#0#6'TL'
|
||||
+'abel'#8'BtnLabel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Co'
|
||||
+'ntrol'#7#9'ButtonBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRi'
|
||||
+'ght.Control'#7#11'ActionLabel'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Le'
|
||||
+'ft'#2#6#6'Height'#2#16#3'Top'#2'['#5'Width'#2'@'#7'Anchors'#11#5'akTop'#6'a'
|
||||
+'ft'#2#6#6'Height'#2#16#3'Top'#2'z'#5'Width'#2'@'#7'Anchors'#11#5'akTop'#6'a'
|
||||
+'kLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#7'Caption'#6#8'BtnLabel'#11
|
||||
+'ParentColor'#8#0#0#6'TLabel'#11'ActionLabel'#22'AnchorSideLeft.Control'#7#5
|
||||
+'Owner'#21'AnchorSideTop.Control'#7#9'ActionBox'#18'AnchorSideTop.Side'#7#9
|
||||
@ -18,68 +20,75 @@ LazarusResources.Add('TMouseaActionDialog','FORMDATA',[
|
||||
+'Right.Control'#7#9'ButtonBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Lef'
|
||||
+'t'#2'L'#6'Height'#2#16#3'Top'#2'<'#5'Width'#2'd'#7'Anchors'#11#5'akTop'#6'a'
|
||||
+'kLeft'#7'akRight'#0#8'AutoSize'#8#17'BorderSpacing.Top'#2#6#7'Caption'#6#1
|
||||
+' '#11'ParentColor'#8#0#0#6'TPanel'#12'CapturePanel'#22'AnchorSideLeft.Contr'
|
||||
+'ol'#7#5'Owner'#21'AnchorSideTop.Control'#7#10'ShiftCheck'#18'AnchorSideTop.'
|
||||
+'Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#10'BtnDefault'#24'Anchor'
|
||||
+'SideBottom.Control'#7#10'BtnDefault'#21'AnchorSideBottom.Side'#7#9'asrBotto'
|
||||
+'m'#4'Left'#2#6#6'Height'#2#25#3'Top'#3#142#0#5'Width'#3#6#1#7'Anchors'#11#5
|
||||
+'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#17'Bor'
|
||||
+'derSpacing.Top'#2#6#19'BorderSpacing.Right'#2#6#10'BevelOuter'#7#9'bvLowere'
|
||||
+'d'#10'BevelWidth'#2#2#5'Color'#7#11'clBtnShadow'#11'ParentColor'#8#8'TabOrd'
|
||||
+'er'#2#2#11'OnMouseDown'#7#21'CapturePanelMouseDown'#0#0#9'TCheckBox'#10'Shi'
|
||||
+'ftCheck'#22'AnchorSideLeft.Control'#7#9'ButtonBox'#21'AnchorSideTop.Control'
|
||||
+#7#9'ButtonBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'L'#6'Height'
|
||||
+#2#19#3'Top'#2'u'#5'Width'#2'M'#11'AllowGrayed'#9#17'BorderSpacing.Top'#2#6#7
|
||||
+'Caption'#6#10'ShiftCheck'#8'TabOrder'#2#6#0#0#9'TCheckBox'#8'AltCheck'#22'A'
|
||||
+'nchorSideLeft.Control'#7#10'ShiftCheck'#19'AnchorSideLeft.Side'#7#9'asrBott'
|
||||
+'om'#21'AnchorSideTop.Control'#7#10'ShiftCheck'#18'AnchorSideTop.Side'#7#9'a'
|
||||
+'srCenter'#4'Left'#3#159#0#6'Height'#2#19#3'Top'#2'u'#5'Width'#2'D'#11'Allow'
|
||||
+'Grayed'#9#18'BorderSpacing.Left'#2#6#7'Caption'#6#8'AltCheck'#8'TabOrder'#2
|
||||
+#7#0#0#9'TCheckBox'#9'CtrlCheck'#22'AnchorSideLeft.Control'#7#8'AltCheck'#19
|
||||
+'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#10'ShiftChe'
|
||||
+'ck'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#233#0#6'Height'#2#19#3
|
||||
+'Top'#2'u'#5'Width'#2'H'#11'AllowGrayed'#9#18'BorderSpacing.Left'#2#6#7'Capt'
|
||||
+'ion'#6#9'CtrlCheck'#8'TabOrder'#2#8#0#0#7'TButton'#10'BtnDefault'#22'Anchor'
|
||||
+'SideLeft.Control'#7#9'CtrlCheck'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21
|
||||
+'AnchorSideTop.Control'#7#10'ShiftCheck'#18'AnchorSideTop.Side'#7#9'asrBotto'
|
||||
+'m'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrB'
|
||||
+'ottom'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#18#1#6'Height'#2
|
||||
+#25#3'Top'#3#142#0#5'Width'#2'R'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoS'
|
||||
+'ize'#9#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacin'
|
||||
+'g.Right'#2#6#7'Caption'#6#10'BtnDefault'#7'OnClick'#7#15'BtnDefaultClick'#8
|
||||
+'TabOrder'#2#9#0#0#9'TCheckBox'#8'DirCheck'#22'AnchorSideLeft.Control'#7#8'C'
|
||||
+'lickBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
|
||||
+#8'ClickBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3' '#1#6'Height'#2
|
||||
+#19#3'Top'#2'Z'#5'Width'#2'D'#20'BorderSpacing.Around'#2#6#7'Caption'#6#8'Di'
|
||||
+'rCheck'#8'TabOrder'#2#5#0#0#9'TComboBox'#8'ClickBox'#22'AnchorSideLeft.Cont'
|
||||
+'rol'#7#9'ButtonBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop'
|
||||
+'.Control'#7#9'ButtonBox'#4'Left'#3#182#0#6'Height'#2#23#3'Top'#2'X'#5'Width'
|
||||
+#2'd'#18'BorderSpacing.Left'#2#6#10'ItemHeight'#2#15#5'Style'#7#14'csDropDow'
|
||||
+'nList'#8'TabOrder'#2#4#0#0#9'TComboBox'#9'ButtonBox'#22'AnchorSideLeft.Cont'
|
||||
+'rol'#7#8'BtnLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.'
|
||||
+'Control'#7#8'OptLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'L'#6
|
||||
+'Height'#2#23#3'Top'#2'X'#5'Width'#2'd'#18'BorderSpacing.Left'#2#6#17'Border'
|
||||
+'Spacing.Top'#2#12#10'ItemHeight'#2#15#5'Style'#7#14'csDropDownList'#8'TabOr'
|
||||
+'der'#2#3#0#0#9'TCheckBox'#10'CaretCheck'#22'AnchorSideLeft.Control'#7#9'Act'
|
||||
+'ionBox'#21'AnchorSideTop.Control'#7#9'ActionBox'#18'AnchorSideTop.Side'#7#9
|
||||
+'asrBottom'#4'Left'#2'L'#6'Height'#2#19#3'Top'#2'#'#5'Width'#2'Q'#17'BorderS'
|
||||
,'pacing.Top'#2#6#7'Caption'#6#10'CaretCheck'#8'TabOrder'#2#1#0#0#9'TComboBox'
|
||||
+#9'ActionBox'#22'AnchorSideLeft.Control'#7#11'ActionLabel'#19'AnchorSideLeft'
|
||||
+'.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRig'
|
||||
+'ht.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'L'
|
||||
+#6'Height'#2#23#3'Top'#2#6#5'Width'#3#24#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSp'
|
||||
+'acing.Right'#2#6#10'ItemHeight'#2#15#8'OnChange'#7#15'ActionBoxChange'#5'St'
|
||||
+'yle'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#12'TButtonPanel'#12'ButtonPan'
|
||||
+'el1'#21'AnchorSideTop.Control'#7#10'BtnDefault'#18'AnchorSideTop.Side'#7#9
|
||||
+'asrBottom'#4'Left'#2#6#6'Height'#2'"'#3'Top'#3#173#0#5'Width'#3'^'#1#7'Anch'
|
||||
+'ors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabOrder'#2#10#11'Sho'
|
||||
+'wButtons'#11#4'pbOK'#8'pbCancel'#0#0#0#9'TComboBox'#6'OptBox'#22'AnchorSide'
|
||||
+'Left.Control'#7#8'OptLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'Ancho'
|
||||
+'rSideTop.Control'#7#8'OptLabel'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'An'
|
||||
+'chorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4
|
||||
+'Left'#3#182#0#6'Height'#2#23#3'Top'#2'9'#5'Width'#3#174#0#7'Anchors'#11#5'a'
|
||||
+'kTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#19'BorderSpacing.Ri'
|
||||
+'ght'#2#6#7'Enabled'#8#10'ItemHeight'#2#15#5'Style'#7#14'csDropDownList'#8'T'
|
||||
+'abOrder'#2#11#0#0#0
|
||||
+' '#11'ParentColor'#8#0#0#6'TLabel'#10'PriorLabel'#22'AnchorSideLeft.Control'
|
||||
+#7#5'Owner'#21'AnchorSideTop.Control'#7#9'PriorSpin'#18'AnchorSideTop.Side'#7
|
||||
+#9'asrCenter'#4'Left'#2#6#6'Height'#2#16#3'Top'#2'V'#5'Width'#2'6'#18'Border'
|
||||
+'Spacing.Left'#2#6#7'Caption'#6#10'PriorLabel'#11'ParentColor'#8#0#0#6'TPane'
|
||||
+'l'#12'CapturePanel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.'
|
||||
+'Control'#7#10'ShiftCheck'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSi'
|
||||
+'deRight.Control'#7#10'BtnDefault'#24'AnchorSideBottom.Control'#7#10'BtnDefa'
|
||||
+'ult'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#25#3
|
||||
+'Top'#3#173#0#5'Width'#3#6#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'a'
|
||||
+'kBottom'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSp'
|
||||
+'acing.Right'#2#6#10'BevelOuter'#7#9'bvLowered'#10'BevelWidth'#2#2#5'Color'#7
|
||||
+#11'clBtnShadow'#11'ParentColor'#8#8'TabOrder'#2#2#11'OnMouseDown'#7#21'Capt'
|
||||
+'urePanelMouseDown'#0#0#9'TCheckBox'#10'ShiftCheck'#22'AnchorSideLeft.Contro'
|
||||
+'l'#7#9'ButtonBox'#21'AnchorSideTop.Control'#7#9'ButtonBox'#18'AnchorSideTop'
|
||||
+'.Side'#7#9'asrBottom'#4'Left'#2'L'#6'Height'#2#19#3'Top'#3#148#0#5'Width'#2
|
||||
+'M'#11'AllowGrayed'#9#17'BorderSpacing.Top'#2#6#7'Caption'#6#10'ShiftCheck'#8
|
||||
+'TabOrder'#2#6#0#0#9'TCheckBox'#8'AltCheck'#22'AnchorSideLeft.Control'#7#10
|
||||
+'ShiftCheck'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'
|
||||
+#7#10'ShiftCheck'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#159#0#6'He'
|
||||
+'ight'#2#19#3'Top'#3#148#0#5'Width'#2'D'#11'AllowGrayed'#9#18'BorderSpacing.'
|
||||
+'Left'#2#6#7'Caption'#6#8'AltCheck'#8'TabOrder'#2#7#0#0#9'TCheckBox'#9'CtrlC'
|
||||
+'heck'#22'AnchorSideLeft.Control'#7#8'AltCheck'#19'AnchorSideLeft.Side'#7#9
|
||||
+'asrBottom'#21'AnchorSideTop.Control'#7#10'ShiftCheck'#18'AnchorSideTop.Side'
|
||||
+#7#9'asrCenter'#4'Left'#3#233#0#6'Height'#2#19#3'Top'#3#148#0#5'Width'#2'H'
|
||||
+#11'AllowGrayed'#9#18'BorderSpacing.Left'#2#6#7'Caption'#6#9'CtrlCheck'#8'Ta'
|
||||
+'bOrder'#2#8#0#0#7'TButton'#10'BtnDefault'#22'AnchorSideLeft.Control'#7#9'Ct'
|
||||
+'rlCheck'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
|
||||
+#10'ShiftCheck'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Con'
|
||||
+'trol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#21'AnchorSideBotto'
|
||||
+'m.Side'#7#9'asrBottom'#4'Left'#3#18#1#6'Height'#2#25#3'Top'#3#173#0#5'Width'
|
||||
+#2'R'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Lef'
|
||||
+'t'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#6#7'Caption'#6#10
|
||||
+'BtnDefault'#7'OnClick'#7#15'BtnDefaultClick'#8'TabOrder'#2#9#0#0#9'TCheckBo'
|
||||
+'x'#8'DirCheck'#22'AnchorSideLeft.Control'#7#8'ClickBox'#19'AnchorSideLeft.S'
|
||||
+'ide'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#8'ClickBox'#18'AnchorSideTo'
|
||||
+'p.Side'#7#9'asrCenter'#4'Left'#3' '#1#6'Height'#2#19#3'Top'#2'y'#5'Width'#2
|
||||
+'D'#20'BorderSpacing.Around'#2#6#7'Caption'#6#8'DirCheck'#8'TabOrder'#2#5#0#0
|
||||
+#9'TComboBox'#8'ClickBox'#22'AnchorSideLeft.Control'#7#9'ButtonBox'#19'Ancho'
|
||||
+'rSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'ButtonBox'#4'L'
|
||||
+'eft'#3#182#0#6'Height'#2#23#3'Top'#2'w'#5'Width'#2'd'#18'BorderSpacing.Left'
|
||||
+#2#6#10'ItemHeight'#2#15#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#4#0#0#9
|
||||
+'TComboBox'#9'ButtonBox'#22'AnchorSideLeft.Control'#7#8'BtnLabel'#19'AnchorS'
|
||||
+'ideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'PriorSpin'#18'An'
|
||||
+'chorSideTop.Side'#7#9'asrBottom'#4'Left'#2'L'#6'Height'#2#23#3'Top'#2'w'#5
|
||||
+'Width'#2'd'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#12#10'ItemHe'
|
||||
,'ight'#2#15#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#3#0#0#9'TCheckBox'#10
|
||||
+'CaretCheck'#22'AnchorSideLeft.Control'#7#9'ActionBox'#21'AnchorSideTop.Cont'
|
||||
+'rol'#7#9'ActionBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'L'#6'He'
|
||||
+'ight'#2#19#3'Top'#2'#'#5'Width'#2'Q'#17'BorderSpacing.Top'#2#6#7'Caption'#6
|
||||
+#10'CaretCheck'#8'TabOrder'#2#1#0#0#9'TComboBox'#9'ActionBox'#22'AnchorSideL'
|
||||
+'eft.Control'#7#11'ActionLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'An'
|
||||
+'chorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'A'
|
||||
+'nchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'L'#6'Height'#2#23#3'Top'#2#6#5
|
||||
+'Width'#3#24#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacin'
|
||||
+'g.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#6#10'ItemHe'
|
||||
+'ight'#2#15#8'OnChange'#7#15'ActionBoxChange'#5'Style'#7#14'csDropDownList'#8
|
||||
+'TabOrder'#2#0#0#0#12'TButtonPanel'#12'ButtonPanel1'#21'AnchorSideTop.Contro'
|
||||
+'l'#7#10'BtnDefault'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Hei'
|
||||
+'ght'#2'%'#3'Top'#3#204#0#5'Width'#3'^'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#8'akBottom'#0#8'TabOrder'#2#10#11'ShowButtons'#11#4'pbOK'#8'pbCanc'
|
||||
+'el'#0#0#0#9'TComboBox'#6'OptBox'#22'AnchorSideLeft.Control'#7#8'OptLabel'#19
|
||||
+'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#8'OptLabel'
|
||||
+#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#5'Owner'
|
||||
+#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#182#0#6'Height'#2#23#3'To'
|
||||
+'p'#2'9'#5'Width'#3#174#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'B'
|
||||
+'orderSpacing.Left'#2#6#19'BorderSpacing.Right'#2#6#7'Enabled'#8#10'ItemHeig'
|
||||
+'ht'#2#15#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#11#0#0#9'TSpinEdit'#9
|
||||
+'PriorSpin'#22'AnchorSideLeft.Control'#7#8'OptLabel'#21'AnchorSideTop.Contro'
|
||||
+'l'#7#8'OptLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'L'#6'Heigh'
|
||||
+'t'#2#25#3'Top'#2'R'#5'Width'#2'<'#17'BorderSpacing.Top'#2#6#8'MaxValue'#2#3
|
||||
+#8'TabOrder'#2#12#0#0#0
|
||||
]);
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
StdCtrls, ButtonPanel, SynEditMouseCmds, LazarusIDEStrConsts, KeyMapping, IDECommands;
|
||||
StdCtrls, ButtonPanel, Spin, SynEditMouseCmds, LazarusIDEStrConsts, KeyMapping, IDECommands;
|
||||
|
||||
const
|
||||
ButtonName: Array [TMouseButton] of String =
|
||||
@ -30,12 +30,14 @@ type
|
||||
ButtonPanel1: TButtonPanel;
|
||||
CaretCheck: TCheckBox;
|
||||
ClickBox: TComboBox;
|
||||
PriorLabel: TLabel;
|
||||
OptBox: TComboBox;
|
||||
CtrlCheck: TCheckBox;
|
||||
DirCheck: TCheckBox;
|
||||
CapturePanel: TPanel;
|
||||
OptLabel: TLabel;
|
||||
ShiftCheck: TCheckBox;
|
||||
PriorSpin: TSpinEdit;
|
||||
procedure ActionBoxChange(Sender: TObject);
|
||||
procedure BtnDefaultClick(Sender: TObject);
|
||||
procedure CapturePanelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState;
|
||||
@ -101,7 +103,8 @@ begin
|
||||
CtrlCheck.Caption := dlgMouseOptModCtrl;
|
||||
ActionLabel.Caption := dlgMouseOptDescAction;
|
||||
BtnLabel.Caption := dlgMouseOptDescButton;
|
||||
BtnDefault.Caption := dlgMouseOptBtnModDef
|
||||
BtnDefault.Caption := dlgMouseOptBtnModDef;
|
||||
PriorLabel.Caption := dlgMouseOptPriorLabel;
|
||||
end;
|
||||
|
||||
procedure TMouseaActionDialog.ResetInputs;
|
||||
@ -182,6 +185,7 @@ begin
|
||||
if not(ssAlt in MAct.ShiftMask) then AltCheck.State := cbGrayed;
|
||||
CtrlCheck.Checked := (ssCtrl in MAct.ShiftMask) and (ssCtrl in MAct.Shift);
|
||||
if not(ssCtrl in MAct.ShiftMask) then CtrlCheck.State := cbGrayed;
|
||||
PriorSpin.Value := MAct.Priority;
|
||||
|
||||
ActionBoxChange(nil);
|
||||
if OptBox.Enabled then begin
|
||||
@ -209,6 +213,7 @@ begin
|
||||
if ShiftCheck.Checked then MAct.Shift := MAct.Shift + [ssShift];
|
||||
if AltCheck.Checked then MAct.Shift := MAct.Shift + [ssAlt];
|
||||
if CtrlCheck.Checked then MAct.Shift := MAct.Shift + [ssCtrl];
|
||||
MAct.Priority := PriorSpin.Value;
|
||||
|
||||
if OptBox.Enabled then begin
|
||||
if MAct.Command = emcSynEditCommand then begin
|
||||
|
Loading…
Reference in New Issue
Block a user