IDE more mouse options

git-svn-id: trunk@34076 -
This commit is contained in:
martin 2011-12-09 19:53:52 +00:00
parent 8ccddae67e
commit f8e21f206f
6 changed files with 949 additions and 163 deletions

View File

@ -2695,6 +2695,8 @@ begin
if Result then begin
if (not AnInfo.CaretDone) and AnAction.MoveCaret then
MoveCaret;
if (AnAction.IgnoreUpClick) then
AnInfo.IgnoreUpClick := True;
exit;
end;
@ -2854,6 +2856,8 @@ begin
if Result and (not CaretDone) and AnAction.MoveCaret then
MoveCaret;
if Result and (AnAction.IgnoreUpClick) then
AnInfo.IgnoreUpClick := True;
end;
end;

View File

@ -85,6 +85,7 @@ type
TSynEditMouseAction = class(TCollectionItem)
private
FClickDir: TSynMAClickDir;
FIgnoreUpClick: Boolean;
FOption: TSynEditorMouseCommandOpt;
FOption2: Integer;
FPriority: TSynEditorMouseCommandOpt;
@ -97,6 +98,7 @@ type
procedure SetClickCount(const AValue: TSynMAClickCount);
procedure SetClickDir(AValue: TSynMAClickDir);
procedure SetCommand(const AValue: TSynEditorMouseCommand);
procedure SetIgnoreUpClick(AValue: Boolean);
procedure SetMoveCaret(const AValue: Boolean);
procedure SetOption(const AValue: TSynEditorMouseCommandOpt);
procedure SetOption2(AValue: Integer);
@ -122,6 +124,7 @@ type
property ClickDir: TSynMAClickDir read FClickDir write SetClickDir default cdUp;
property Command: TSynEditorMouseCommand read FCommand write SetCommand;
property MoveCaret: Boolean read FMoveCaret write SetMoveCaret default False;
property IgnoreUpClick: Boolean read FIgnoreUpClick write SetIgnoreUpClick default False; // only for mouse down
property Option: TSynEditorMouseCommandOpt read FOption write SetOption default 0;
property Option2: Integer read FOption2 write SetOption2 default 0;
property Priority: TSynEditorMouseCommandOpt read FPriority write SetPriority default 0;
@ -157,7 +160,8 @@ type
const ADir: TSynMAClickDir; const AShift, AShiftMask: TShiftState;
const AOpt: TSynEditorMouseCommandOpt = 0;
const APrior: Integer = 0;
const AOpt2: integer = 0);
const AOpt2: integer = 0;
const AIgnoreUpClick: Boolean = False);
public
property Items[Index: Integer]: TSynEditMouseAction read GetItem
write SetItem; default;
@ -515,6 +519,14 @@ begin
TSynEditMouseActions(Collection).AssertNoConflict(self);
end;
procedure TSynEditMouseAction.SetIgnoreUpClick(AValue: Boolean);
begin
if FIgnoreUpClick = AValue then Exit;
FIgnoreUpClick := AValue;
if Collection <> nil then
TSynEditMouseActions(Collection).AssertNoConflict(self);
end;
procedure TSynEditMouseAction.SetMoveCaret(const AValue: Boolean);
begin
if FMoveCaret = AValue then exit;
@ -579,6 +591,7 @@ begin
FShift := TSynEditMouseAction(Source).Shift;
FShiftMask := TSynEditMouseAction(Source).ShiftMask;
FMoveCaret := TSynEditMouseAction(Source).MoveCaret;
FIgnoreUpClick := TSynEditMouseAction(Source).IgnoreUpClick;
FOption := TSynEditMouseAction(Source).FOption;
FOption2 := TSynEditMouseAction(Source).FOption2;
FPriority := TSynEditMouseAction(Source).Priority;
@ -599,6 +612,7 @@ begin
FMoveCaret := False;
FOption := 0;
FPriority := 0;
FIgnoreUpClick := False;
end;
function TSynEditMouseAction.IsMatchingShiftState(AShift: TShiftState): Boolean;
@ -629,6 +643,7 @@ begin
and (Other.Shift * self.ShiftMask = self.Shift * Other.ShiftMask)
and ((Other.Command <> self.Command) or // Only conflicts, if Command differs
(Other.MoveCaret <> self.MoveCaret) or
(Other.IgnoreUpClick <> self.IgnoreUpClick) or
(Other.Option <> self.Option) or
(Other.Option2 <> self.Option2) )
and not(Other.IsFallback xor self.IsFallback)
@ -647,7 +662,8 @@ begin
and ((Other.Command = self.Command) or IgnoreCmd)
and ((Other.Option = self.Option) or IgnoreCmd)
and ((Other.Option2 = self.Option2) or IgnoreCmd)
and ((Other.MoveCaret = self.MoveCaret) or IgnoreCmd);
and ((Other.MoveCaret = self.MoveCaret) or IgnoreCmd)
and ((Other.IgnoreUpClick = self.IgnoreUpClick) or IgnoreCmd);
end;
{ TSynEditMouseActions }
@ -795,7 +811,7 @@ procedure TSynEditMouseActions.AddCommand(const ACmd: TSynEditorMouseCommand;
const AMoveCaret: Boolean; const AButton: TSynMouseButton;
const AClickCount: TSynMAClickCount; const ADir: TSynMAClickDir;
const AShift, AShiftMask: TShiftState; const AOpt: TSynEditorMouseCommandOpt = 0;
const APrior: Integer = 0; const AOpt2: integer = 0);
const APrior: Integer = 0; const AOpt2: integer = 0; const AIgnoreUpClick: Boolean = False);
var
new: TSynEditMouseAction;
begin
@ -813,6 +829,7 @@ begin
Option := AOpt;
Priority := APrior;
Option2 := AOpt2;
IgnoreUpClick := AIgnoreUpClick;
end;
finally
dec(FAssertLock);

View File

