Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Zed_cursor
SourceCursors
A cursor is a pointer in an edition buffer. When some text is inserted or removed, all cursors after the modification are automatically moved accordingly.
Type of a cursor.
Exception raised when trying to move a cursor outside the bounds of the text it points to.
create length changes get_lines position wanted_column
creates a new cursor pointing to position position
.
length
is the current length of the text the cursor points to. It raises Out_of_bounds
if position
is greater than length
.
changes
is an event which occurs with values of the form (start, added, removed)
when the text changes, with the same semantic as Zed_edit.changes
.
get_lines
is used to retreive the current set of line positions of the text. It is used to compute the line and column of the cursor.
wanted_column
is the column on which the cursor want to be, if there is enough room on the line.
copy cursor
creates a copy of the given cursor. The new cursor initially points to the same location as cursor
.
position cursor
returns the signal holding the current position of the given cursor.
line cursor
returns the signal holding the current line on which the cursor is.
column cursor
returns the signal holding the current column of the cursor.
column_display cursor
returns the signal holding the current display column of the cursor.
get_column_display cursor
returns the current display column of the cursor.
coordinates cursor
returns the signal holding the current line & column of the cursor.
coordinates cursor
returns the signal holding the current line & display column of the cursor.
get_coordinates cursor
returns the current line & column of the cursor.
get_coordinates_display cursor
returns the current line & display column of the cursor.
wanted_column cursor
returns the signal holding the column on which the cursor wants to be.
get_wanted_column cursor
returns the column on which the cursor wants to be.
set_wanted_column cursor
sets the column on which the cursor want to be.
goto cursor position
moves the given cursor to the given position. It raises Out_of_bounds
if position
is outside the bounds of the text. If set_wanted_column
is true
(the default), then the wanted column will be set to the column of the cursor at given position.
move cursor delta
moves the given cursor by the given number of characters. It raises Out_of_bounds
if the result is outside the bounds of the text.