InfTextGtk.Viewport¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The user for which to show the viewport |
||
r/w/co |
The underlying |
||
r/w |
Whether to indicate the position of non-local user’s cursors in the scrollbar |
||
r/w/co |
The user table containing the users of the session shown in the viewport |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class InfTextGtk.Viewport(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
InfTextGtk.Viewport
is an opaque data type. You should only access it via the public API functions.- classmethod new(scroll, user_table)¶
- Parameters:
scroll (
Gtk.ScrolledWindow
) – AGtk.ScrolledWindow
.user_table (
Infinity.UserTable
) – TheInfinity.UserTable
for the text session displayed in viewport.
- Returns:
A new
InfTextGtk.Viewport
.- Return type:
Creates a new
InfTextGtk.Viewport
for scroll. This draws the position of remote user’s cursors into the scrollbars of scroll.
- get_active_user()¶
- Returns:
The active user of self.
- Return type:
InfText.User
orNone
Returns the active user of self. See
InfTextGtk.Viewport.set_active_user
().
- get_scrolled_window()¶
- Returns:
- Return type:
Returns the underlying
Gtk.ScrolledWindow
.
- get_user_table()¶
- Returns:
- Return type:
Returns the
Infinity.UserTable
containing the users of the session theInfTextGtk.Viewport
'sGtk.ScrolledWindow
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 viewport. The cursor position for teh active user is not draws since it is assumed that the viewport’s “real” scrollbars match the active user’s position.
- set_show_user_markers(show)¶
- Parameters:
show (
bool
) – Whether to show the position of non-local users.
If show is
True
then draw a marker indicating the cursor position of all non-local users with statusInfinity.UserStatus.ACTIVE
in the scrollbar of the scrolled window. If show isFalse
then do not draw user markers into the scrollbar.
Property Details¶
- InfTextGtk.Viewport.props.active_user¶
- Name:
active-user
- Type:
- Default Value:
- Flags:
The user for which to show the viewport
- InfTextGtk.Viewport.props.scrolled_window¶
- Name:
scrolled-window
- Type:
- Default Value:
- Flags:
The underlying
Gtk.ScrolledWindow
- InfTextGtk.Viewport.props.show_user_markers¶
-
Whether to indicate the position of non-local user’s cursors in the scrollbar
- InfTextGtk.Viewport.props.user_table¶
- Name:
user-table
- Type:
- Default Value:
- Flags:
The user table containing the users of the session shown in the viewport