@ -679,9 +679,13 @@ type
TMouseOptButtonActionOld = (
mbaNone,
mbaSelect, mbaSelectColumn, mbaSelectLine,
mbaSelectSetWord, mbaSelectSetLineSmart, mbaSelectSetLineFull, mbaSelectSetPara,
mbaPaste,
mbaDeclarationJump,
mbaDeclarationOrBlockJump,
mbaAddHistoryPoint,
mbaHistoryBack, mbaHistoryForw,
mbaSetFreeBookmark,
mbaZoomReset,
// Old values, needed to load old config
@ -716,9 +720,6 @@ type
TEditorMouseOptions = class(TPersistent)
private
FGutterLeft: TMouseOptGutterLeftType;
FTextMiddleClick: TMouseOptButtonActionOld;
FTextCtrlLeftClick: TMouseOptButtonActionOld;
FTextDoubleSelLine: Boolean;
FTextDrag: Boolean;
FTextRightMoveCaret: Boolean;
FUserSchemes: TQuickStringlist;
@ -733,8 +734,28 @@ type
FGutterActionsFold, FGutterActionsFoldExp, FGutterActionsFoldCol: TSynEditMouseActions;
FGutterActionsLines: TSynEditMouseActions;
FSelectedUserScheme: String;
// left multi click
FTextDoubleLeftClick: TMouseOptButtonActionOld;
FTextShiftMiddleClick: TMouseOptButtonAction;
FTextTrippleLeftClick: TMouseOptButtonActionOld;
FTextQuadLeftClick: TMouseOptButtonActionOld;
FTextShiftDoubleLeftClick: TMouseOptButtonActionOld;
FTextAltDoubleLeftClick: TMouseOptButtonActionOld;
FTextCtrlDoubleLeftClick: TMouseOptButtonActionOld;
// left + modifier click
FTextShiftLeftClick: TMouseOptButtonActionOld;
FTextAltLeftClick: TMouseOptButtonActionOld;
FTextCtrlLeftClick: TMouseOptButtonActionOld;
FTextCtrlAltLeftClick: TMouseOptButtonActionOld;
FTextShiftAltLeftClick: TMouseOptButtonActionOld;
FTextShiftCtrlLeftClick: TMouseOptButtonActionOld;
FTextShiftCtrlAltLeftClick: TMouseOptButtonActionOld;
// middle click
FTextMiddleClick: TMouseOptButtonActionOld;
FTextAltMiddleClick: TMouseOptButtonAction;
FTextCtrlMiddleClick: TMouseOptButtonAction;
// extra-1 click
// extra-2 click
FWheel: TMouseOptWheelAction;
procedure ClearUserSchemes;
function GetUserSchemeNames(Index: Integer): String;
@ -783,24 +804,49 @@ type
published
property GutterLeft: TMouseOptGutterLeftType read FGutterLeft write FGutterLeft
default moGLDownClick;
//property AltColumnMode: Boolean read FAltColumnMode write FAltColumnMode
// default True;
property TextDrag: Boolean read FTextDrag write FTextDrag
default True;
property TextDoubleSelLine: Boolean read FTextDoubleSelLine write FTextDoubleSelLine
default False;
property TextRightMoveCaret: Boolean read FTextRightMoveCaret write FTextRightMoveCaret
default False;
// left multi click
property TextDoubleLeftClick: TMouseOptButtonActionOld read FTextDoubleLeftClick write FTextDoubleLeftClick
default mbaSelectSetWord;
property TextTrippleLeftClick: TMouseOptButtonActionOld read FTextTrippleLeftClick write FTextTrippleLeftClick
default mbaSelectSetLineSmart;
property TextQuadLeftClick: TMouseOptButtonActionOld read FTextQuadLeftClick write FTextQuadLeftClick
default mbaSelectSetPara;
property TextShiftDoubleLeftClick: TMouseOptButtonActionOld read FTextShiftDoubleLeftClick write FTextShiftDoubleLeftClick
default mbaNone;
property TextCtrlDoubleLeftClick: TMouseOptButtonActionOld read FTextCtrlDoubleLeftClick write FTextCtrlDoubleLeftClick
default mbaNone;
property TextAltDoubleLeftClick: TMouseOptButtonActionOld read FTextAltDoubleLeftClick write FTextAltDoubleLeftClick
default mbaNone;
// left + modifier click
property TextShiftLeftClick: TMouseOptButtonActionOld read FTextShiftLeftClick write FTextShiftLeftClick
default mbaNone; // continue selection
property TextCtrlLeftClick: TMouseOptButtonActionOld read FTextCtrlLeftClick write SetTextCtrlLeftClick
default mbaDeclarationJump;
property TextAltLeftClick: TMouseOptButtonActionOld read FTextAltLeftClick write FTextAltLeftClick
default mbaSelectColumn;
property TextShiftCtrlLeftClick: TMouseOptButtonActionOld read FTextShiftCtrlLeftClick write FTextShiftCtrlLeftClick
default mbaNone; // continue selection
property TextShiftAltLeftClick: TMouseOptButtonActionOld read FTextShiftAltLeftClick write FTextShiftAltLeftClick
default mbaNone; // continue selection
property TextCtrlAltLeftClick: TMouseOptButtonActionOld read FTextCtrlAltLeftClick write FTextCtrlAltLeftClick
default mbaNone;
property TextShiftCtrlAltLeftClick: TMouseOptButtonActionOld read FTextShiftCtrlAltLeftClick write FTextShiftCtrlAltLeftClick
default mbaNone;
// middle click
property TextMiddleClick: TMouseOptButtonActionOld read FTextMiddleClick write SetTextMiddleClick
default mbaPaste;
property TextShiftMiddleClick: TMouseOptButtonAction read FTextShiftMiddleClick write FTextShiftMiddleClick
default mbaNone;
property TextAltMiddleClick: TMouseOptButtonAction read FTextAltMiddleClick write FTextAltMiddleClick
default mbaNone;
property TextCtrlMiddleClick: TMouseOptButtonAction read FTextCtrlMiddleClick write FTextCtrlMiddleClick
default mbaZoomReset;
// extra-1 click
// extra-2 click
property Wheel: TMouseOptWheelAction read FWheel write FWheel
default mwaScroll;
@ -2364,15 +2410,27 @@ procedure TEditorMouseOptions.Reset;
begin
FCustomSavedActions := False;
FGutterLeft := moGLDownClick;
FTextDoubleLeftClick := mbaSelectSetWord;
FTextTrippleLeftClick := mbaSelectSetLineSmart;
FTextQuadLeftClick := mbaSelectSetPara;
FTextShiftDoubleLeftClick := mbaNone;
FTextAltDoubleLeftClick := mbaNone;
FTextCtrlDoubleLeftClick := mbaNone;
FTextCtrlAltLeftClick := mbaNone;
FTextShiftAltLeftClick := mbaNone;
FTextShiftCtrlAltLeftClick := mbaNone;
FTextShiftCtrlLeftClick := mbaNone;
FTextShiftLeftClick := mbaNone;
FTextCtrlLeftClick := mbaDeclarationJump;
FTextAltLeftClick := mbaSelectColumn;
FTextMiddleClick := mbaPaste;
FTextCtrlMiddleClick := mbaZoomReset;
FTextShiftMiddleClick := mbaNone;
FTextAltMiddleClick := mbaNone;
FWheel := mwaScroll;
FCtrlWheel := mwaZoom;
FAltWheel := mwaScrollPageLessOne;
FShiftWheel := mwaScrollSingleLine;
FTextDoubleSelLine := False;
FTextRightMoveCaret := False;
FTextDrag := True;
end;
@ -2434,14 +2492,15 @@ end;
procedure TEditorMouseOptions.ResetTextToDefault;
procedure AddBtnClick(AnAction: TMouseOptButtonAction; const AButton: TSynMouseButton;
AShift, AShiftMask: TShiftState; AddLinkDummy: Boolean = False; ASelContShift: TShiftState = []);
AShift, AShiftMask: TShiftState; AddLinkDummy: Boolean = False;
ASelContShift: TShiftState = []; AClickCount: TSynMAClickCount = ccSingle);
procedure AddSelCommand(const ACmd: TSynEditorMouseCommand);
begin
AShiftMask := AShiftMask + ASelContShift;
FTextActions.AddCommand( ACmd, True, AButton, ccSingle, cdDown, AShift, AShiftMask, emcoSelectionStart);
FTextActions.AddCommand( ACmd, True, AButton, AClickCount, cdDown, AShift, AShiftMask, emcoSelectionStart);
if ASelContShift <> [] then
FTextActions.AddCommand(ACmd, True, AButton, ccSingle, cdDown, AShift+ASelContShift, AShiftMask, emcoSelectionContinue);
FTextActions.AddCommand(ACmd, True, AButton, AClickCount, cdDown, AShift+ASelContShift, AShiftMask, emcoSelectionContinue);
end;
begin
@ -2451,19 +2510,35 @@ procedure TEditorMouseOptions.ResetTextToDefault;
mbaSelect: AddSelCommand(emcStartSelections);
mbaSelectColumn: AddSelCommand(emcStartColumnSelections);
mbaSelectLine: AddSelCommand(emcStartLineSelections);
mbaSelectSetWord:
AddCommand(emcSelectWord, True, AButton, AClickCount, cdUp, AShift, AShiftMask);
mbaSelectSetLineSmart:
AddCommand(emcSelectLine, True, AButton, AClickCount, cdUp, AShift, AShiftMask, emcoSelectLineSmart);
mbaSelectSetLineFull:
AddCommand(emcSelectLine, True, AButton, AClickCount, cdUp, AShift, AShiftMask, emcoSelectLineFull);
mbaSelectSetPara:
AddCommand(emcSelectPara, True, AButton, AClickCount, cdUp, AShift, AShiftMask);
mbaPaste: // TODOS act on up? but needs to prevent selection on down
AddCommand(emcPasteSelection, True, AButton, ccSingle, cdDown, AShift, AShiftMask);
AddCommand(emcPasteSelection, True, AButton, AClickCount, cdDown, AShift, AShiftMask, 0, 0, 0, True);
mbaDeclarationJump,
mbaDeclarationOrBlockJump: begin
if AddLinkDummy then
AddCommand(emcMouseLink, False, AButton, ccSingle, cdUp, [SYNEDIT_LINK_MODIFIER], [SYNEDIT_LINK_MODIFIER], emcoMouseLinkShow, 999);
AddCommand(emcMouseLink, False, AButton, ccSingle, cdUp, AShift, AShiftMask);
AddCommand(emcMouseLink, False, AButton, AClickCount, cdUp, [SYNEDIT_LINK_MODIFIER], [SYNEDIT_LINK_MODIFIER], emcoMouseLinkShow, 999);
AddCommand(emcMouseLink, False, AButton, AClickCount, cdUp, AShift, AShiftMask);
if AnAction = mbaDeclarationOrBlockJump then
AddCommand(emcSynEditCommand, False, AButton, ccSingle, cdUp, AShift, AShiftMask, ecFindBlockOtherEnd, 1);
AddCommand(emcSynEditCommand, True, AButton, AClickCount, cdUp, AShift, AShiftMask, ecFindBlockOtherEnd, 1);
end;
mbaAddHistoryPoint:
AddCommand(emcSynEditCommand, True, AButton, AClickCount, cdUp, AShift, AShiftMask, ecAddJumpPoint);
mbaHistoryBack:
AddCommand(emcSynEditCommand, False, AButton, AClickCount, cdUp, AShift, AShiftMask, ecJumpBack);
mbaHistoryForw:
AddCommand(emcSynEditCommand, False, AButton, AClickCount, cdUp, AShift, AShiftMask, ecJumpForward);
mbaSetFreeBookmark:
AddCommand(emcSynEditCommand, True, AButton, AClickCount, cdUp, AShift, AShiftMask, ecSetFreeBookmark);
mbaZoomReset: begin
AddCommand(emcWheelZoomNorm, False, AButton, ccSingle, cdDown, AShift, AShiftMask);
FMainActions.AddCommand(emcWheelZoomNorm, False, AButton, ccSingle, cdDown, AShift, AShiftMask);
AddCommand(emcWheelZoomNorm, False, AButton, AClickCount, cdUp, AShift, AShiftMask);
FMainActions.AddCommand(emcWheelZoomNorm, False, AButton, AClickCount, cdUp, AShift, AShiftMask);
end;
end;
end;
@ -2513,7 +2588,7 @@ procedure TEditorMouseOptions.ResetTextToDefault;
end;
var
ModKeys: TShiftState;
ModKeys, SelKey: TShiftState;
begin
FMainActions.Clear;
FSelActions.Clear;
@ -2522,27 +2597,59 @@ begin
with FTextActions do begin
// Left Btn
ModKeys := [ssShift];
if FTextCtrlLeftClick <> mbaNone then ModKeys := ModKeys + [ssCtrl];
if FTextAltLeftClick <> mbaNone then ModKeys := ModKeys + [ssAlt];
if FTextAltLeftClick <> mbaNone then ModKeys := ModKeys + [ssAlt];
if FTextCtrlLeftClick <> mbaNone then ModKeys := ModKeys + [ssCtrl] + [SYNEDIT_LINK_MODIFIER];
if FTextCtrlAltLeftClick <> mbaNone then ModKeys := ModKeys + [ssAlt, ssCtrl] + [SYNEDIT_LINK_MODIFIER];
if FTextShiftAltLeftClick <> mbaNone then ModKeys := ModKeys + [ssAlt];
if FTextShiftCtrlLeftClick <> mbaNone then ModKeys := ModKeys + [ssCtrl] + [SYNEDIT_LINK_MODIFIER];
if FTextShiftCtrlAltLeftClick <> mbaNone then ModKeys := ModKeys + [ssAlt, ssCtrl] + [SYNEDIT_LINK_MODIFIER];
if FTextAltDoubleLeftClick <> mbaNone then ModKeys := ModKeys + [ssAlt];
if FTextCtrlDoubleLeftClick <> mbaNone then ModKeys := ModKeys + [ssCtrl] + [SYNEDIT_LINK_MODIFIER];
AddBtnClick(mbaSelect, mbLeft, [], ModKeys, False, [ssShift]);
AddBtnClick(FTextCtrlLeftClick, mbLeft, [SYNEDIT_LINK_MODIFIER], ModKeys, False, [ssShift]);
AddBtnClick(FTextAltLeftClick, mbLeft, [ssAlt], ModKeys, False, [ssShift]);
if FTextShiftLeftClick = mbaNone
then SelKey := [ssShift]
else SelKey := [];
AddBtnClick(mbaSelect, mbLeft, [], ModKeys, False, SelKey);
AddBtnClick(FTextShiftLeftClick, mbLeft, [ssShift], ModKeys, False, SelKey);
if FTextShiftCtrlLeftClick = mbaNone
then SelKey := [ssShift]
else SelKey := [];
AddBtnClick(FTextCtrlLeftClick, mbLeft, [SYNEDIT_LINK_MODIFIER], ModKeys, False, SelKey);
AddBtnClick(FTextShiftCtrlLeftClick, mbLeft, [ssShift, SYNEDIT_LINK_MODIFIER], ModKeys, False, SelKey);
if FTextShiftAltLeftClick = mbaNone
then SelKey := [ssShift]
else SelKey := [];
AddBtnClick(FTextAltLeftClick, mbLeft, [ssAlt], ModKeys, False, SelKey);
AddBtnClick(FTextShiftAltLeftClick, mbLeft, [ssShift, ssAlt], ModKeys, False, SelKey);
if FTextShiftCtrlAltLeftClick = mbaNone
then SelKey := [ssShift]
else SelKey := [];
AddBtnClick(FTextCtrlAltLeftClick, mbLeft, [ssAlt, SYNEDIT_LINK_MODIFIER], ModKeys, False, SelKey);
AddBtnClick(FTextShiftCtrlAltLeftClick, mbLeft, [ssShift, ssAlt, SYNEDIT_LINK_MODIFIER], ModKeys, False, SelKey);
SelKey := [];
AddBtnClick(FTextDoubleLeftClick, mbLeft, [], ModKeys, False, SelKey, ccDouble);
AddBtnClick(FTextTrippleLeftClick, mbLeft, [], ModKeys, False, SelKey, ccTriple);
AddBtnClick(FTextQuadLeftClick, mbLeft, [], ModKeys, False, SelKey, ccQuad);
AddBtnClick(FTextShiftDoubleLeftClick, mbLeft, [ssShift], ModKeys, False, SelKey, ccDouble);
AddBtnClick(FTextCtrlDoubleLeftClick, mbLeft, [SYNEDIT_LINK_MODIFIER], ModKeys, False, SelKey, ccDouble);
AddBtnClick(FTextAltDoubleLeftClick, mbLeft, [ssAlt], ModKeys, False, SelKey, ccDouble);
AddBtnClick(FTextMiddleClick, mbMiddle, [], [], FTextCtrlMiddleClick = mbaNone);
AddBtnClick(FTextCtrlMiddleClick, mbMiddle, [SYNEDIT_LINK_MODIFIER], [ssShift, ssAlt, ssCtrl]);
ModKeys := [];
if FTextShiftMiddleClick <> mbaNone then ModKeys := ModKeys + [ssShift];
if FTextCtrlMiddleClick <> mbaNone then ModKeys := ModKeys + [ssCtrl];
if FTextAltMiddleClick <> mbaNone then ModKeys := ModKeys + [ssAlt];
AddBtnClick(FTextMiddleClick, mbMiddle, [], ModKeys, FTextCtrlMiddleClick = mbaNone);
AddBtnClick(FTextShiftMiddleClick,mbMiddle, [ssShift], ModKeys);
AddBtnClick(FTextAltMiddleClick, mbMiddle, [ssAlt], ModKeys);
AddBtnClick(FTextCtrlMiddleClick, mbMiddle, [SYNEDIT_LINK_MODIFIER], ModKeys);
AddCommand(emcContextMenu, FTextRightMoveCaret, mbRight, ccSingle, cdUp, [], [], emcoSelectionCaretMoveNever);
if FTextDoubleSelLine then begin
AddCommand(emcSelectLine, True, mbLeft, ccDouble, cdDown, [], [], emcoSelectLineSmart);
AddCommand(emcSelectLine, True, mbLeft, ccTriple, cdDown, [], [], emcoSelectLineFull);
end else begin
AddCommand(emcSelectWord, True, mbLeft, ccDouble, cdDown, [], []);
AddCommand(emcSelectLine, True, mbLeft, ccTriple, cdDown, [], []);
end;
AddCommand(emcSelectPara, True, mbLeft, ccQuad, cdDown, [], []);
end;
AddWheelAct(FWheel, [], []);
@ -2607,18 +2714,37 @@ begin
FName := Src.FName;
FGutterLeft := Src.GutterLeft;
// left multi click
FTextDoubleLeftClick := Src.TextDoubleLeftClick;
FTextTrippleLeftClick := Src.TextTrippleLeftClick;
FTextQuadLeftClick := Src.TextQuadLeftClick;
FTextShiftDoubleLeftClick := Src.TextShiftDoubleLeftClick;
FTextAltDoubleLeftClick := Src.TextAltDoubleLeftClick;
FTextCtrlDoubleLeftClick := Src.TextCtrlDoubleLeftClick;
// left + modifier click
FTextAltLeftClick := Src.TextAltLeftClick;
FTextCtrlAltLeftClick := Src.TextCtrlAltLeftClick;
FTextShiftAltLeftClick := Src.TextShiftAltLeftClick;
FTextShiftCtrlAltLeftClick := Src.TextShiftCtrlAltLeftClick;
FTextShiftCtrlLeftClick := Src.TextShiftCtrlLeftClick;
FTextShiftLeftClick := Src.TextShiftLeftClick;
FTextCtrlLeftClick := Src.TextCtrlLeftClick;
fTextAltLeftClick := Src.TextAltLeftClick;
FTextAltLeftClick := Src.TextAltLeftClick;
// middle click
FTextAltMiddleClick := Src.TextAltMiddleClick;
FTextCtrlMiddleClick := Src.TextCtrlMiddleClick;
FTextMiddleClick := Src.TextMiddleClick;
FTextCtrlMiddleClick := Src.TextCtrlMiddleClick;
FTextShiftMiddleClick := Src.TextShiftMiddleClick;
FWheel := Src.Wheel;
FCtrlWheel := Src.CtrlWheel;
FAltWheel := Src.AltWheel;
FShiftWheel := Src.ShiftWheel;
FTextDoubleSelLine := Src.TextDoubleSelLine;
FTextDrag := Src.TextDrag;
FTextRightMoveCaret := Src.TextRightMoveCaret;
FSelectedUserScheme := Src.FSelectedUserScheme;
// extra-1 click
// extra-2 click
AssignActions(Src);
@ -2707,9 +2833,11 @@ procedure TEditorMouseOptions.LoadFromXml(aXMLConfig: TRttiXMLConfig;
var
AltColumnMode: Boolean;
TextDoubleSelLine: Boolean;
begin
Reset;
AltColumnMode := False;
TextDoubleSelLine := False;
if aOldPath <> '' then begin
// Read deprecated value
// It is on by default, so only if a user switched it off, actions is required
@ -2738,6 +2866,12 @@ begin
if (not AltColumnMode) then
TextAltLeftClick := mbaNone;
if aXMLConfig.GetValue(aPath + 'Default/TextDoubleSelLine', TextDoubleSelLine) then begin
FTextDoubleLeftClick := mbaSelectSetLineSmart;
FTextTrippleLeftClick := mbaSelectSetLineFull;
end;
aXMLConfig.DeleteValue(aPath + 'Default/TextDoubleSelLine');
CustomSavedActions := False;
aXMLConfig.ReadObject(aPath + 'Default/', Self);

View File

@ -1,12 +1,12 @@
inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Height = 523
Height = 583
Width = 636
HorzScrollBar.Page = 636
VertScrollBar.Page = 523
Align = alClient
Anchors = [akTop]
AutoSize = False
ClientHeight = 523
ClientHeight = 583
ClientWidth = 636
Visible = False
DesignLeft = 366
@ -25,7 +25,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
BevelOuter = bvNone
ClientHeight = 23
ClientWidth = 636
TabOrder = 3
TabOrder = 0
Visible = False
object chkPredefinedScheme: TCheckBox
AnchorSideLeft.Control = pnlUserSchemes
@ -72,7 +72,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'HideMouseCheckBox'
TabOrder = 4
TabOrder = 1
end
object pnlAllGutter: TPanel[2]
AnchorSideLeft.Control = Owner
@ -89,7 +89,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
BevelOuter = bvNone
ClientHeight = 81
ClientWidth = 636
TabOrder = 1
TabOrder = 2
object PanelGutter: TPanel
AnchorSideLeft.Control = pnlAllGutter
AnchorSideTop.Control = pnlAllGutter
@ -165,22 +165,22 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = pnlBottom
Left = 0
Height = 273
Height = 333
Top = 210
Width = 636
Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = True
BevelOuter = bvNone
ClientHeight = 273
ClientHeight = 333
ClientWidth = 636
TabOrder = 2
TabOrder = 3
object PanelTextCheckBox: TPanel
AnchorSideLeft.Control = pnlAllText
AnchorSideTop.Control = pnlAllText
AnchorSideRight.Control = pnlAllText
AnchorSideRight.Side = asrBottom
Left = 6
Height = 57
Height = 38
Top = 0
Width = 624
Anchors = [akTop, akLeft, akRight]
@ -190,7 +190,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
BorderSpacing.Bottom = 6
BevelOuter = bvNone
ChildSizing.ControlsPerLine = 2
ClientHeight = 57
ClientHeight = 38
ClientWidth = 624
TabOrder = 0
object TextDrag: TCheckBox
@ -215,49 +215,56 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
OnChange = CheckOrRadioChange
TabOrder = 1
end
object TextDoubleSelLine: TCheckBox
AnchorSideLeft.Control = RightMoveCaret
AnchorSideTop.Control = RightMoveCaret
AnchorSideTop.Side = asrBottom
Left = 0
Height = 19
Top = 38
Width = 117
Caption = 'TextDoubleSelLine'
OnChange = CheckOrRadioChange
TabOrder = 2
end
end
object ToolBar1: TToolBar
AnchorSideLeft.Control = pnlAllText
AnchorSideTop.Control = PanelTextCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = pnlAllText
AnchorSideRight.Side = asrBottom
Left = 0
Height = 26
Top = 0
Top = 44
Width = 636
Align = alNone
Anchors = [akTop, akLeft, akRight]
Caption = 'ToolBar1'
ShowCaptions = True
TabOrder = 2
object ToolButton1: TToolButton
Left = 1
TabOrder = 1
object ToolButtonMiddle: TToolButton
Tag = 2
Left = 230
Top = 2
Caption = 'ToolButton1'
Down = True
Caption = 'ToolButtonMiddle'
Grouped = True
OnClick = ToolButton1Click
OnClick = ToolButtonMiddleClick
Style = tbsCheck
end
object ToolButton2: TToolButton
Tag = 1
Left = 75
object ToolBtnWheel: TToolButton
Tag = 3
Left = 335
Top = 2
Caption = 'ToolButton2'
Caption = 'ToolBtnWheel'
Grouped = True
OnClick = ToolButton1Click
OnClick = ToolButtonMiddleClick
Style = tbsCheck
end
object ToolButtonLeftMod: TToolButton
Left = 1
Top = 2
Caption = 'ToolButtonLeftMod'
Down = True
Grouped = True
OnClick = ToolButtonMiddleClick
Style = tbsCheck
end
object ToolButtonLeftMulti: TToolButton
Tag = 1
Left = 114
Top = 2
Caption = 'ToolButtonLeftMulti'
Grouped = True
OnClick = ToolButtonMiddleClick
Style = tbsCheck
end
end
@ -270,7 +277,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
AnchorSideBottom.Side = asrBottom
Left = 518
Height = 25
Top = 242
Top = 302
Width = 112
Anchors = [akRight, akBottom]
AutoSize = True
@ -279,7 +286,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
BorderSpacing.Bottom = 6
Caption = 'ResetTextButton'
OnClick = ResetTextButtonClick
TabOrder = 1
TabOrder = 2
end
object Notebook1: TNotebook
AnchorSideLeft.Control = pnlAllText
@ -289,28 +296,47 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ResetTextButton
Left = 0
Height = 210
Top = 26
Height = 226
Top = 70
Width = 636
PageIndex = 0
Anchors = [akTop, akLeft, akRight, akBottom]
TabOrder = 3
TabStop = True
object Page1: TPage
object ScrollBox1: TScrollBox
object PageLeftMod: TPage
object ScrollBox3: TScrollBox
Left = 0
Height = 210
Height = 226
Top = 0
Width = 636
HorzScrollBar.Page = 636
VertScrollBar.Page = 210
VertScrollBar.Page = 226
Align = alClient
BorderStyle = bsNone
ClientHeight = 210
ClientHeight = 226
ClientWidth = 636
TabOrder = 0
object dropCtrlLeft: TComboBox
AnchorSideLeft.Control = dropAltLeft
AnchorSideTop.Control = dropAltLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 35
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 0
end
object CtrLLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox1
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropCtrlLeft
AnchorSideTop.Side = asrCenter
Left = 6
@ -321,44 +347,61 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Caption = 'CtrLLeftLabel'
ParentColor = False
end
object dropCtrlLeft: TComboBox
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = dropAltLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox1
object dropAltLeft: TComboBox
AnchorSideLeft.Control = dropShiftLeft
AnchorSideTop.Control = ScrollBox3
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 35
Top = 6
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 1
end
object AltLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropAltLeft
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 9
Width = 64
BorderSpacing.Left = 6
Caption = 'AltLeftLabel'
ParentColor = False
end
object dropShiftLeft: TComboBox
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropAltCtrlLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 93
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 140
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 0
TabOrder = 2
end
object MiddleBtnLabel: TLabel
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = dropMiddle
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 6
Height = 16
Top = 67
Width = 84
BorderSpacing.Left = 6
Caption = 'MiddleBtnLabel'
ParentColor = False
end
object dropMiddle: TComboBox
AnchorSideLeft.Control = dropCtrlLeft
object dropAltCtrlLeft: TComboBox
AnchorSideLeft.Control = dropAltLeft
AnchorSideTop.Control = dropCtrlLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
@ -367,11 +410,378 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 3
end
object dropShiftAltLeft: TComboBox
AnchorSideLeft.Control = dropAltLeft
AnchorSideTop.Control = dropShiftLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 122
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 4
end
object dropShiftCtrlLeft: TComboBox
AnchorSideLeft.Control = dropAltLeft
AnchorSideTop.Control = dropShiftAltLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 151
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 5
end
object dropShiftAltCtrlLeft: TComboBox
AnchorSideLeft.Control = dropAltLeft
AnchorSideTop.Control = dropShiftCtrlLeft
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox3
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 180
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 6
end
object ShiftLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropShiftLeft
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 96
Width = 73
BorderSpacing.Left = 6
Caption = 'ShiftLeftLabel'
ParentColor = False
end
object AltCtrlLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropAltCtrlLeft
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 67
Width = 83
BorderSpacing.Left = 6
Caption = 'AltCtrlLeftLabel'
ParentColor = False
end
object ShiftCtrlLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropShiftCtrlLeft
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 154
Width = 92
BorderSpacing.Left = 6
Caption = 'ShiftCtrlLeftLabel'
ParentColor = False
end
object ShiftAltLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropShiftAltLeft
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 125
Width = 88
BorderSpacing.Left = 6
Caption = 'ShiftAltLeftLabel'
ParentColor = False
end
object ShiftCtrlAltLeftLabel: TLabel
AnchorSideLeft.Control = ScrollBox3
AnchorSideTop.Control = dropShiftAltCtrlLeft
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 183
Width = 107
BorderSpacing.Left = 6
Caption = 'ShiftCtrlAltLeftLabel'
ParentColor = False
end
end
end
object PageLeftDbl: TPage
object ScrollBox4: TScrollBox
Left = 0
Height = 207
Top = 0
Width = 636
HorzScrollBar.Page = 636
VertScrollBar.Page = 207
Align = alClient
BorderStyle = bsNone
ClientHeight = 207
ClientWidth = 636
TabOrder = 0
object dropLeftTripple: TComboBox
AnchorSideLeft.Control = dropLeftDouble
AnchorSideTop.Control = dropLeftDouble
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox4
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 35
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 0
end
object lblLeftTripple: TLabel
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = dropLeftTripple
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 38
Width = 71
BorderSpacing.Left = 6
Caption = 'lblLeftTripple'
ParentColor = False
end
object dropLeftDouble: TComboBox
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = ScrollBox4
AnchorSideRight.Control = ScrollBox4
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 6
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 140
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 1
end
object lblLeftDouble: TLabel
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = dropLeftDouble
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 9
Width = 72
BorderSpacing.Left = 6
Caption = 'lblLeftDouble'
ParentColor = False
end
object dropLeftQuad: TComboBox
AnchorSideLeft.Control = dropLeftDouble
AnchorSideTop.Control = dropLeftTripple
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox4
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 64
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 2
end
object dropLeftShiftDouble: TComboBox
AnchorSideLeft.Control = dropLeftDouble
AnchorSideTop.Control = dropLeftQuad
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox4
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 93
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 3
end
object dropLeftAltDouble: TComboBox
AnchorSideLeft.Control = dropLeftDouble
AnchorSideTop.Control = dropLeftShiftDouble
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox4
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 122
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 4
end
object dropLeftCtrlDouble: TComboBox
AnchorSideLeft.Control = dropLeftDouble
AnchorSideTop.Control = dropLeftAltDouble
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox4
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 151
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 5
end
object lblLeftQuad: TLabel
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = dropLeftQuad
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 67
Width = 63
BorderSpacing.Left = 6
Caption = 'lblLeftQuad'
ParentColor = False
end
object lblLeftDoubleShift: TLabel
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = dropLeftShiftDouble
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 96
Width = 96
BorderSpacing.Left = 6
Caption = 'lblLeftDoubleShift'
ParentColor = False
end
object lblLeftDoubleAlt: TLabel
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = dropLeftAltDouble
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 125
Width = 87
BorderSpacing.Left = 6
Caption = 'lblLeftDoubleAlt'
ParentColor = False
end
object lblLeftDoubleCtrl: TLabel
AnchorSideLeft.Control = ScrollBox4
AnchorSideTop.Control = dropLeftCtrlDouble
AnchorSideTop.Side = asrCenter
Left = 6
Height = 16
Top = 154
Width = 91
BorderSpacing.Left = 6
Caption = 'lblLeftDoubleCtrl'
ParentColor = False
end
end
end
object PageMiddle: TPage
object ScrollBox1: TScrollBox
Left = 0
Height = 226
Top = 0
Width = 636
HorzScrollBar.Page = 636
VertScrollBar.Page = 226
Align = alClient
BorderStyle = bsNone
ClientHeight = 226
ClientWidth = 636
TabOrder = 0
object MiddleBtnLabel: TLabel
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = dropMiddle
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 6
Height = 16
Top = 9
Width = 84
BorderSpacing.Left = 6
Caption = 'MiddleBtnLabel'
ParentColor = False
end
object dropMiddle: TComboBox
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = ScrollBox1
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 6
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 140
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 1
end
object CtrlMiddleBtnLabel: TLabel
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = dropCtrlMiddle
@ -387,8 +797,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
ParentColor = False
end
object dropCtrlMiddle: TComboBox
AnchorSideLeft.Control = dropCtrlLeft
AnchorSideTop.Control = dropMiddle
AnchorSideTop.Control = dropAltMiddle
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
@ -399,44 +808,80 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 1
TabOrder = 0
end
object dropAltLeft: TComboBox
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = ScrollBox1
object dropAltMiddle: TComboBox
AnchorSideTop.Control = dropShiftMiddle
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 6
Top = 64
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 140
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 2
end
object AltMiddleBtnLabel: TLabel
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = dropAltMiddle
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 6
Height = 16
Top = 67
Width = 99
BorderSpacing.Left = 6
Caption = 'AltMiddleBtnLabel'
ParentColor = False
end
object dropShiftMiddle: TComboBox
AnchorSideLeft.Control = dropMiddle
AnchorSideTop.Control = dropMiddle
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 140
Height = 23
Top = 35
Width = 490
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
TabOrder = 3
end
object AltLeftLabel: TLabel
object ShiftMiddleLabel: TLabel
AnchorSideLeft.Control = ScrollBox1
AnchorSideTop.Control = dropAltLeft
AnchorSideTop.Control = dropShiftMiddle
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = ScrollBox1
AnchorSideRight.Side = asrBottom
Left = 6
Height = 16
Top = 9
Width = 64
Top = 38
Width = 71
BorderSpacing.Left = 6
Caption = 'AltLeftLabel'
Caption = 'ShiftMiddleLabel'
ParentColor = False
end
end
end
object Page2: TPage
object PageWheel: TPage
object ScrollBox2: TScrollBox
Left = 0
Height = 150
@ -462,6 +907,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
BorderSpacing.Left = 140
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
@ -480,6 +926,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
@ -498,6 +945,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
@ -516,6 +964,7 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
DropDownCount = 12
ItemHeight = 15
OnChange = CheckOrRadioChange
Style = csDropDownList
@ -589,14 +1038,14 @@ inherited EditorMouseOptionsFrame: TEditorMouseOptionsFrame
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 40
Top = 483
Top = 543
Width = 636
Anchors = [akLeft, akRight, akBottom]
AutoSize = True
BevelOuter = bvNone
ClientHeight = 40
ClientWidth = 636
TabOrder = 0
TabOrder = 4
object BottomDivider: TBevel
AnchorSideLeft.Control = pnlBottom
AnchorSideTop.Control = pnlBottom

View File

@ -25,7 +25,7 @@ unit editor_mouseaction_options;
interface
uses
math, EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, SynEdit, DividerBevel, StdCtrls,
math, sysutils, EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, SynEdit, DividerBevel, StdCtrls,
ExtCtrls, Classes, LCLProc, editor_mouseaction_options_advanced, Controls, Forms, ComCtrls;
type
@ -33,12 +33,42 @@ type
{ TEditorMouseOptionsFrame }
TEditorMouseOptionsFrame = class(TAbstractIDEOptionsEditor)
dropShiftMiddle: TComboBox;
lblLeftDouble: TLabel;
lblLeftTripple: TLabel;
lblLeftQuad: TLabel;
lblLeftDoubleShift: TLabel;
lblLeftDoubleAlt: TLabel;
lblLeftDoubleCtrl: TLabel;
dropLeftDouble: TComboBox;
dropLeftTripple: TComboBox;
dropLeftQuad: TComboBox;
dropLeftShiftDouble: TComboBox;
dropLeftAltDouble: TComboBox;
dropLeftCtrlDouble: TComboBox;
ShiftMiddleLabel: TLabel;
ShiftLeftLabel: TLabel;
AltCtrlLeftLabel: TLabel;
ShiftCtrlLeftLabel: TLabel;
ShiftAltLeftLabel: TLabel;
ShiftCtrlAltLeftLabel: TLabel;
BottomDivider: TBevel;
chkPredefinedScheme: TCheckBox;
AltLeftLabel: TLabel;
AltMiddleBtnLabel: TLabel;
dropAltLeft: TComboBox;
dropAltCtrlLeft: TComboBox;
dropShiftAltLeft: TComboBox;
dropShiftCtrlLeft: TComboBox;
dropShiftAltCtrlLeft: TComboBox;
dropShiftLeft: TComboBox;
dropAltMiddle: TComboBox;
PageLeftDbl: TPage;
PageLeftMod: TPage;
ScrollBox1: TScrollBox;
ScrollBox2: TScrollBox;
ScrollBox3: TScrollBox;
ScrollBox4: TScrollBox;
TextDividerLabel: TDividerBevel;
GutterDividerLabel: TDividerBevel;
GenericDividerLabel: TDividerBevel;
@ -58,11 +88,13 @@ type
MiddleBtnLabel: TLabel;
CtrlMiddleBtnLabel: TLabel;
Notebook1: TNotebook;
Page1: TPage;
Page2: TPage;
PageMiddle: TPage;
PageWheel: TPage;
ToolBar1: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButtonMiddle: TToolButton;
ToolBtnWheel: TToolButton;
ToolButtonLeftMod: TToolButton;
ToolButtonLeftMulti: TToolButton;
WheelBtnLabel: TLabel;
CtrlWheelBtnLabel: TLabel;
AltWheelBtnLabel: TLabel;
@ -77,7 +109,6 @@ type
ResetGutterButton: TButton;
ResetTextButton: TButton;
RightMoveCaret: TCheckBox;
TextDoubleSelLine: TCheckBox;
TextDrag: TCheckBox;
RadioGroup1: TRadioGroup;
TextLeft: TCheckGroup;
@ -91,7 +122,7 @@ type
procedure ResetGutterButtonClick(Sender: TObject);
procedure ResetTextButtonClick(Sender: TObject);
procedure ResetAllButtonClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButtonMiddleClick(Sender: TObject);
private
FDialog: TAbstractOptionsEditorDialog;
FOptions: TAbstractIDEOptions;
@ -106,6 +137,8 @@ type
procedure SaveGutterSettings;
protected
procedure SetVisible(Value: Boolean); override;
function IdxToDoubleMouseOptButtonAction(AIdx: integer): TMouseOptButtonAction;
procedure CheckForShiftChange(Sender: TObject);
public
//constructor Create(AOwner: TComponent); override;
//destructor Destroy; override;
@ -137,6 +170,8 @@ begin
finally
Dec(FInClickHandler);
end;
if Sender <> nil then
CheckForShiftChange(Sender);
end;
procedure TEditorMouseOptionsFrame.UpdateButtons;
@ -210,7 +245,7 @@ begin
UpdateButtons;
end;
procedure TEditorMouseOptionsFrame.ToolButton1Click(Sender: TObject);
procedure TEditorMouseOptionsFrame.ToolButtonMiddleClick(Sender: TObject);
begin
if not(Sender is TToolButton) then exit;
Notebook1.PageIndex := TToolButton(Sender).Tag;
@ -227,11 +262,27 @@ begin
Result := not (
(FTempMouseSettings.TextDrag = TextDrag.Checked) and
(FTempMouseSettings.TextRightMoveCaret = RightMoveCaret.Checked) and
(FTempMouseSettings.TextDoubleSelLine = TextDoubleSelLine.Checked) and
(FTempMouseSettings.TextAltLeftClick = TMouseOptButtonAction(dropAltLeft.ItemIndex)) and
(FTempMouseSettings.TextCtrlLeftClick = TMouseOptButtonAction(dropCtrlLeft.ItemIndex)) and
(FTempMouseSettings.TextMiddleClick = TMouseOptButtonAction(dropMiddle.ItemIndex)) and
(FTempMouseSettings.TextCtrlMiddleClick = TMouseOptButtonAction(dropCtrlMiddle.ItemIndex)) and
(FTempMouseSettings.TextAltLeftClick = TMouseOptButtonAction(dropAltLeft.ItemIndex)) and
(FTempMouseSettings.TextCtrlLeftClick = TMouseOptButtonAction(dropCtrlLeft.ItemIndex)) and
(FTempMouseSettings.TextCtrlAltLeftClick = TMouseOptButtonAction(dropAltCtrlLeft.ItemIndex)) and
(FTempMouseSettings.TextShiftLeftClick = TMouseOptButtonAction(dropShiftLeft.ItemIndex)) and
(FTempMouseSettings.TextShiftAltLeftClick = TMouseOptButtonAction(dropShiftAltLeft.ItemIndex)) and
(FTempMouseSettings.TextShiftCtrlLeftClick = TMouseOptButtonAction(dropShiftCtrlLeft.ItemIndex)) and
(FTempMouseSettings.TextShiftCtrlAltLeftClick = TMouseOptButtonAction(dropShiftAltCtrlLeft.ItemIndex)) and
(FTempMouseSettings.TextDoubleLeftClick = IdxToDoubleMouseOptButtonAction(dropLeftDouble.ItemIndex)) and
(FTempMouseSettings.TextTrippleLeftClick = IdxToDoubleMouseOptButtonAction(dropLeftTripple.ItemIndex)) and
(FTempMouseSettings.TextQuadLeftClick = IdxToDoubleMouseOptButtonAction(dropLeftQuad.ItemIndex)) and
(FTempMouseSettings.TextShiftDoubleLeftClick = IdxToDoubleMouseOptButtonAction(dropLeftShiftDouble.ItemIndex)) and
(FTempMouseSettings.TextAltDoubleLeftClick = IdxToDoubleMouseOptButtonAction(dropLeftAltDouble.ItemIndex)) and
(FTempMouseSettings.TextCtrlDoubleLeftClick = IdxToDoubleMouseOptButtonAction(dropLeftCtrlDouble.ItemIndex)) and
(FTempMouseSettings.TextMiddleClick = TMouseOptButtonAction(dropMiddle.ItemIndex)) and
(FTempMouseSettings.TextShiftMiddleClick = TMouseOptButtonAction(dropShiftMiddle.ItemIndex)) and
(FTempMouseSettings.TextAltMiddleClick = TMouseOptButtonAction(dropAltMiddle.ItemIndex)) and
(FTempMouseSettings.TextCtrlMiddleClick = TMouseOptButtonAction(dropCtrlMiddle.ItemIndex)) and
(FTempMouseSettings.Wheel = TMouseOptWheelAction(dropWheel.ItemIndex)) and
(FTempMouseSettings.CtrlWheel = TMouseOptWheelAction(dropCtrlWheel.ItemIndex)) and
(FTempMouseSettings.AltWheel = TMouseOptWheelAction(dropAltWheel.ItemIndex)) and
@ -268,12 +319,27 @@ procedure TEditorMouseOptionsFrame.SaveTextSettings;
begin
FTempMouseSettings.TextDrag := TextDrag.Checked;
FTempMouseSettings.TextRightMoveCaret := RightMoveCaret.Checked;
FTempMouseSettings.TextDoubleSelLine := TextDoubleSelLine.Checked;
FTempMouseSettings.TextAltLeftClick := TMouseOptButtonAction(dropAltLeft.ItemIndex);
FTempMouseSettings.TextCtrlLeftClick := TMouseOptButtonAction(dropCtrlLeft.ItemIndex);
FTempMouseSettings.TextMiddleClick := TMouseOptButtonAction(dropMiddle.ItemIndex);
FTempMouseSettings.TextCtrlMiddleClick := TMouseOptButtonAction(dropCtrlMiddle.ItemIndex);
FTempMouseSettings.TextAltLeftClick := TMouseOptButtonAction(dropAltLeft.ItemIndex);
FTempMouseSettings.TextCtrlLeftClick := TMouseOptButtonAction(dropCtrlLeft.ItemIndex);
FTempMouseSettings.TextCtrlAltLeftClick := TMouseOptButtonAction(dropAltCtrlLeft.ItemIndex);
FTempMouseSettings.TextShiftLeftClick := TMouseOptButtonAction(dropShiftLeft.ItemIndex);
FTempMouseSettings.TextShiftAltLeftClick := TMouseOptButtonAction(dropShiftAltLeft.ItemIndex);
FTempMouseSettings.TextShiftCtrlLeftClick := TMouseOptButtonAction(dropShiftCtrlLeft.ItemIndex);
FTempMouseSettings.TextShiftCtrlAltLeftClick := TMouseOptButtonAction(dropShiftAltCtrlLeft.ItemIndex);
FTempMouseSettings.TextDoubleLeftClick := IdxToDoubleMouseOptButtonAction(dropLeftDouble.ItemIndex);
FTempMouseSettings.TextTrippleLeftClick := IdxToDoubleMouseOptButtonAction(dropLeftTripple.ItemIndex);
FTempMouseSettings.TextQuadLeftClick := IdxToDoubleMouseOptButtonAction(dropLeftQuad.ItemIndex);
FTempMouseSettings.TextShiftDoubleLeftClick := IdxToDoubleMouseOptButtonAction(dropLeftShiftDouble.ItemIndex);
FTempMouseSettings.TextAltDoubleLeftClick := IdxToDoubleMouseOptButtonAction(dropLeftAltDouble.ItemIndex);
FTempMouseSettings.TextCtrlDoubleLeftClick := IdxToDoubleMouseOptButtonAction(dropLeftCtrlDouble.ItemIndex);
FTempMouseSettings.TextMiddleClick := TMouseOptButtonAction(dropMiddle.ItemIndex);
FTempMouseSettings.TextShiftMiddleClick := TMouseOptButtonAction(dropShiftMiddle.ItemIndex);
FTempMouseSettings.TextAltMiddleClick := TMouseOptButtonAction(dropAltMiddle.ItemIndex);
FTempMouseSettings.TextCtrlMiddleClick := TMouseOptButtonAction(dropCtrlMiddle.ItemIndex);
FTempMouseSettings.Wheel := TMouseOptWheelAction(dropWheel.ItemIndex);
FTempMouseSettings.CtrlWheel := TMouseOptWheelAction(dropCtrlWheel.ItemIndex);
FTempMouseSettings.AltWheel := TMouseOptWheelAction(dropAltWheel.ItemIndex);
@ -302,6 +368,37 @@ begin
UpdateButtons;
end;
function TEditorMouseOptionsFrame.IdxToDoubleMouseOptButtonAction(AIdx: integer): TMouseOptButtonAction;
begin
if AIdx <> 0 then AIdx := AIdx + 3;
Result := TMouseOptButtonAction(AIdx);
end;
procedure TEditorMouseOptionsFrame.CheckForShiftChange(Sender: TObject);
begin
if (Sender = nil) then begin
dropShiftLeft.Items[0] := Format(dlfMouseSimpleButtonSelContinuePlain, [dlfMouseSimpleButtonSelect]);
end;
if (Sender = dropAltLeft) or (Sender = nil) then begin
if TMouseOptButtonAction(dropAltLeft.ItemIndex) in [mbaSelect..mbaSelectLine]
then dropShiftAltLeft.Items[0] := Format(dlfMouseSimpleButtonSelContinue,
[dropAltLeft.Items[dropAltLeft.ItemIndex], AltLeftLabel.Caption])
else dropShiftAltLeft.Items[0] := dlfMouseSimpleButtonNothing;
end;
if (Sender = dropCtrlLeft) or (Sender = nil) then begin
if TMouseOptButtonAction(dropCtrlLeft.ItemIndex) in [mbaSelect..mbaSelectLine]
then dropShiftCtrlLeft.Items[0] := Format(dlfMouseSimpleButtonSelContinue,
[dropCtrlLeft.Items[dropCtrlLeft.ItemIndex], CtrLLeftLabel.Caption])
else dropShiftCtrlLeft.Items[0] := dlfMouseSimpleButtonNothing;
end;
if (Sender = dropAltCtrlLeft) or (Sender = nil) then begin
if TMouseOptButtonAction(dropAltCtrlLeft.ItemIndex) in [mbaSelect..mbaSelectLine]
then dropShiftAltCtrlLeft.Items[0] := Format(dlfMouseSimpleButtonSelContinue,
[dropAltCtrlLeft.Items[dropAltCtrlLeft.ItemIndex], AltCtrlLeftLabel.Caption])
else dropShiftAltCtrlLeft.Items[0] := dlfMouseSimpleButtonNothing;
end;
end;
function TEditorMouseOptionsFrame.GetTitle: String;
begin
Result := dlgMouseOptions;
@ -309,16 +406,27 @@ end;
procedure TEditorMouseOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
procedure SetupButtonCombo(ACombo: TComboBox);
procedure SetupButtonCombo(ACombo: TComboBox; ASkipSel: Boolean = False);
begin
// must be in the order in which the mba* are declared
ACombo.Clear;
ACombo.Items.Add(dlfMouseSimpleButtonNothing); // mbaNone,
ACombo.Items.Add(dlfMouseSimpleButtonSelect); // mbaSelect,
ACombo.Items.Add(dlfMouseSimpleButtonSelectColumn); // mbaSelectColumn,
ACombo.Items.Add(dlfMouseSimpleButtonSelectLine); // mbaSelectLine,
if not ASkipSel then begin
ACombo.Items.Add(dlfMouseSimpleButtonSelect); // mbaSelect,
ACombo.Items.Add(dlfMouseSimpleButtonSelectColumn); // mbaSelectColumn,
ACombo.Items.Add(dlfMouseSimpleButtonSelectLine); // mbaSelectLine,
end;
ACombo.Items.Add(dlfMouseSimpleButtonSetWord); // mbaSelectSetWord,
ACombo.Items.Add(dlfMouseSimpleButtonSetLineSmart); // mbaSelectSetLineSmart,
ACombo.Items.Add(dlfMouseSimpleButtonSetLineFull); // mbaSelectSetLineFull,
ACombo.Items.Add(dlfMouseSimpleButtonSetPara); // mbaSelectSetPara,
ACombo.Items.Add(dlfMouseSimpleButtonPaste); // mbaPaste,
ACombo.Items.Add(dlfMouseSimpleButtonDeclaration); // mbaDeclarationJump,
ACombo.Items.Add(dlfMouseSimpleButtonDeclarationBlock); // mbaDeclarationOrBlockJump,
ACombo.Items.Add(dlfMouseSimpleButtonAddHistoryPoint); // mbaAddHistoryPoint,
ACombo.Items.Add(dlfMouseSimpleButtonHistBack); // mbaHistoryBack,
ACombo.Items.Add(dlfMouseSimpleButtonHistForw); // mbaHistoryForw,
ACombo.Items.Add(dlfMouseSimpleButtonSetFreeBookmark); // mbaSetFreeBookmark,
ACombo.Items.Add(dlfMouseSimpleButtonZoomReset); // mbaZoomReset
end;
@ -350,26 +458,61 @@ begin
TextDividerLabel.Caption := dlfMouseSimpleTextSect;
TextDrag.Caption := dlfMouseSimpleTextSectDrag;
TextDoubleSelLine.Caption := dlfMouseSimpleTextSectDoubleSelLine;
RightMoveCaret.Caption := dlfMouseSimpleRightMoveCaret;
ToolButton1.Caption := dlfMouseSimpleTextSectPageBtn;
ToolButton2.Caption := dlfMouseSimpleTextSectPageWheel;
ToolButtonLeftMod.Caption := dlfMouseSimpleTextSectPageLMod;
ToolButtonLeftMulti.Caption := dlfMouseSimpleTextSectPageLMulti;
ToolButtonMiddle.Caption := dlfMouseSimpleTextSectPageBtn;
ToolBtnWheel.Caption := dlfMouseSimpleTextSectPageWheel;
ToolBar1.AnchorSide[akTop].Side := asrBottom;
AltLeftLabel.Caption := dlfMouseSimpleTextSectAltLeftLabel;
CtrLLeftLabel.Caption := dlfMouseSimpleTextSectCtrlLeftLabel;
// left multi click
lblLeftDouble.Caption := dlfMouseSimpleTextSectLDoubleLabel;
lblLeftTripple.Caption := dlfMouseSimpleTextSectLTrippleLabel;
lblLeftQuad.Caption := dlfMouseSimpleTextSectLQuadLabel;
lblLeftDoubleShift.Caption := dlfMouseSimpleTextSectLDoubleShiftLabel;
lblLeftDoubleCtrl.Caption := dlfMouseSimpleTextSectLDoubleCtrlLabel;
lblLeftDoubleAlt.Caption := dlfMouseSimpleTextSectLDoubleAltLabel;
// left + modifier click
AltLeftLabel.Caption := dlfMouseSimpleTextSectAltLabel;
CtrLLeftLabel.Caption := dlfMouseSimpleTextSectCtrlLabel;
AltCtrlLeftLabel.Caption := dlfMouseSimpleTextSectAltCtrlLabel;
ShiftLeftLabel.Caption := dlfMouseSimpleTextSectShiftLabel;
ShiftAltLeftLabel.Caption := dlfMouseSimpleTextSectShiftAltLabel;
ShiftCtrlLeftLabel.Caption := dlfMouseSimpleTextSectShiftCtrlLabel;
ShiftCtrlAltLeftLabel.Caption := dlfMouseSimpleTextSectShiftAltCtrlLabel;
// middle click
MiddleBtnLabel.Caption := dlfMouseSimpleTextSectMidLabel;
CtrlMiddleBtnLabel.Caption := dlfMouseSimpleTextSectCtrlMidLabel;
ShiftMiddleLabel.Caption := dlfMouseSimpleTextSectShiftLabel;
AltMiddleBtnLabel.Caption := dlfMouseSimpleTextSectAltLabel;
CtrlMiddleBtnLabel.Caption := dlfMouseSimpleTextSectCtrlLabel;
// wheel
WheelBtnLabel.Caption := dlfMouseSimpleTextSectWheelLabel;
CtrlWheelBtnLabel.Caption := dlfMouseSimpleTextSectCtrlWheelLabel;
AltWheelBtnLabel.Caption := dlfMouseSimpleTextSectAltWheelLabel;
ShiftWheelBtnLabel.Caption := dlfMouseSimpleTextShiftSectWheelLabel;
// left multi click
SetupButtonCombo(dropLeftDouble, True);
SetupButtonCombo(dropLeftTripple, True);
SetupButtonCombo(dropLeftQuad, True);
SetupButtonCombo(dropLeftShiftDouble, True);
SetupButtonCombo(dropLeftAltDouble, True);
SetupButtonCombo(dropLeftCtrlDouble, True);
// left + modifier click
SetupButtonCombo(dropShiftLeft);
SetupButtonCombo(dropAltLeft);
SetupButtonCombo(dropCtrlLeft);
SetupButtonCombo(dropAltCtrlLeft);
SetupButtonCombo(dropShiftAltLeft);
SetupButtonCombo(dropShiftCtrlLeft);
SetupButtonCombo(dropShiftAltCtrlLeft);
// middle click
SetupButtonCombo(dropMiddle);
SetupButtonCombo(dropShiftMiddle);
SetupButtonCombo(dropAltMiddle);
SetupButtonCombo(dropCtrlMiddle);
// wheel
SetupWheelCombo(dropWheel);
SetupWheelCombo(dropCtrlWheel);
SetupWheelCombo(dropAltWheel);
@ -412,12 +555,28 @@ begin
end;
TextDrag.Checked := FTempMouseSettings.TextDrag;
RightMoveCaret.Checked := FTempMouseSettings.TextRightMoveCaret;
TextDoubleSelLine.Checked := FTempMouseSettings.TextDoubleSelLine;
dropAltLeft.ItemIndex := ord(FTempMouseSettings.TextAltLeftClick);
dropCtrlLeft.ItemIndex := ord(FTempMouseSettings.TextCtrlLeftClick);
dropMiddle.ItemIndex := ord(FTempMouseSettings.TextMiddleClick);
dropCtrlMiddle.ItemIndex := ord(FTempMouseSettings.TextCtrlMiddleClick);
dropAltLeft.ItemIndex := ord(FTempMouseSettings.TextAltLeftClick);
dropCtrlLeft.ItemIndex := ord(FTempMouseSettings.TextCtrlLeftClick);
dropAltCtrlLeft.ItemIndex := ord(FTempMouseSettings.TextCtrlAltLeftClick);
dropShiftLeft.ItemIndex := ord(FTempMouseSettings.TextShiftLeftClick);
dropShiftAltLeft.ItemIndex := ord(FTempMouseSettings.TextShiftAltLeftClick);
dropShiftCtrlLeft.ItemIndex := ord(FTempMouseSettings.TextShiftCtrlLeftClick);
dropShiftAltCtrlLeft.ItemIndex := ord(FTempMouseSettings.TextShiftCtrlAltLeftClick);
// 1,2&3 are mouse selection, and not avail for double clicks
dropLeftDouble.ItemIndex := Max(ord(FTempMouseSettings.TextDoubleLeftClick)-3,0);
dropLeftTripple.ItemIndex := Max(ord(FTempMouseSettings.TextTrippleLeftClick)-3,0);
dropLeftQuad.ItemIndex := Max(ord(FTempMouseSettings.TextQuadLeftClick)-3,0);
dropLeftShiftDouble.ItemIndex := Max(ord(FTempMouseSettings.TextShiftDoubleLeftClick)-3,0);
dropLeftAltDouble.ItemIndex := Max(ord(FTempMouseSettings.TextAltDoubleLeftClick)-3,0);
dropLeftCtrlDouble.ItemIndex := Max(ord(FTempMouseSettings.TextCtrlDoubleLeftClick)-3,0);
dropMiddle.ItemIndex := ord(FTempMouseSettings.TextMiddleClick);
dropShiftMiddle.ItemIndex := ord(FTempMouseSettings.TextShiftMiddleClick);
dropAltMiddle.ItemIndex := ord(FTempMouseSettings.TextAltMiddleClick);
dropCtrlMiddle.ItemIndex := ord(FTempMouseSettings.TextCtrlMiddleClick);
dropWheel.ItemIndex := ord(FTempMouseSettings.Wheel);
dropCtrlWheel.ItemIndex := ord(FTempMouseSettings.CtrlWheel);
dropAltWheel.ItemIndex := ord(FTempMouseSettings.AltWheel);
@ -427,6 +586,7 @@ begin
UpdateButtons;
HideMouseCheckBox.Checked := eoAutoHideCursor in TEditorOptions(AOptions).SynEditOptions2;
CheckForShiftChange(nil);
end;
procedure TEditorMouseOptionsFrame.WriteSettings(

View File

@ -1320,27 +1320,49 @@ resourcestring
dlfMouseSimpleTextSect = 'Text';
dlfMouseSimpleTextSectAlt = 'Alt-Key sets column mode';
dlfMouseSimpleTextSectDrag = 'Drag selection (copy/paste)';
dlfMouseSimpleTextSectDoubleSelLine = 'Double click selects line';
dlfMouseSimpleRightMoveCaret = 'Right mouse includes caret move';
dlfMouseSimpleTextSectMidLabel = 'Middle Button';
dlfMouseSimpleTextSectCtrlMidLabel = 'Ctrl Middle Button';
dlfMouseSimpleTextSectWheelLabel = 'Wheel';
dlfMouseSimpleTextSectCtrlWheelLabel = 'Ctrl Wheel';
dlfMouseSimpleTextSectAltWheelLabel = 'Alt Wheel';
dlfMouseSimpleTextShiftSectWheelLabel = 'Shift Wheel';
dlfMouseSimpleTextSectPageBtn = 'Buttons';
dlfMouseSimpleTextSectPageLMod = 'Left button 1';
dlfMouseSimpleTextSectPageLMulti = 'Left button 2';
dlfMouseSimpleTextSectPageBtn = 'Middle button';
dlfMouseSimpleTextSectPageWheel = 'Wheel';
dlfMouseSimpleTextSectAltLeftLabel = 'Alt Left Button';
dlfMouseSimpleTextSectCtrlLeftLabel = 'Ctrl Left Button';
dlfMouseSimpleTextSectLDoubleLabel = 'Double';
dlfMouseSimpleTextSectLTrippleLabel = 'Tripple';
dlfMouseSimpleTextSectLQuadLabel = 'Quad';
dlfMouseSimpleTextSectLDoubleShiftLabel = 'Shift Double';
dlfMouseSimpleTextSectLDoubleAltLabel = 'Alt Double';
dlfMouseSimpleTextSectLDoubleCtrlLabel = 'Ctrl Double';
dlfMouseSimpleTextSectShiftLabel = 'Shift Button';
dlfMouseSimpleTextSectAltLabel = 'Alt Button';
dlfMouseSimpleTextSectCtrlLabel = 'Ctrl Button';
dlfMouseSimpleTextSectAltCtrlLabel = 'Alt-Ctrl Button';
dlfMouseSimpleTextSectShiftAltLabel = 'Shift-Alt Button';
dlfMouseSimpleTextSectShiftCtrlLabel = 'Shift-Ctrl Button';
dlfMouseSimpleTextSectShiftAltCtrlLabel = 'Shift-Alt-Ctrl Button';
dlfMouseSimpleButtonNothing = 'Nothing/Default';
dlfMouseSimpleButtonSelContinuePlain = 'Continue %0:s';
dlfMouseSimpleButtonSelContinue = 'Continue %0:s (Bound to: %1:s)';
dlfMouseSimpleButtonSelect = 'Select text';
dlfMouseSimpleButtonSelectColumn = 'Select text (Columns)';
dlfMouseSimpleButtonSelectLine = 'Select text (Lines)';
dlfMouseSimpleButtonSetWord = 'Select current Word';
dlfMouseSimpleButtonSetLineSmart = 'Select current Line (Text)';
dlfMouseSimpleButtonSetLineFull = 'Select current Line (Full)';
dlfMouseSimpleButtonSetPara = 'Select current Paragraph';
dlfMouseSimpleButtonPaste = 'Paste';
dlfMouseSimpleButtonDeclaration = 'Jumps to implementation';
dlfMouseSimpleButtonDeclarationBlock = 'Jumps to implementation/other block end';
dlfMouseSimpleButtonAddHistoryPoint = 'Add history point';
dlfMouseSimpleButtonHistBack = 'History back';
dlfMouseSimpleButtonHistForw = 'History forward';
dlfMouseSimpleButtonSetFreeBookmark = 'Set free bookmark';
dlfMouseSimpleButtonZoomReset = 'Reset zoom';
dlfMouseSimpleWheelNothing = 'Nothing/Default';