TextView.connectMoveCursor

Connect to MoveCursor signal.

Gets emitted when the user initiates a cursor movement.

The ::move-cursor signal is a keybinding signal. If the cursor is not visible in text_view, this signal causes the viewport to be moved instead.

Applications should not connect to it, but may emit it with gobject.global.signalEmitByName if they need to control the cursor programmatically.

More...
class TextView
ulong
connectMoveCursor
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == gtk.types.MovementStep)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] == int)
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
is(Parameters!T[2] == bool)
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
is(Parameters!T[3] : gtk.text_view.TextView)
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

void callback(gtk.types.MovementStep step, int count, bool extendSelection, gtk.text_view.TextView textView)

step the granularity of the move, as a gtk.types.MovementStep (optional)

count the number of step units to move (optional)

extendSelection true if the move should extend the selection (optional)

textView the instance the signal is connected to (optional)

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID

Detailed Description

The default bindings for this signal come in two variants, the variant with the <kbd>Shift</kbd> modifier extends the selection, the variant without it does not. There are too many key combinations to list them all here.

  • <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> move by individual characters/lines
  • <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs
  • <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer
  • <kbd>PgUp</kbd> and <kbd>PgDn</kbd> move vertically by pages
  • <kbd>Ctrl</kbd>+<kbd>PgUp</kbd> and <kbd>Ctrl</kbd>+<kbd>PgDn</kbd> move horizontally by pages