Difference between revisions of "IDE Window: Editor Options Mouse/de"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{IDE Window: Editor Options Mouse}}
 
{{IDE Window: Editor Options Mouse}}
  
= Der Kontext Baum =
+
<!-- do NOT REMOVE the div tags in the headers. They are used for the F1 help in the IDE. They must be kept, even if you rename the headers -->
  
Bei dem Kontext Baum  handelt es sich um die Baum-Struktur direkt links neben der Übersichts-Tabelle. Gegenwärtig hat er folgende Einträge:
+
* This page is part of [[IDE_Window:_Editor_Options]]
* '''Text'''
 
** '''Auswahl'''
 
* '''Randleiste'''
 
** '''Falt''' '''Baum'''
 
*** '''Gefaltet''' '''[+]'''
 
*** '''Entfaltet''' '''[-]'''
 
** '''Zeilen''' '''Nummern'''
 
  
Das Verhalten der einzelnen Maus-Tasten kann Kontext-sensitiv festgelegt werden. Z.B. ein Klick auf den markierten Text kann eine andere Aktion auslösen als ein Klick auf unmarkierten Text.
+
* You can get this dialog via:
 +
:: Menu / Environment / Editor options / Mouse
 +
:: Source editor / popup menu / Editor properties ...  
 +
<br>
  
Wenn für einen Kontext kein Verhalten für einen bestimmten Klick definiert ist, dann dient der übergeordnete Kontext als Definition (Rückfall). Z.B. für einen Klick auf markierten Text wird zuerst der Kontext "Markierung" durchsucht. Ist hier kein Eintrag für den Klick vorhanden dann wird der Kontext "Text" durchsucht. (In der Vorgabe-Konfiguration ist die Aktion für "Markierten Text verschieben" (Drag) auf diese Weise definiert.)
 
  
'''Randleiste''' und '''Text''' sind Haupteinträge im Kontext Baum. Sie haben keine Rückfall-Konfigurationen. Die anderen Einträge können jeweils auf ihre übergeordneten Einträge zurückfallen.
 
  
= Die Klick Konfiguration =
+
= General =
  
Welche Reaktion ein Klick mit einer der Maustasten auslöst wird anhand der folgenden Kriterien ermittelt.
+
== Hide mouse when typing ==
  
=== Die Maustaste ===
+
If the mouse is positioned over the editor, it will be hidden while you type. Any mouse-move, click, or menu action will make it visible again.
  
Alle Einstellungen können individuell, jeweils für die Linke, Rechte oder Mittlere Maustaste vorgenommen werden.
+
= Gutter =
  
=== Die Zahl der Klicks ===
+
You can currently choose between two predefined modes for the gutter area
  
Alle Einstellungen können individuell, jeweils für einfach, doppel, dreifach oder vierfach Klicks vorgenommen werden.
+
== Standard ==
  
