mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 10:59:20 +02:00
SynEdit / IDE: add full line selection on line-gutter click
git-svn-id: trunk@48158 -
This commit is contained in:
parent
95fc578439
commit
c740a16492
@ -523,6 +523,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
@ -523,6 +523,10 @@ msgstr "Uchop výběr"
|
||||
msgid "Line Selection"
|
||||
msgstr "Výběr řádky"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Výběr"
|
||||
|
@ -526,6 +526,10 @@ msgstr "Auswahl verschieben"
|
||||
msgid "Line Selection"
|
||||
msgstr "Zeilenmodus"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Auswahl"
|
||||
|
@ -521,6 +521,10 @@ msgstr "Arrastre la selección"
|
||||
msgid "Line Selection"
|
||||
msgstr "Selección de línea"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Selección"
|
||||
|
@ -516,6 +516,10 @@ msgstr "Vedä valinta"
|
||||
msgid "Line Selection"
|
||||
msgstr "Rivivalinta"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Valinta"
|
||||
|
@ -522,6 +522,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
@ -521,6 +521,10 @@ msgstr "גרור את הבחירה"
|
||||
msgid "Line Selection"
|
||||
msgstr "בחירת שורה"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "בחירה"
|
||||
|
@ -523,6 +523,10 @@ msgstr "Kijelölés húzása"
|
||||
msgid "Line Selection"
|
||||
msgstr "Sor kijelölés"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Kijelölés"
|
||||
|
@ -526,6 +526,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
@ -524,6 +524,10 @@ msgstr "Trascina la selezione"
|
||||
msgid "Line Selection"
|
||||
msgstr "Selezione riga"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Selezione"
|
||||
|
@ -524,6 +524,10 @@ msgstr "Vilkti atranką"
|
||||
msgid "Line Selection"
|
||||
msgstr "Eilutės žymėjimas"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Žymėjimas"
|
||||
|
@ -523,6 +523,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
@ -527,6 +527,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr "Zaznaczenie wiersza"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Zaznaczenie"
|
||||
|
@ -513,6 +513,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
@ -522,6 +522,10 @@ msgstr "Arrastar Seleção"
|
||||
msgid "Line Selection"
|
||||
msgstr "Seleção Linha"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Seleção"
|
||||
|
@ -522,6 +522,10 @@ msgstr "Перетаскивание выделенного"
|
||||
msgid "Line Selection"
|
||||
msgstr "Выбор строки"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Выделение"
|
||||
|
@ -524,6 +524,10 @@ msgstr "Вибір Перетягування"
|
||||
msgid "Line Selection"
|
||||
msgstr "Вибір Рядка"
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr "Вибір"
|
||||
|
@ -526,6 +526,10 @@ msgstr ""
|
||||
msgid "Line Selection"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartlineselectionsnoneempty
|
||||
msgid "Line Selection (select immediate)"
|
||||
msgstr ""
|
||||
|
||||
#: syneditstrconst.syns_emcstartselection
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
@ -3104,7 +3104,7 @@ begin
|
||||
|
||||
case ACommand of
|
||||
emcNone: ; // do nothing, but result := true
|
||||
emcStartSelections, emcStartColumnSelections, emcStartLineSelections,
|
||||
emcStartSelections, emcStartColumnSelections, emcStartLineSelections, emcStartLineSelectionsNoneEmpty,
|
||||
emcStartSelectTokens, emcStartSelectWords, emcStartSelectLines:
|
||||
begin
|
||||
FMouseSelectionCmd := emcNone;
|
||||
@ -3117,6 +3117,13 @@ begin
|
||||
FMouseSelectionMode := smColumn;
|
||||
emcStartLineSelections:
|
||||
FMouseSelectionMode := smLine;
|
||||
emcStartLineSelectionsNoneEmpty: begin
|
||||
FMouseSelectionMode := smLine;
|
||||
if (AnAction.Option <> emcoSelectionContinue) or (not SelAvail) then
|
||||
FBlockSelection.StartLineBytePos := FCaret.LineBytePos;
|
||||
FBlockSelection.ActiveSelectionMode := smLine;
|
||||
FBlockSelection.ForceSingleLineSelected := True;
|
||||
end;
|
||||
emcStartSelectTokens, emcStartSelectWords, emcStartSelectLines: begin
|
||||
FMouseSelectionCmd := ACommand;
|
||||
AnInfo.NewCaret.LineCharPos := PixelsToRowColumn(Point(AnInfo.MouseX, AnInfo.MouseY), [scmLimitToLines, scmForceLeftSidePos]);
|
||||
@ -3596,8 +3603,9 @@ begin
|
||||
if (sfMouseSelecting in fStateFlags) and ((fScrollDeltaX <> 0) or (fScrollDeltaY <> 0)) then
|
||||
Include(fStateFlags, sfMouseDoneSelecting);
|
||||
end;
|
||||
if sfMouseDoneSelecting in fStateFlags then
|
||||
if sfMouseDoneSelecting in fStateFlags then begin
|
||||
FBlockSelection.ActiveSelectionMode := FMouseSelectionMode;
|
||||
end;
|
||||
if sfIsDragging in fStateFlags then
|
||||
FBlockSelection.DecPersistentLock;
|
||||
end
|
||||
|
@ -262,6 +262,7 @@ const
|
||||
emcStartSelections = TSynEditorMouseCommand(1); // Start BlockSelection (Default Left Mouse Btn)
|
||||
emcStartColumnSelections = TSynEditorMouseCommand(3); // Column BlockSelection (Default Alt - Left Mouse Btn)
|
||||
emcStartLineSelections = TSynEditorMouseCommand(4); // Line BlockSelection (Default Alt - Left Mouse Btn)
|
||||
emcStartLineSelectionsNoneEmpty = TSynEditorMouseCommand(5); // Line BlockSelection (Default Alt - Left Mouse Btn)
|
||||
|
||||
emcSelectWord = TSynEditorMouseCommand(6);
|
||||
emcSelectLine = TSynEditorMouseCommand(7);
|
||||
@ -357,11 +358,12 @@ const
|
||||
implementation
|
||||
|
||||
const
|
||||
SynMouseCommandNames: array [0..27] of TIdentMapEntry = (
|
||||
SynMouseCommandNames: array [0..28] of TIdentMapEntry = (
|
||||
(Value: emcNone; Name: 'emcNone'),
|
||||
(Value: emcStartSelections; Name: 'emcStartSelections'),
|
||||
(Value: emcStartColumnSelections; Name: 'emcStartColumnSelections'),
|
||||
(Value: emcStartLineSelections; Name: 'emcStartLineSelections'),
|
||||
(Value: emcStartLineSelectionsNoneEmpty; Name: 'emcStartLineSelectionsNoneEmpty'),
|
||||
|
||||
(Value: emcSelectWord; Name: 'emcSelectWord'),
|
||||
(Value: emcSelectLine; Name: 'emcSelectLine'),
|
||||
@ -424,6 +426,7 @@ begin
|
||||
emcStartSelections: Result := SYNS_emcStartSelection;
|
||||
emcStartColumnSelections: Result := SYNS_emcStartColumnSelections;
|
||||
emcStartLineSelections: Result := SYNS_emcStartLineSelections;
|
||||
emcStartLineSelectionsNoneEmpty: Result := SYNS_emcStartLineSelectionsNoneEmpty;
|
||||
emcSelectWord: Result := SYNS_emcSelectWord;
|
||||
emcSelectLine: Result := SYNS_emcSelectLine;
|
||||
emcSelectPara: Result := SYNS_emcSelectPara;
|
||||
@ -473,7 +476,8 @@ begin
|
||||
case emc of
|
||||
emcStartSelections,
|
||||
emcStartColumnSelections,
|
||||
emcStartLineSelections: Result := SYNS_emcSelection_opt;
|
||||
emcStartLineSelections,
|
||||
emcStartLineSelectionsNoneEmpty: Result := SYNS_emcSelection_opt;
|
||||
emcSelectLine: Result := SYNS_emcSelectLine_opt;
|
||||
emcMouseLink: Result := SYNS_emcMouseLink_opt;
|
||||
emcCodeFoldCollaps: Result := SYNS_emcCodeFoldCollaps_opt;
|
||||
|
@ -103,6 +103,7 @@ type
|
||||
FEnabled: Boolean;
|
||||
FHookedLines: Boolean;
|
||||
FIsSettingText: Boolean;
|
||||
FForceSingleLineSelected: Boolean;
|
||||
FActiveSelectionMode: TSynSelectionMode;
|
||||
FSelectionMode: TSynSelectionMode;
|
||||
FStartLinePos: Integer; // 1 based
|
||||
@ -126,6 +127,7 @@ type
|
||||
procedure SetCaret(const AValue: TSynEditCaret);
|
||||
procedure SetEnabled(const Value : Boolean);
|
||||
procedure SetActiveSelectionMode(const Value: TSynSelectionMode);
|
||||
procedure SetForceSingleLineSelected(AValue: Boolean);
|
||||
procedure SetHide(const AValue: Boolean);
|
||||
procedure SetPersistent(const AValue: Boolean);
|
||||
procedure SetSelectionMode (const AValue: TSynSelectionMode);
|
||||
@ -163,6 +165,7 @@ type
|
||||
procedure AddBeforeSetSelTextHandler(AHandler: TSynBeforeSetSelTextEvent);
|
||||
procedure RemoveBeforeSetSelTextHandler(AHandler: TSynBeforeSetSelTextEvent);
|
||||
property Enabled: Boolean read FEnabled write SetEnabled;
|
||||
property ForceSingleLineSelected: Boolean read FForceSingleLineSelected write SetForceSingleLineSelected;
|
||||
property ActiveSelectionMode: TSynSelectionMode
|
||||
read FActiveSelectionMode write SetActiveSelectionMode;
|
||||
property SelectionMode: TSynSelectionMode
|
||||
@ -2159,6 +2162,7 @@ begin
|
||||
FInvalidateLinesMethod(nInval1, nInval2);
|
||||
end;
|
||||
FActiveSelectionMode := FSelectionMode;
|
||||
FForceSingleLineSelected := False;
|
||||
FHide := False;
|
||||
FStartLinePos := Value.Y;
|
||||
FStartBytePos := Value.X;
|
||||
@ -2261,6 +2265,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSynEditSelection.SetForceSingleLineSelected(AValue: Boolean);
|
||||
var
|
||||
WasAvail: Boolean;
|
||||
begin
|
||||
if FForceSingleLineSelected = AValue then Exit;
|
||||
WasAvail := SelAvail;
|
||||
FForceSingleLineSelected := AValue;
|
||||
|
||||
if WasAvail <> SelAvail then
|
||||
fOnChangeList.CallNotifyEvents(self);
|
||||
end;
|
||||
|
||||
procedure TSynEditSelection.SetHide(const AValue: Boolean);
|
||||
begin
|
||||
if FHide = AValue then exit;
|
||||
@ -2337,7 +2353,8 @@ begin
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result := (FStartBytePos <> FEndBytePos) or (FStartLinePos <> FEndLinePos);
|
||||
Result := (FStartBytePos <> FEndBytePos) or (FStartLinePos <> FEndLinePos)
|
||||
or ( (FActiveSelectionMode = smLine) and FForceSingleLineSelected);
|
||||
end;
|
||||
|
||||
function TSynEditSelection.SelCanContinue(ACaret: TSynEditCaret): Boolean;
|
||||
|
@ -401,6 +401,7 @@ resourcestring
|
||||
SYNS_emcStartSelection = 'Selection';
|
||||
SYNS_emcStartColumnSelections = 'Column Selection';
|
||||
SYNS_emcStartLineSelections = 'Line Selection';
|
||||
SYNS_emcStartLineSelectionsNoneEmpty = 'Line Selection (select immediate)';
|
||||
SYNS_emcSelection_opt = 'Mode,Begin,Continue';
|
||||
SYNS_emcSelectWord = 'Select Word';
|
||||
SYNS_emcSelectLine = 'Select Line';
|
||||
|
@ -717,7 +717,11 @@ type
|
||||
end;
|
||||
|
||||
TEditorOptions = class;
|
||||
TMouseOptGutterLeftType = (moGLDownClick, moglUpClickAndSelect);
|
||||
TMouseOptGutterLeftType = (
|
||||
moGLDownClick,
|
||||
moglUpClickAndSelect,
|
||||
moglUpClickAndSelectRighHalf // Changes and fold gutter (parts close to the text)
|
||||
);
|
||||
TMouseOptButtonActionOld = (
|
||||
mbaNone,
|
||||
mbaSelect, mbaSelectColumn, mbaSelectLine,
|
||||
@ -775,7 +779,9 @@ type
|
||||
FUserSchemes: TQuickStringlist;
|
||||
private
|
||||
FCustomSavedActions: Boolean;
|
||||
FGutterActionsChanges: TSynEditMouseActions;
|
||||
FMainActions, FSelActions, FTextActions: TSynEditMouseActions;
|
||||
FSelectOnLineNumbers: Boolean;
|
||||
FName: String;
|
||||
FGutterActions: TSynEditMouseActions;
|
||||
FGutterActionsFold, FGutterActionsFoldExp, FGutterActionsFoldCol: TSynEditMouseActions;
|
||||
@ -887,9 +893,12 @@ type
|
||||
property GutterActionsFoldExp: TSynEditMouseActions read FGutterActionsFoldExp;
|
||||
property GutterActionsFoldCol: TSynEditMouseActions read FGutterActionsFoldCol;
|
||||
property GutterActionsLines: TSynEditMouseActions read FGutterActionsLines;
|
||||
property GutterActionsChanges: TSynEditMouseActions read FGutterActionsChanges;
|
||||
published
|
||||
property GutterLeft: TMouseOptGutterLeftType read FGutterLeft write FGutterLeft
|
||||
default moglUpClickAndSelect;
|
||||
property SelectOnLineNumbers: Boolean read FSelectOnLineNumbers write FSelectOnLineNumbers
|
||||
default True;
|
||||
property TextDrag: Boolean read FTextDrag write FTextDrag
|
||||
default True;
|
||||
property TextRightMoveCaret: Boolean read FTextRightMoveCaret write FTextRightMoveCaret
|
||||
@ -3234,6 +3243,7 @@ begin
|
||||
FGutterActionsFoldExp := TSynEditMouseActions.Create(nil);
|
||||
FGutterActionsFoldCol := TSynEditMouseActions.Create(nil);
|
||||
FGutterActionsLines := TSynEditMouseActions.Create(nil);
|
||||
FGutterActionsChanges := TSynEditMouseActions.Create(nil);
|
||||
FUserSchemes := TQuickStringlist.Create;
|
||||
FVersion := 0;
|
||||
end;
|
||||
@ -3250,6 +3260,7 @@ begin
|
||||
FGutterActionsFoldExp.Free;
|
||||
FGutterActionsFoldCol.Free;
|
||||
FGutterActionsLines.Free;
|
||||
FGutterActionsChanges.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -3321,9 +3332,17 @@ begin
|
||||
|
||||
FTextRightMoveCaret := False;
|
||||
FTextDrag := True;
|
||||
FSelectOnLineNumbers := True;
|
||||
end;
|
||||
|
||||
procedure TEditorMouseOptions.ResetGutterToDefault;
|
||||
procedure AddStartSel(List: TSynEditMouseActions);
|
||||
begin
|
||||
with List do begin
|
||||
AddCommand(emcStartSelections, True, mbXLeft, ccAny, cdDown, [], [ssShift], emcoSelectionStart);
|
||||
AddCommand(emcStartSelections, True, mbXLeft, ccAny, cdDown, [ssShift], [ssShift], emcoSelectionContinue);
|
||||
end;
|
||||
end;
|
||||
var
|
||||
CDir: TSynMAClickDir;
|
||||
R: TSynMAUpRestrictions;
|
||||
@ -3333,6 +3352,7 @@ begin
|
||||
FGutterActionsFoldExp.Clear;
|
||||
FGutterActionsFoldCol.Clear;
|
||||
FGutterActionsLines.Clear;
|
||||
FGutterActionsChanges.Clear;
|
||||
//TMouseOptGutterLeftType = (moGLDownClick, moglUpClickAndSelect);
|
||||
|
||||
with FGutterActions do begin
|
||||
@ -3342,19 +3362,48 @@ begin
|
||||
AddCommand(emcCodeFoldContextMenu, False, mbXRight, ccSingle, cdUp, [], []);
|
||||
end;
|
||||
|
||||
|
||||
CDir := cdDown;
|
||||
R := [];
|
||||
if FGutterLeft = moglUpClickAndSelect then begin
|
||||
CDir := cdUp;
|
||||
R := crRestrictAll;
|
||||
with FGutterActions do begin
|
||||
AddCommand(emcStartSelections, True, mbXLeft, ccAny, cdDown, [], [ssShift], emcoSelectionStart);
|
||||
AddCommand(emcStartSelections, True, mbXLeft, ccAny, cdDown, [ssShift], [ssShift], emcoSelectionContinue);
|
||||
end;
|
||||
AddStartSel(FGutterActions);
|
||||
end;
|
||||
|
||||
with FGutterActions do begin
|
||||
AddCommand(emcOnMainGutterClick, False, mbXLeft, ccAny, CDir, R, [], []); // breakpoint
|
||||
end;
|
||||
|
||||
|
||||
if FGutterLeft in [moglUpClickAndSelect, moglUpClickAndSelectRighHalf] then begin
|
||||
CDir := cdUp;
|
||||
R := crRestrictAll;
|
||||
AddStartSel(FGutterActionsChanges);
|
||||
end;
|
||||
|
||||
with FGutterActionsChanges do begin
|
||||
if FGutterLeft = moGLDownClick then
|
||||
AddCommand(emcNone, False, mbXLeft, ccAny, cdDown, [], []);
|
||||
AddCommand(emcNone, False, mbXLeft, ccAny, cdUp, [], []);
|
||||
end;
|
||||
|
||||
|
||||
if FGutterLeft = moglUpClickAndSelectRighHalf then begin
|
||||
if not FSelectOnLineNumbers then
|
||||
AddStartSel(FGutterActionsLines);
|
||||
AddStartSel(FGutterActionsFold);
|
||||
end;
|
||||
|
||||
|
||||
if FSelectOnLineNumbers then begin
|
||||
with FGutterActionsLines do begin
|
||||
AddCommand(emcStartLineSelectionsNoneEmpty, True, mbXLeft, ccAny, cdDown, [], [ssShift], emcoSelectionStart);
|
||||
AddCommand(emcStartLineSelectionsNoneEmpty, True, mbXLeft, ccAny, cdDown, [ssShift], [ssShift], emcoSelectionContinue);
|
||||
AddCommand(emcNone, False, mbXLeft, ccAny, cdUp, [], []);
|
||||
end;
|
||||
end;
|
||||
|
||||
with FGutterActionsFold do begin
|
||||
AddCommand(emcNone, False, mbXLeft, ccAny, CDir, R, [], []);
|
||||
end;
|
||||
@ -3659,6 +3708,7 @@ begin
|
||||
FGutterActionsFoldExp.Assign(Src.GutterActionsFoldExp);
|
||||
FGutterActionsFoldCol.Assign(Src.GutterActionsFoldCol);
|
||||
FGutterActionsLines.Assign (Src.GutterActionsLines);
|
||||
FGutterActionsChanges.Assign(Src.GutterActionsChanges);
|
||||
end;
|
||||
|
||||
procedure TEditorMouseOptions.SetTextCtrlLeftClick(AValue: TMouseOptButtonActionOld);
|
||||
@ -3686,6 +3736,7 @@ begin
|
||||
FName := Src.FName;
|
||||
|
||||
FGutterLeft := Src.GutterLeft;
|
||||
FSelectOnLineNumbers := Src.SelectOnLineNumbers;
|
||||
FTextDrag := Src.TextDrag;
|
||||
FTextRightMoveCaret := Src.TextRightMoveCaret;
|
||||
FSelectedUserScheme := Src.FSelectedUserScheme;
|
||||
@ -3792,7 +3843,8 @@ begin
|
||||
Temp.GutterActionsFold.Equals (self.GutterActionsFold) and
|
||||
Temp.GutterActionsFoldCol.Equals(self.GutterActionsFoldCol) and
|
||||
Temp.GutterActionsFoldExp.Equals(self.GutterActionsFoldExp) and
|
||||
Temp.GutterActionsLines.Equals (self.GutterActionsLines);
|
||||
Temp.GutterActionsLines.Equals (self.GutterActionsLines) and
|
||||
Temp.GutterActionsChanges.Equals(Self.GutterActionsChanges);
|
||||
Temp.Free;
|
||||
end;
|
||||
|
||||
@ -3897,6 +3949,7 @@ begin
|
||||
LoadMouseAct(aPath + 'GutterFoldExp/', GutterActionsFoldExp);
|
||||
LoadMouseAct(aPath + 'GutterFoldCol/', GutterActionsFoldCol);
|
||||
LoadMouseAct(aPath + 'GutterLineNum/', GutterActionsLines);
|
||||
LoadMouseAct(aPath + 'GutterLineChange/', GutterActionsChanges);
|
||||
|
||||
if Version < 1 then begin
|
||||
try
|
||||
@ -3955,6 +4008,7 @@ begin
|
||||
SaveMouseAct(aPath + 'GutterFoldExp/', GutterActionsFoldExp);
|
||||
SaveMouseAct(aPath + 'GutterFoldCol/', GutterActionsFoldCol);
|
||||
SaveMouseAct(aPath + 'GutterLineNum/', GutterActionsLines);
|
||||
SaveMouseAct(aPath + 'GutterLineChange/', GutterActionsChanges);
|
||||
end else begin
|
||||
// clear unused entries
|
||||
aXMLConfig.DeletePath(aPath + 'Main');
|
||||
@ -4007,6 +4061,7 @@ begin
|
||||
LoadMouseAct(aPath + 'GutterFoldExp/', GutterActionsFoldExp);
|
||||
LoadMouseAct(aPath + 'GutterFoldCol/', GutterActionsFoldCol);
|
||||
LoadMouseAct(aPath + 'GutterLineNum/', GutterActionsLines);
|
||||
LoadMouseAct(aPath + 'GutterLineChange/', GutterActionsChanges);
|
||||
end;
|
||||
|
||||
procedure TEditorMouseOptions.ExportToXml(aXMLConfig: TRttiXMLConfig; aPath: String);
|
||||
@ -4037,6 +4092,7 @@ begin
|
||||
SaveMouseAct(aPath + 'GutterFoldExp/', GutterActionsFoldExp);
|
||||
SaveMouseAct(aPath + 'GutterFoldCol/', GutterActionsFoldCol);
|
||||
SaveMouseAct(aPath + 'GutterLineNum/', GutterActionsLines);
|
||||
SaveMouseAct(aPath + 'GutterLineChange/', GutterActionsChanges);
|
||||
MAct.Free;
|
||||
end;
|
||||
|
||||
@ -5625,12 +5681,14 @@ begin
|
||||
if ASynEdit.Gutter.LineNumberPart <> nil then begin
|
||||
ASynEdit.Gutter.LineNumberPart.MouseActions.Assign(FUserMouseSettings.GutterActionsLines);
|
||||
end;
|
||||
if ShowLineNumbers then begin // changes does the same as linenumbers
|
||||
if ASynEdit.Gutter.ChangesPart<> nil then
|
||||
ASynEdit.Gutter.ChangesPart.MouseActions.Assign(FUserMouseSettings.GutterActionsLines);
|
||||
if (ASynEdit.Gutter.SeparatorPart <> nil) and (GutterSeparatorIndex = 2) then
|
||||
ASynEdit.Gutter.SeparatorPart.MouseActions.Assign(FUserMouseSettings.GutterActionsLines);
|
||||
end;
|
||||
if ASynEdit.Gutter.ChangesPart<> nil then
|
||||
ASynEdit.Gutter.ChangesPart.MouseActions.Assign(FUserMouseSettings.GutterActionsChanges);
|
||||
|
||||
if (ASynEdit.Gutter.SeparatorPart <> nil) and (GutterSeparatorIndex = 2) and ShowLineNumbers then
|
||||
ASynEdit.Gutter.SeparatorPart.MouseActions.Assign(FUserMouseSettings.GutterActionsLines)
|
||||
else
|
||||
if (ASynEdit.Gutter.SeparatorPart <> nil) and (GutterSeparatorIndex >= 2) then
|
||||
ASynEdit.Gutter.SeparatorPart.MouseActions.Assign(FUserMouseSettings.GutterActionsChanges);
|
||||
finally
|
||||
ASynEdit.EndUpdate;
|
||||
end;
|
||||
|
@ -19,13 +19,13 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 29
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 636
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 29
|
||||
ClientHeight = 23
|
||||
ClientWidth = 636
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
@ -34,8 +34,8 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropUserSchemes
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 3
|
||||
Height = 19
|
||||
Top = 2
|
||||
Width = 138
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'chkPredefinedScheme'
|
||||
@ -49,13 +49,13 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = pnlUserSchemes
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 150
|
||||
Height = 29
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 200
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
Constraints.MaxWidth = 200
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = dropUserSchemesChange
|
||||
OnExit = dropUserSchemesChange
|
||||
OnKeyDown = dropUserSchemesKeyDown
|
||||
@ -68,9 +68,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = GenericDividerLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 58
|
||||
Width = 135
|
||||
Height = 19
|
||||
Top = 50
|
||||
Width = 133
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'HideMouseCheckBox'
|
||||
TabOrder = 1
|
||||
@ -82,13 +82,13 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 81
|
||||
Top = 110
|
||||
Height = 107
|
||||
Top = 96
|
||||
Width = 636
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 81
|
||||
ClientHeight = 107
|
||||
ClientWidth = 636
|
||||
TabOrder = 2
|
||||
object PanelGutter: TPanel
|
||||
@ -97,7 +97,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = pnlAllGutter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 46
|
||||
Height = 57
|
||||
Top = 0
|
||||
Width = 624
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -105,7 +105,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 46
|
||||
ClientHeight = 57
|
||||
ClientWidth = 624
|
||||
TabOrder = 0
|
||||
object GutterLeftRadio1: TRadioButton
|
||||
@ -114,7 +114,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = PanelGutter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 624
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -131,24 +131,39 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = PanelGutter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 23
|
||||
Height = 19
|
||||
Top = 19
|
||||
Width = 624
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Caption = 'GutterLeftRadio2'
|
||||
OnChange = CheckOrRadioChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object GutterLeftRadio3: TRadioButton
|
||||
AnchorSideLeft.Control = PanelGutter
|
||||
AnchorSideTop.Control = GutterLeftRadio2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = PanelGutter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 38
|
||||
Width = 624
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Caption = 'GutterLeftRadio3'
|
||||
OnChange = CheckOrRadioChange
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object ResetGutterButton: TButton
|
||||
AnchorSideTop.Control = PanelGutter
|
||||
AnchorSideTop.Control = chkGutterTextLines
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = pnlAllGutter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 515
|
||||
Height = 29
|
||||
Top = 52
|
||||
Width = 115
|
||||
Left = 507
|
||||
Height = 25
|
||||
Top = 82
|
||||
Width = 123
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
@ -157,6 +172,18 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
OnClick = ResetGutterButtonClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object chkGutterTextLines: TCheckBox
|
||||
AnchorSideLeft.Control = PanelGutter
|
||||
AnchorSideTop.Control = PanelGutter
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 57
|
||||
Width = 121
|
||||
Caption = 'chkGutterTextLines'
|
||||
OnChange = CheckOrRadioChange
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object pnlAllText: TPanel
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -166,13 +193,13 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnlBottom
|
||||
Left = 0
|
||||
Height = 324
|
||||
Top = 220
|
||||
Height = 318
|
||||
Top = 230
|
||||
Width = 636
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 324
|
||||
ClientHeight = 318
|
||||
ClientWidth = 636
|
||||
TabOrder = 3
|
||||
object PanelTextCheckBox: TPanel
|
||||
@ -181,7 +208,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = pnlAllText
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 46
|
||||
Height = 38
|
||||
Top = 0
|
||||
Width = 624
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -191,15 +218,15 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
BorderSpacing.Bottom = 6
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 46
|
||||
ClientHeight = 38
|
||||
ClientWidth = 624
|
||||
TabOrder = 0
|
||||
object TextDrag: TCheckBox
|
||||
AnchorSideLeft.Control = PanelTextCheckBox
|
||||
Left = 0
|
||||
Height = 23
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 75
|
||||
Width = 67
|
||||
Caption = 'TextDrag'
|
||||
OnChange = CheckOrRadioChange
|
||||
TabOrder = 0
|
||||
@ -209,9 +236,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = TextDrag
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 23
|
||||
Width = 111
|
||||
Height = 19
|
||||
Top = 19
|
||||
Width = 106
|
||||
Caption = 'RightMoveCaret'
|
||||
OnChange = CheckOrRadioChange
|
||||
TabOrder = 1
|
||||
@ -225,7 +252,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 26
|
||||
Top = 52
|
||||
Top = 44
|
||||
Width = 636
|
||||
Align = alNone
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -234,7 +261,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
TabOrder = 1
|
||||
object ToolBtnMiddle: TToolButton
|
||||
Tag = 2
|
||||
Left = 196
|
||||
Left = 194
|
||||
Top = 2
|
||||
Caption = 'ToolBtnMiddle'
|
||||
Grouped = True
|
||||
@ -243,7 +270,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
end
|
||||
object ToolBtnWheel: TToolButton
|
||||
Tag = 3
|
||||
Left = 283
|
||||
Left = 281
|
||||
Top = 2
|
||||
Caption = 'ToolBtnWheel'
|
||||
Grouped = True
|
||||
@ -261,7 +288,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
end
|
||||
object ToolBtnLeftMulti: TToolButton
|
||||
Tag = 1
|
||||
Left = 97
|
||||
Left = 96
|
||||
Top = 2
|
||||
Caption = 'ToolBtnLeftMulti'
|
||||
Grouped = True
|
||||
@ -270,7 +297,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
end
|
||||
object ToolBtnRight: TToolButton
|
||||
Tag = 4
|
||||
Left = 367
|
||||
Left = 364
|
||||
Top = 2
|
||||
Caption = 'ToolBtnRight'
|
||||
Grouped = True
|
||||
@ -279,7 +306,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
end
|
||||
object ToolBtnExtra1: TToolButton
|
||||
Tag = 5
|
||||
Left = 444
|
||||
Left = 442
|
||||
Top = 2
|
||||
Caption = 'ToolBtnExtra1'
|
||||
Grouped = True
|
||||
@ -288,7 +315,7 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
end
|
||||
object ToolBtnExtra2: TToolButton
|
||||
Tag = 6
|
||||
Left = 530
|
||||
Left = 523
|
||||
Top = 2
|
||||
Caption = 'ToolBtnExtra2'
|
||||
Grouped = True
|
||||
@ -303,10 +330,10 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnlAllText
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 526
|
||||
Height = 29
|
||||
Top = 295
|
||||
Width = 104
|
||||
Left = 518
|
||||
Height = 25
|
||||
Top = 293
|
||||
Width = 112
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
@ -323,8 +350,8 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ResetTextButton
|
||||
Left = 0
|
||||
Height = 211
|
||||
Top = 78
|
||||
Height = 217
|
||||
Top = 70
|
||||
Width = 636
|
||||
PageIndex = 0
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
@ -333,17 +360,17 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
object PageLeftMod: TPage
|
||||
object ScrollBoxLeftMod: TScrollBox
|
||||
Left = 0
|
||||
Height = 211
|
||||
Height = 217
|
||||
Top = 0
|
||||
Width = 636
|
||||
HorzScrollBar.Page = 623
|
||||
HorzScrollBar.Page = 246
|
||||
HorzScrollBar.Tracking = True
|
||||
VertScrollBar.Page = 211
|
||||
VertScrollBar.Page = 203
|
||||
VertScrollBar.Tracking = True
|
||||
Align = alClient
|
||||
BorderStyle = bsNone
|
||||
ClientHeight = 211
|
||||
ClientWidth = 623
|
||||
ClientHeight = 217
|
||||
ClientWidth = 636
|
||||
TabOrder = 0
|
||||
object dropCtrlLeft: TComboBox
|
||||
AnchorSideLeft.Control = dropAltLeft
|
||||
@ -352,14 +379,14 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Top = 41
|
||||
Width = 477
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 0
|
||||
@ -369,9 +396,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropCtrlLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 47
|
||||
Width = 73
|
||||
Height = 15
|
||||
Top = 39
|
||||
Width = 70
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'CtrLLeftLabel'
|
||||
ParentColor = False
|
||||
@ -382,14 +409,14 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 477
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
@ -399,9 +426,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropAltLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 12
|
||||
Width = 65
|
||||
Height = 15
|
||||
Top = 10
|
||||
Width = 63
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AltLeftLabel'
|
||||
ParentColor = False
|
||||
@ -413,15 +440,15 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Top = 111
|
||||
Width = 477
|
||||
Height = 23
|
||||
Top = 93
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 140
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 2
|
||||
@ -433,14 +460,14 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Top = 76
|
||||
Width = 477
|
||||
Height = 23
|
||||
Top = 64
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 3
|
||||
@ -452,14 +479,14 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Top = 146
|
||||
Width = 477
|
||||
Height = 23
|
||||
Top = 122
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 4
|
||||
@ -471,14 +498,14 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Top = 181
|
||||
Width = 477
|
||||
Height = 23
|
||||
Top = 151
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 5
|
||||
@ -490,14 +517,14 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ScrollBoxLeftMod
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 140
|
||||
Height = 29
|
||||
Top = 216
|
||||
Width = 477
|
||||
Height = 23
|
||||
Top = 180
|
||||
Width = 490
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
DropDownCount = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnChange = CheckOrRadioChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 6
|
||||
@ -507,9 +534,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropShiftLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 117
|
||||
Width = 73
|
||||
Height = 15
|
||||
Top = 97
|
||||
Width = 72
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShiftLeftLabel'
|
||||
ParentColor = False
|
||||
@ -519,9 +546,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropAltCtrlLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 82
|
||||
Width = 87
|
||||
Height = 15
|
||||
Top = 68
|
||||
Width = 82
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AltCtrlLeftLabel'
|
||||
ParentColor = False
|
||||
@ -531,9 +558,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropShiftCtrlLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 187
|
||||
Width = 95
|
||||
Height = 15
|
||||
Top = 155
|
||||
Width = 91
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShiftCtrlLeftLabel'
|
||||
ParentColor = False
|
||||
@ -543,9 +570,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropShiftAltLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 152
|
||||
Width = 89
|
||||
Height = 15
|
||||
Top = 126
|
||||
Width = 87
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShiftAltLeftLabel'
|
||||
ParentColor = False
|
||||
@ -555,9 +582,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideTop.Control = dropShiftAltCtrlLeft
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 222
|
||||
Width = 111
|
||||
Height = 15
|
||||
Top = 184
|
||||
Width = 106
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShiftAltCtrlLeftLabel'
|
||||
ParentColor = False
|
||||
@ -2181,13 +2208,13 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 44
|
||||
Top = 544
|
||||
Height = 40
|
||||
Top = 548
|
||||
Width = 636
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
ClientHeight = 40
|
||||
ClientWidth = 636
|
||||
TabOrder = 4
|
||||
object BottomDivider: TBevel
|
||||
@ -2210,9 +2237,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ResetAllButton
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Height = 15
|
||||
Top = 15
|
||||
Width = 523
|
||||
Width = 514
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
@ -2229,9 +2256,9 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = ResetAllButton
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Height = 15
|
||||
Top = 15
|
||||
Width = 523
|
||||
Width = 514
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
@ -2247,10 +2274,10 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = pnlBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 535
|
||||
Height = 29
|
||||
Left = 526
|
||||
Height = 25
|
||||
Top = 15
|
||||
Width = 95
|
||||
Width = 104
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
@ -2267,8 +2294,8 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 35
|
||||
Height = 15
|
||||
Top = 29
|
||||
Width = 624
|
||||
Caption = 'GenericDividerLabel'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -2283,8 +2310,8 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 87
|
||||
Height = 15
|
||||
Top = 75
|
||||
Width = 624
|
||||
Caption = 'GutterDividerLabel'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -2299,8 +2326,8 @@ object EditorMouseOptionsFrame: TEditorMouseOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 197
|
||||
Height = 15
|
||||
Top = 209
|
||||
Width = 624
|
||||
Caption = 'TextDividerLabel'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
|
@ -33,6 +33,8 @@ type
|
||||
{ TEditorMouseOptionsFrame }
|
||||
|
||||
TEditorMouseOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
chkGutterTextLines: TCheckBox;
|
||||
GutterLeftRadio3: TRadioButton;
|
||||
lblWheel: TLabel;
|
||||
lblWheelAlt: TLabel;
|
||||
lblWheelCtrl: TLabel;
|
||||
@ -497,8 +499,12 @@ procedure TEditorMouseOptionsFrame.SaveGutterSettings;
|
||||
begin
|
||||
if GutterLeftRadio2.Checked then
|
||||
FTempMouseSettings.GutterLeft := moglUpClickAndSelect
|
||||
else
|
||||
if GutterLeftRadio3.Checked then
|
||||
FTempMouseSettings.GutterLeft := moglUpClickAndSelectRighHalf
|
||||
else
|
||||
FTempMouseSettings.GutterLeft := moGLDownClick;
|
||||
FTempMouseSettings.SelectOnLineNumbers := chkGutterTextLines.Checked;
|
||||
FTempMouseSettings.ResetGutterToDefault;
|
||||
if FDialog.FindEditor(TEditorMouseOptionsAdvFrame) <> nil then
|
||||
TEditorMouseOptionsAdvFrame(FDialog.FindEditor(TEditorMouseOptionsAdvFrame)).RefreshSettings;
|
||||
@ -605,6 +611,8 @@ begin
|
||||
GutterDividerLabel.Caption := dlfMouseSimpleGutterSect;
|
||||
GutterLeftRadio1.Caption := dlfMouseSimpleGutterLeftDown;
|
||||
GutterLeftRadio2.Caption := dlfMouseSimpleGutterLeftUp;
|
||||
GutterLeftRadio3.Caption := dlfMouseSimpleGutterLeftUpRight;
|
||||
chkGutterTextLines.Caption := dlfMouseSimpleGutterLines;
|
||||
|
||||
TextDividerLabel.Caption := dlfMouseSimpleTextSect;
|
||||
TextDrag.Caption := dlfMouseSimpleTextSectDrag;
|
||||
@ -773,7 +781,9 @@ begin
|
||||
case FTempMouseSettings.GutterLeft of
|
||||
moGLDownClick: GutterLeftRadio1.Checked := True;
|
||||
moglUpClickAndSelect: GutterLeftRadio2.Checked := True;
|
||||
moglUpClickAndSelectRighHalf: GutterLeftRadio3.Checked := True;
|
||||
end;
|
||||
chkGutterTextLines.Checked := FTempMouseSettings.SelectOnLineNumbers;
|
||||
TextDrag.Checked := FTempMouseSettings.TextDrag;
|
||||
RightMoveCaret.Checked := FTempMouseSettings.TextRightMoveCaret;
|
||||
|
||||
|
@ -90,6 +90,7 @@ type
|
||||
FGutterNode: TTreeNode;
|
||||
FGutterFoldNode, FGutterFoldExpNode, FGutterFoldColNode: TTreeNode;
|
||||
FGutterLinesNode: TTreeNode;
|
||||
FGutterChangeNode: TTreeNode;
|
||||
FCurNode: TTreeNode;
|
||||
|
||||
FCurActions: TSynEditMouseActions;
|
||||
@ -624,6 +625,9 @@ begin
|
||||
// LineNum
|
||||
FGutterLinesNode := ContextTree.Items.AddChild(FGutterNode, dlgMouseOptNodeGutterLines);
|
||||
FGutterLinesNode.Data := FTempMouseSettings.GutterActionsLines;
|
||||
// Changes
|
||||
FGutterChangeNode := ContextTree.Items.AddChild(FGutterNode, dlgMouseOptNodeGutterChanges);
|
||||
FGutterChangeNode.Data := FTempMouseSettings.GutterActionsChanges;
|
||||
|
||||
ActionGrid.Constraints.MinWidth := ActionGrid.ColCount * MinGridColSize;
|
||||
ActionGrid.Cells[0,0] := dlgMouseOptHeadDesc;
|
||||
|
@ -1543,6 +1543,8 @@ resourcestring
|
||||
dlfMouseSimpleGutterSect = 'Gutter';
|
||||
dlfMouseSimpleGutterLeftDown = 'Standard, All actions (breakpoint, fold) on mouse down';
|
||||
dlfMouseSimpleGutterLeftUp = 'Extended, Actions (breakpoint, fold) on mouse up. Selection on mouse down and move';
|
||||
dlfMouseSimpleGutterLeftUpRight = 'Extended, Actions, right gutter half only';
|
||||
dlfMouseSimpleGutterLines = 'Use line numers to select lines';
|
||||
dlfMouseSimpleTextSect = 'Text';
|
||||
dlfMouseSimpleTextSectDrag = 'Drag selection (copy/paste)';
|
||||
dlfMouseSimpleRightMoveCaret = 'Right mouse includes caret move';
|
||||
@ -1636,6 +1638,7 @@ resourcestring
|
||||
dlgMouseOptNodeGutterFoldCol = 'Collapsed [+]';
|
||||
dlgMouseOptNodeGutterFoldExp = 'Expanded [-]';
|
||||
dlgMouseOptNodeGutterLines = 'Line Numbers';
|
||||
dlgMouseOptNodeGutterChanges = 'Line Changes';
|
||||
dlgMouseOptHeadOrder = 'Order';
|
||||
dlgMouseOptHeadContext = 'Context';
|
||||
dlgMouseOptHeadDesc = 'Action';
|
||||
|
Loading…
Reference in New Issue
Block a user