InfTextGtk.Viewport

g GObject.Object GObject.Object InfTextGtk.Viewport InfTextGtk.Viewport GObject.Object->InfTextGtk.Viewport

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (scroll, user_table)

get_active_user ()

get_scrolled_window ()

get_user_table ()

set_active_user (user)

set_show_user_markers (show)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

active-user

InfText.User

r/w

The user for which to show the viewport

scrolled-window

Gtk.ScrolledWindow

r/w/co

The underlying Gtk.ScrolledWindow

show-user-markers

bool

r/w

Whether to indicate the position of non-local user’s cursors in the scrollbar

user-table

Infinity.UserTable

r/w/co

The user table containing the users of the session shown in the viewport

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class InfTextGtk.Viewport(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

InfTextGtk.ViewportClass

InfTextGtk.Viewport is an opaque data type. You should only access it via the public API functions.

classmethod new(scroll, user_table)
Parameters:
Returns:

A new InfTextGtk.Viewport.

Return type:

InfTextGtk.Viewport

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 or None

Returns the active user of self. See InfTextGtk.Viewport.set_active_user().

get_scrolled_window()
Returns:

The InfTextGtk.Viewport's Gtk.ScrolledWindow.

Return type:

Gtk.ScrolledWindow

Returns the underlying Gtk.ScrolledWindow.

get_user_table()
Returns:

The InfTextGtk.Viewport's Infinity.UserTable.

Return type:

Infinity.UserTable

Returns the Infinity.UserTable containing the users of the session the InfTextGtk.Viewport's Gtk.ScrolledWindow is displaying.

set_active_user(user)
Parameters:

user (InfText.User or None) – A user from self's user table, or None.

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 status Infinity.UserStatus.ACTIVE in the scrollbar of the scrolled window. If show is False then do not draw user markers into the scrollbar.

Property Details

InfTextGtk.Viewport.props.active_user
Name:

active-user

Type:

InfText.User

Default Value:

None

Flags:

READABLE, WRITABLE

The user for which to show the viewport

InfTextGtk.Viewport.props.scrolled_window
Name:

scrolled-window

Type:

Gtk.ScrolledWindow

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The underlying Gtk.ScrolledWindow

InfTextGtk.Viewport.props.show_user_markers
Name:

show-user-markers

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Whether to indicate the position of non-local user’s cursors in the scrollbar

InfTextGtk.Viewport.props.user_table
Name:

user-table

Type:

Infinity.UserTable

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The user table containing the users of the session shown in the viewport