Bitte beachten sie unbedingt den Abschnitt über [[#Doppel bis Vierfach Klicks|Doppel bis Vierfach Klicks]]
+
All left-clicks on the gutter act when you press the mouse button down.
  
Es gibt eine spezielle Einstellung "Alle". "Alle" bedeutet das die konfigurierte Aktion für jede der Klickarten (Zahl der Klicks) ausgeführt wird. In diesem Fall würde ein Doppelklick die Aktion zweimal ausführen (zuerst für den Einfach-, dann für den Doppelklick). Sollte der erste Klick eine Status Änderung bewirkt haben, dann bezöge sich der zweit Klick auf den neuen Status.
+
== Extended ==
;Beispiel:
 
Die linke Maustaste ist für den Quelltext-Falt Bereich auf "Alle" eingestellt. Als Folge wird mit jedem Klick zwischen auf- und zugefaltet umgestellt.<br>
 
Ohne die "Alle" Einstellung müsste man, wenn man versehentlich die falsche Textstelle gefaltet hat, einen Moment warten, bevor man sie mit einem weiteren Klick wieder entfalten kann. (Weil ein schneller zweiter Klick als Doppelklick zählt, und von der Einstellung "Einfach" ignoriert würde)
 
  
;Anmerkungen:
+
All left-clicks on the gutter act when you release the mouse button. This mode allows the mouse to select text while being over the gutter.
* Nicht alle von ihnen werden auf allen Plattformen unterstützt.
 
* Derzeit funktionieren '''Double''', '''Triple''' und '''Quad''' nur für die Linke Taste, und nur für '''down''' Klicks.
 
  
=== Die Richtung des Klicks ===
+
* Mouse pressed down and moved (either to other line, or into the text area), will make a selection. No action will be taken on when the mouse is released
 +
* Mouse pressed and released without moving it, will execute the normal gutter click action (breakpoint/fold)
  
Ein Mausklick besteht aus 2 Ereignissen: Dem Drücken der Taste ("'''Runter'''") und dem Loslassen ("'''Rauf'''")
+
= Text-area =
  
Für jedes dieser zwei Ereignisse können eigene Einstellungen(Aktionen) vorgenommen werden.
+
== Alt-Key set column mode ==
  
Es ist auch Möglich dem '''Runter''' und '''Rauf''' Ereignis des selben Klicks zwei verschiedene Aktionen zuzuweisen. Diese werden dann in der entsprechenden Reihenfolge ausgeführt.
+
Allows to make a column mode selection by holding the old key down while making a selection with the left mouse button (move mouse while left or shift left button is down)
Es sollte aber beachtet werden, dass sich die beiden Aktionen in unerwünschter Weise beeinflussen können.
 
  
Anmerkungen:
+
== Right mouse includes caret move ==
* Einige Aktionen funktionieren nur dann richtig, wenn sie der korrekten Klick-Richtung zugewiesen sind.
 
** Start Selection, Drag Selection: Only works on '''down''' events, since it relies on the following mouse-movement-while-button-down. (It has a build in "end" at mouse button up)
 
** Kontextmenü: On some WidgetSets this will only work reliable on mouse-'''up''' events
 
  
=== Die Umstelltasten ===
+
Right mouse always triggers the context Menu. Setting the caret to the click location is optional.
  
Das Maus-Verhalten kann verändert werden durch das Drücken der '''Shift''', '''Alt''' oder '''Strg''' Taste (oder einer Kombination von ihnen).
+
== Drag Selection ==
  
At the time of the click-'''down''' or '''up''' the state of all three keys is checked. An action can be defined to:
+
You can use the left mouse button to drag an existing selection to a new location in the text. Hold ctrl while dragging to make a copy.
* require one, some or all of the modifier keys pressed (Checkbox ticked)
 
* require one, some or all of the modifier keys *not* pressed (Checkbox not ticked)
 
* ignore the state of one, some or all of the modifier keys (Checkbox greyed)
 
  
For a given combination of Button, Click-Type, Click-Direction there must not be any ambiguity for the modifier keys. Example
+
== Double click selects line ==
;Bad / Ambiguous:
 
* Left, Single, down Click with: Shift required pressed; Alt and Strg ignored
 
* Left, Single, down Click with: Strg required pressed; Alt and Shift ignored
 
: Now if you do this click, with both of Shift and Strg pressed, it would be unclear which of the 2 settings to use
 
;Correct:
 
* Left, Single, down Click with: Shift required pressed; Strg required un-pressed; Alt ignored
 
* Left, Single, down Click with: Strg required pressed; Shift required un-pressed; Alt ignored
 
If you whish Shift to be preferred (the shift action should be taken, if both modifier keys are pressed) then you must at an extra setting:
 
* Left, Single, down Click with: Strg required pressed; Shift required pressed; Alt ignored
 
  
 +
Normally double click selects a word, tripple click will select a line (leaving out leading and trailing spaces). With this option double click selects the line, tripple clicks includes the leading/trailing spaces.
  
;Default Fallback:
+
== Middle button ==
Es gibt eine Ausnahme von dieser Regel. If all modifier keys are set to be ignored, the entry becomes the fall-back for the button, click-type, click-dir configuration.
 
This is, if no configuration is found which has at least one modifier key required either pressed or un-pressed, then the fallback will be used.
 
  
;Anmerkung:
+
"paste selection": if you have an active selection, it (a copy) will be inserted at the point of click
The Modifier Combinations used to detect the action on mouse down (or up) has nothing to do with the modifier Key, that certain actions use during there mouse-move phase.<br>
 
e.g. Dragging uses "strg" to copy the dragged text instead of moving it. However the use of "strg" for copy indication is during mouse move, so you can set start dragging to rely on any other Modifier key. It is however recommended to set '''Strg''' to greyed, so you can start dragging with the key pressed or un-pressed.<br>
 
This is different to using "alt" (or others) for column mode selection: Here the decision is made only at the time of click. Later changes of the "alt" key during mouse-move do not change the selection mode.
 
  
= <div id="ActionHelp"></div>The Action / Behaviour =
+
== Ctrl-Left Button ==
  
Each mouse button event as defined above, can trigger some action. The same action can be assigned to more than one event. (IF 2 events have the same behaviour, then there modifier keys are not checked for ambiguity)
+
by default, if you click on any identifier such as a function, variable or type name the IDE will jump to the declaration of this identifier (even into another unit).
  
;Move Caret checkbox: With each action you can define, if you whish the caret to be moved. However this only additionally enforces the caret move. If an action implicitly moves the caret, then this will happen, even if you uncheck the this box. (e.g. Selecting a block always moves the caret)
+
This is the same feature that is available as key-shortcut (usually alt-up). See "Key Mapping" / "Codetools" / "Find declaration"
  
;Command options: Some commands take additional params to refine there behaviour
+
"other block end" means that if you are not over an identifier, but instead over a "begin", "end" or matching brackets or similar then the jump will go to the matching word/bracket. On the Keyboard this is "Key Mapping" / "Codetools" / "Find block other end")
  
;Implicit mouse up action: Some events that occur on mouse '''down''' events implicitly assign a mouse '''up''' action for the current click. <br> E.g. dragging implicitly drops (inserts) the text when the button is released. <br> If any configured action is assigned to the mouse up, then the implicit action is performed first, the configured action is performed second.
+
= Advanced Options =
  
== No Action Command ==
+
For advanced options please see here: [[IDE_Window:_EditorMouseOptionsAdvanced|Advanced Mouse Options]]
  
There are 2 uses for this:
+
Once you have made changes in the advanced settings, this page will show a warning that it does not represent your settings any more.
;Move Caret: With "Move Caret" it will set the caret to the mouse location. This will unset an existing selection. It also prevents a new selection from being marked by moving the mouse. <br> If it occurs on '''down''' then the caret will be set to the location the mouse was pressed, never mind where you release the button
 
;Prevent fallback to parent node: In Context-Subnodes this can prevent a click from executing the parent node(s) action. <br> E.g. this is assigned to the FoldTree. It catches clicks that are neither on a [+] or [-] node. Otherwise they fall through to the normal Gutter and toggle a breakpoint.
 
  
== Selection Commands ==
+
In this case it also will no longer just follow the changes you make. Instead it will display a button which you must use to override the settings you made in the advanced page. A warning will be shown, if you have unsaved changes.
 
 
=== Block Selection Commands ===
 
 
 
There are 3 Selection commands, for the 3 selection modes supported by SynEdit: '''Normal''', '''Column''' or '''Full-Lines'''.
 
 
 
Note: All of them move the caret implicitly.
 
 
 
Each of those can be configured in 2 different ''Modes'':
 
;Begin: Starts a new selection . If an old selection exists, it will be disregarded. The new Selections starts at the current mouse location.
 
;Continue: If an old selection exists, then it will be extend.<br>If there was no selection, then a new selection is created, which will start at the position the caret had before the event occurred, and range to the click position.
 
 
 
Those events should be assigned to mouse '''down''' events, in which case the selection will resize with any following mouse-movement until the mouse button is released. ('''Implicit mouse up action''')
 
 
 
"Begin-Mode" on mouse '''up''' does nothing, but setting the caret. (Except currently for line mode, which selects the line).<br>
 
"Continue-Mode" on mouse '''up''' will extend the selection
 
 
 
=== Item Selection Commands ===
 
 
 
Allow to select the Word, Line or Paragraph at the mouse position.
 
Once selected the selection will not extend, if the mouse moves.
 
 
 
"Line" supports 2 modes, either including leading/trailing spaces of the line or not.
 
 
 
Note: All of them move the caret implicitly.
 
 
 
=== Drag Selection Command ===
 
 
 
Drags (Copies or moves) the current selection to a new position, following mouse movement. It will be pasted there if the button is released. ('''Implicit mouse up action''')
 
 
 
Independent of the modifier keys pressed at the time of the event occurring (or the configured mod, keys), it will check for the '''ctrl''' key at the time the dragged text is inserted. If Ctrl is pressed the text will be copied, otherwise moved.
 
 
 
Note: moves the caret implicitly.
 
 
 
=== Quick copy Selection Command ===
 
 
 
Inserts a copy of the currently selected text at the mouse location. If no text is selected, inserts the content of the clipboard.
 
 
 
Note: moves the caret implicitly.
 
 
 
== Context Popup Menu ==
 
 
 
Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
 
 
 
== Fold Commands ==
 
 
 
Fold commands are commonly assigned to the fold-tree-nodes, but can also be assigned to other context, like the text area.
 
 
 
The fold-tree has 3 context-nodes
 
;Fold Tree: Any area of the fold-tree, this can be [+], [-], |, or empty
 
:;Collapsed: The [+] only. This means the line has at least one collapsed section. It may have a mix of collapsed/expanded sections
 
:;Expanded: The [-] only. This means the line has at at only expanded sections (at least one)
 
 
 
Note, that if you configure a specific click (e.g. shift-left-down) for either [+] or [-] or both, then most likely you should add the same click with "no action" (or other default) to the parent "Fold Tree" node. Otherwise such a click if not on the [+]/[-] node will fall through to the gutter, and may trigger an action there.
 
 
 
=== Fold Commands ===
 
 
 
By default only acts on nodes starting on the line at the mouse location.
 
 
 
The following modes are available:
 
;One: Folds the "most inner" unfolded node starting on this line. This is the node that starts at the right most place in the line. Any node already folded is ignored, so if any unfolded node exists, one and exactly one node will be folded.<br>This is not necessarily the shortest fold-node (in amount of lines folded), as $region and begin folds can overlap.
 
;All: Folds all Nodes that start on this line
 
;At Caret: This only works if configured for the "Text" context. It folds the node which starts under the current mouse location. This allows you to click on a "begin" (or other keyword) to fold it. (Useful if more than one node starts at the line).
 
;Current: Folds the most inner node containing the current mouse location (the gutter is treated as "at the start of line"). It will search for the first fold-starting keyword (e.g "begin") in front of the current mouse location, whic has a block enclosing the mouse location (end is past mouse location). This may be above the current line.<br> If assigned to the gutter (or fold tree) this is always above the current line, unless the line starts with a keyword (no spaces before)
 
 
 
=== Unfold Commands ===
 
 
 
Only acts on nodes starting on the line at the mouse location.
 
 
 
The following modes are available:
 
;One: Folds the "most outer" folded node starting on this line. This is the node that starts at the left most place in the line.  
 
;All: Unfolds all nodes that start at the current line
 
 
 
=== Fold Popup Menu ===
 
 
 
Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only
 
 
 
A pop up menu allowing you to see and change folds enclosing the current line
 
 
 
== Source Link Command ==
 
 
 
Trigger jump to implementation.
 
 
 
The "underline" argument controls, if the curremt link under the mouse is highlighted (by an underline) while the modifier keys are pressed.
 
 
 
If you assign this command to a click with no modifier keys needed, you would get constant highlights (because the expected modifiers (none) are pressed). In this case you cn switch it off.
 
 
 
== Breakpoint Command ==
 
 
 
Toggle breakpoint on this line
 
 
 
= Doppel bis Vierfach Klicks =
 
 
 
* Anmerkung: Dies funktioniert gegenwärtig nur mit der linken Maustaste.
 
* Anmerkung: Those are currently only triggering Mouse Down
 
 
 
Wenn sie einem Doppel- oder Dreifachklick eine Aktion zuweisen, dann sollten sie daran denken, daß diese immer auch die Aktionen für einen Einfach- bzw. Doppelklick auslösen.
 
 
 
This is: Doing a Triple-Click will first do a Single-Click (down and up) with the same Modifier Keys (none, shift, alt, ...), then a double click, then the triple. (At the time of the first click, SynEdit does not know there will be more clicks)
 
 
 
You should therefore take care of the actions assigned to those clicks.
 
 
 
* With the default (select, select word, select line, select paragraph) this is no problem. Selecting a Line (Triple) is not disturbed by selecting a Word (Double) first.
 
* If However you would assign MouseLink to the Single (or Double), and select Word to the Double (or Tripple, one more than the other), this would not work. Because by the time you do your last click, SynEdit already followed the Link (and will not undo this). In fact, if SynEdit followed a Link to an other File, then a new SynEdit became active, and would see your last click as a single click.
 
* Das ist kein Bug sondern das korrekte Verhalten.
 
 
 
= Aktuelle Einschränkungen =
 
 
 
* Double/Triple/Quad click ist nur für die linke Maustaste und nur für Mouse down verfügbar
 
* Double/Triple/Quad may depend on OS
 
* GTK2: PopUp-Menu is recommended for use with ButtonUp only
 
* OS-Depended: Some clicks may be used by the Window-Manager, and not reach the IDE at all
 
 
 
= Useful Examples =
 
 
 
== Line Numbers in Gutter to select Lines ==
 
 
 
You can set the Line number part of the gutter to select text (full lines) instead of toggling a breakpoint. The Rest of the gutter (left to the line numbers) will still do breakpoints.
 
 
 
;Context Node: Gutter => Line Numbers
 
;Configuration: Left - Any - Down - All modifiers greyed
 
;Action: Line Selection - Mode: Begin
 
 
 
Setting Click to "Any" instead of "Single" means that double-clicks do not accidentally toggle breakpoints.
 
 
 
== Fold by clicking on Keyword ("begin") ==
 
 
 
Instead of folding a block by clicking on the [-] symbol in the gutter, you can fold a block by clicking on it's start keyword (e.g. "begin" or "$region"). this is useful if more than one block starts on the same line.
 
 
 
;Context Node: Text
 
;Configuration: Middle or Right - Single - Down - Ctrl or Alt
 
;Action: Fold Code - Nodes: At Caret
 
 
 
== Fold current block by clicking on vertical fold line ==
 
 
 
You can set a click on the vertical line ("|" below the [-] sign in the fold tree) to fold the enclosing node. This may be useful if the [-] is outside the visible area.
 
 
 
;Context Node: Gutter => Fold Tree
 
;Configuration: Left - Any - Down - All modifiers greyed
 
;Action: Fold Code - Nodes: Current Node
 
 
 
This replaces the default "No Action" Entry. The default entry (as will the substitute) prevents Fold-Tree-Gutter clicks to toggle breakpoints.
 

Revision as of 02:25, 19 August 2009

Deutsch (de) English (en)


  • You can get this dialog via:
Menu / Environment / Editor options / Mouse
Source editor / popup menu / Editor properties ...



General

Hide mouse when typing

If the mouse is positioned over the editor, it will be hidden while you type. Any mouse-move, click, or menu action will make it visible again.

Gutter

You can currently choose between two predefined modes for the gutter area

Standard

All left-clicks on the gutter act when you press the mouse button down.

Extended

All left-clicks on the gutter act when you release the mouse button. This mode allows the mouse to select text while being over the gutter.

  • Mouse pressed down and moved (either to other line, or into the text area), will make a selection. No action will be taken on when the mouse is released
  • Mouse pressed and released without moving it, will execute the normal gutter click action (breakpoint/fold)

Text-area

Alt-Key set column mode

Allows to make a column mode selection by holding the old key down while making a selection with the left mouse button (move mouse while left or shift left button is down)

Right mouse includes caret move

Right mouse always triggers the context Menu. Setting the caret to the click location is optional.

Drag Selection

You can use the left mouse button to drag an existing selection to a new location in the text. Hold ctrl while dragging to make a copy.

Double click selects line

Normally double click selects a word, tripple click will select a line (leaving out leading and trailing spaces). With this option double click selects the line, tripple clicks includes the leading/trailing spaces.

Middle button

"paste selection": if you have an active selection, it (a copy) will be inserted at the point of click

Ctrl-Left Button

by default, if you click on any identifier such as a function, variable or type name the IDE will jump to the declaration of this identifier (even into another unit).

This is the same feature that is available as key-shortcut (usually alt-up). See "Key Mapping" / "Codetools" / "Find declaration"

"other block end" means that if you are not over an identifier, but instead over a "begin", "end" or matching brackets or similar then the jump will go to the matching word/bracket. On the Keyboard this is "Key Mapping" / "Codetools" / "Find block other end")

Advanced Options

For advanced options please see here: Advanced Mouse Options

Once you have made changes in the advanced settings, this page will show a warning that it does not represent your settings any more.

In this case it also will no longer just follow the changes you make. Instead it will display a button which you must use to override the settings you made in the advanced page. A warning will be shown, if you have unsaved changes.