Top | ![]() |
![]() |
![]() |
![]() |
InfTextUser * | active-user | Read / Write |
GtkScrolledWindow * | scrolled-window | Read / Write / Construct Only |
gboolean | show-user-markers | Read / Write |
InfUserTable * | user-table | Read / Write / Construct Only |
InfTextGtkViewport is a helper object which, as long as it is alive, draws the location of the cursor of remote users into the scrollbar of a GtkScrolledWindow containing a GtkTextView.
The function inf_text_gtk_viewport_set_active_user()
can be used to skip
drawing the location of the user working locally on the document, if there
is any.
See InfTextGtkView for drawing the cursor and selected region of remote users into a GtkTextView.
InfTextGtkViewport * inf_text_gtk_viewport_new (GtkScrolledWindow *scroll
,InfUserTable *user_table
);
Creates a new InfTextGtkViewport for scroll
. This draws the position of
remote user's cursors into the scrollbars of scroll
.
[constructor]
scroll |
A GtkScrolledWindow. |
|
user_table |
The InfUserTable for the text session displayed in |
GtkScrolledWindow *
inf_text_gtk_viewport_get_scrolled_window
(InfTextGtkViewport *viewport
);
Returns the underlying GtkScrolledWindow.
InfUserTable *
inf_text_gtk_viewport_get_user_table (InfTextGtkViewport *viewport
);
Returns the InfUserTable containing the users of the session the InfTextGtkViewport's GtkScrolledWindow is displaying.
void inf_text_gtk_viewport_set_active_user (InfTextGtkViewport *viewport
,InfTextUser *user
);
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.
InfTextUser *
inf_text_gtk_viewport_get_active_user (InfTextGtkViewport *viewport
);
Returns the active user of viewport
. See
inf_text_gtk_viewport_set_active_user()
.
void inf_text_gtk_viewport_set_show_user_markers (InfTextGtkViewport *viewport
,gboolean show
);
If show
is TRUE
then draw a marker indicating the cursor position of all
non-local users with status INF_USER_ACTIVE
in the scrollbar of the
scrolled window. If show
is FALSE
then do not draw user markers into the
scrollbar.
struct InfTextGtkViewport;
InfTextGtkViewport is an opaque data type. You should only access it via the public API functions.
“active-user”
property“active-user” InfTextUser *
The user for which to show the viewport.
Owner: InfTextGtkViewport
Flags: Read / Write
“scrolled-window”
property “scrolled-window” GtkScrolledWindow *
The underlying GtkScrolledWindow.
Owner: InfTextGtkViewport
Flags: Read / Write / Construct Only
“show-user-markers”
property “show-user-markers” gboolean
Whether to indicate the position of non-local user's cursors in the scrollbar.
Owner: InfTextGtkViewport
Flags: Read / Write
Default value: TRUE
“user-table”
property“user-table” InfUserTable *
The user table containing the users of the session shown in the viewport.
Owner: InfTextGtkViewport
Flags: Read / Write / Construct Only