edbee - Qt Editor Library
|
The selection command is used to move the caret and anchors to make selections and move the carets around. More...
#include <selectioncommand.h>
Public Member Functions | |
SelectionCommand (SelectionType unit, int amount=0, bool keepSelection=false) | |
The constructor of the selection command. More... | |
virtual | ~SelectionCommand () |
The descructor of the command. More... | |
virtual int | commandId () |
Return the command id This is th coalesceId + the given selection item. More... | |
virtual void | execute (TextEditorController *controller) |
execute the given selection command More... | |
virtual QString | toString () |
Converts this command to a strings. More... | |
SelectionType | unit () |
int | amount () |
bool | keepSelection () |
Public Member Functions inherited from edbee::TextEditorCommand | |
TextEditorCommand () | |
The default constructor. More... | |
virtual | ~TextEditorCommand () |
A blank virtual destructor. More... | |
The selection command is used to move the caret and anchors to make selections and move the carets around.
Enumerator | |
---|---|
MoveCaretByCharacter | Moves the caret(s) by the given amount of characters. |
MoveCaretsOrDeselect | Moves the caret(s) by the given amount of characters or deselects the current selection.
|
MoveCaretByWord | moves the caret(s) by the given amount of words |
MoveCaretByLine | moves the caret(s) by the given amount of lines |
MoveCaretByPage | moves the caret(s) by the given amount of pages |
MoveCaretToLineBoundary | moves the caret to a line-boundary (<0 begin of line, >0 end of line) |
MoveCaretToDocumentBegin | moves the caret to the document start |
MoveCaretToDocumentEnd | moves the caret to the document end |
MoveCaretToExactOffset | moves the caret to the given offset (given in amount) |
SelectAll | selects the complete document |
SelectWord | select a full word |
SelectFullLine | select a full line |
SelectWordAt | select 'toggles' a word. Double click on a word to select a word or deselect a word |
ToggleWordSelectionAt | Toggles the selection and caret at the given location. |
AddCaretAtOffset | adds a extra caret at the given offset (amount is the caret offset) |
AddCaretByLine | adds a caret at the given line amount is the amount of lines and the direction to add |
ResetSelection |
|
explicit |
The constructor of the selection command.
unit | the unit of this command |
amount | the number of steps |
keepSelection | when true the anchor stays put (and the selection is expanded) |
|
virtual |
The descructor of the command.
|
inline |
|
virtual |
Return the command id This is th coalesceId + the given selection item.
|
virtual |
execute the given selection command
controller | the controller to execute the selection for |
Implements edbee::TextEditorCommand.
|
inline |
|
virtual |
Converts this command to a strings.
Implements edbee::TextEditorCommand.
|
inline |