InfText.User¶
- Subclasses:
None
Methods¶
- Inherited:
Infinity.AdoptedUser (4), Infinity.User (7), GObject.Object (37)
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
The position of this user’s caret |
||
r/w/c |
The hue value of the user’s color. saturation and lightness are set by each client individually. |
||
r/w/c |
The number of characters of this user’s selection |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class InfText.User(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(id, name, vector, hue)¶
- Parameters:
- Returns:
A new
InfText.User
. Free withGObject.Object.unref
() when no longer needed.- Return type:
Creates a new
InfText.User
. id should be unique for all users working together.Infinity.UserTable
will refuse to add users with duplicate id. If vector isNone
, then the vector with all components zero is used.
- get_caret_position()¶
- Returns:
self's caret position.
- Return type:
Returns the position of self's caret.
- get_hue()¶
- Returns:
The hue of the self's color.
- Return type:
Returns the hue of the user’s color as a double ranging from 0 to 1. The other components (saturation and lightness) are not specific to the user and may be chosen indivudually to optimize the actual visual display.
- get_selection_length()¶
- Returns:
self's selection length in characters.
- Return type:
Returns the number of characters this user has selected, starting from the caret position. Negative number mean selection towards the beginning of the buffer.
- set_selection(position, length, by_request)¶
- Parameters:
Changes self's selection (i.e. caret position and selection length). The by_request parameter should be set to
True
if the selection change was requested explicitly, for example by the user actively moving the cursor using the mouse or the keyboard. If the cursor position changes only because another user inserted text at a position before the user’s cursor and this results in a change of the selection position, the by_request parameter should be set toFalse
.
Signal Details¶
Property Details¶
- InfText.User.props.caret_position¶
-
The position of this user’s caret
- InfText.User.props.hue¶
-
The hue value of the user’s color. saturation and lightness are set by each client individually.