![]() |
![]() |
![]() |
libinftext-0.4 Reference Manual | |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
InfTextMoveOperation; InfTextMoveOperation * inf_text_move_operation_new (guint position
,gint length
); guint inf_text_move_operation_get_position (InfTextMoveOperation *operation
); gint inf_text_move_operation_get_length (InfTextMoveOperation *operation
); void inf_text_move_operation_transform_insert (guint insert_position
,guint insert_length
,guint *move_position
,gint *move_length
,gboolean left_gravity
); void inf_text_move_operation_transform_delete (guint delete_position
,guint delete_length
,guint *move_position
,gint *move_length
);
"length" gint : Read / Write / Construct Only "position" guint : Read / Write / Construct Only
InfTextMoveOperation * inf_text_move_operation_new (guint position
,gint length
);
Creates a new move operation that, when applied, changes the caret and selection of the applying user.
|
The position to place the user's caret at. |
|
The number of characters to select. Negative means selection towards the beginning of the buffer. |
Returns : |
A new InfTextMoveOperation. |
guint inf_text_move_operation_get_position
(InfTextMoveOperation *operation
);
Returns the position at which operation
places the user's cursor.
|
A InfTextMoveOperation. |
Returns : |
The position of operation .
|
gint inf_text_move_operation_get_length (InfTextMoveOperation *operation
);
Returns the length to which operation
changes the user's selection.
Negative means selection towards the beginning of the buffer.
|
A InfTextMoveOperation. |
Returns : |
The length of operation .
|
void inf_text_move_operation_transform_insert (guint insert_position
,guint insert_length
,guint *move_position
,gint *move_length
,gboolean left_gravity
);
Changes *move_position
and *move_length
so that they point to the same
region when insert_length
characters are inserted at insert_position
.
If text is inserted at the same position as move_position
, then
move_position
is kept at the position it currently is, otherwise it is
shifted to the right.
|
The position at which text is inserted. |
|
The number of inserted characters. |
|
Points to the character offset to which the caret is moved. |
|
Points to the number of characters selected. Negative means towards the beginning. |
|
Whether the move position and length have left gravity. |
void inf_text_move_operation_transform_delete (guint delete_position
,guint delete_length
,guint *move_position
,gint *move_length
);
Changes *move_position
and *move_length
so that they point to the same
region when delete_length
characters are deleted starting from
delete_position
.
|
The position at which text is deleted. |
|
The number of deleted characters. |
|
Points to the character offset to which the caret is moved. |
|
Points to the number of characters selected. Negative means towards the beginning. |