InfTextGtk.View¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The user for which to show the view |
||
r/w/co |
The IO object to schedule timeouts |
||
r/w |
Whether to highlight the line in which the cursor of non-local users is |
||
r/w |
Whether to show cursors of non-local users |
||
r/w |
Whether to highlight text selected by non-local users |
||
r/w/co |
The user table containing the users of the session shown in the view |
||
r/w/co |
The underlying |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class InfTextGtk.View(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
InfTextGtk.View
is an opaque data type. You should only access it via the public API functions.- classmethod new(io, view, user_table)¶
- Parameters:
io (
Infinity.Io
) – AInfinity.Io
.view (
Gtk.TextView
) – AGtk.TextView
.user_table (
Infinity.UserTable
) – TheInfinity.UserTable
for the text session displayed in view.
- Returns:
A new
InfTextGtk.View
.- Return type:
Creates a new
InfTextGtk.View
for view. This draws remote user’s cursors and selections into the text view.
- get_active_user()¶
- Returns:
The active user of self.
- Return type:
InfText.User
orNone
Returns the active user of self. See
InfTextGtk.View.set_active_user
().
- get_text_view()¶
- Returns:
The
InfTextGtk.View
'sGtk.TextView
.- Return type:
Returns the underlying
Gtk.TextView
.
- get_user_table()¶
- Returns:
- Return type:
Returns the
Infinity.UserTable
containing the users of the session theInfTextGtk.View
'sGtk.TextView
is displaying.
- set_active_user(user)¶
- Parameters:
user (
InfText.User
orNone
) – A user from self's user table, orNone
.
Sets the user for which perspective to draw the view. The selection and cursor position is not drawn for this user since it is assumed that the view’s buffer cursor position and selection match the active user ones (which is automatically the case if the buffer is managed by a
InfTextGtk.Buffer
).
- set_show_remote_current_lines(show)¶
- Parameters:
show (
bool
) – Whether to highlight the current line of non-local users.
If show is
True
then all lines in which the cursor of a non-local user inInfinity.UserStatus.ACTIVE
status is is highlighted with that user’s color, similar to GtkSourceView’s “highlight current line” functionality. If it isFalse
then the current line of non-local users is not highlighted.
- set_show_remote_cursors(show)¶
- Parameters:
show (
bool
) – Whether to show cursors of non-local users.
If show is
True
then self draws a cursor for each non-local user inInfinity.UserStatus.ACTIVE
status in that user’s color into its underlyingGtk.TextView
. If it isFalse
then remote cursors are not drawn.
- set_show_remote_selections(show)¶
- Parameters:
show (
bool
) – Whether to show selections of non-local users.
If show is
True
then self draws the selection ranges for each non-local user inInfinity.UserStatus.ACTIVE
status. The selection range is drawn shaded in that user’s color on top of the author color which indicates who wrote the selected text. If more than one user has a given piece of text selected then an alternating stripe pattern with each of the user’s colors is drawn. If show isFalse
then selection ranges of remote users are not drawn.
Property Details¶
- InfTextGtk.View.props.active_user¶
- Name:
active-user
- Type:
- Default Value:
- Flags:
The user for which to show the view
- InfTextGtk.View.props.io¶
- Name:
io
- Type:
- Default Value:
- Flags:
The IO object to schedule timeouts
- InfTextGtk.View.props.show_remote_current_lines¶
-
Whether to highlight the line in which the cursor of non-local users is
- InfTextGtk.View.props.show_remote_cursors¶
-
Whether to show cursors of non-local users
- InfTextGtk.View.props.show_remote_selections¶
-
Whether to highlight text selected by non-local users
- InfTextGtk.View.props.user_table¶
- Name:
user-table
- Type:
- Default Value:
- Flags:
The user table containing the users of the session shown in the view
- InfTextGtk.View.props.view¶
- Name:
view
- Type:
- Default Value:
- Flags:
The underlying
Gtk.TextView