![]() |
![]() |
![]() |
libinftextgtk-0.6 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <libinftextgtk/inf-text-gtk-viewport.h> InfTextGtkViewport; struct InfTextGtkViewportClass; InfTextGtkViewport * inf_text_gtk_viewport_new (GtkScrolledWindow *scroll
,InfUserTable *user_table
); GtkScrolledWindow * inf_text_gtk_viewport_get_scrolled_window (InfTextGtkViewport *viewport
); InfUserTable * inf_text_gtk_viewport_get_user_table (InfTextGtkViewport *viewport
); void inf_text_gtk_viewport_set_active_user (InfTextGtkViewport *viewport
,InfTextUser *user
); InfTextUser * inf_text_gtk_viewport_get_active_user (InfTextGtkViewport *viewport
); void inf_text_gtk_viewport_set_show_user_markers (InfTextGtkViewport *viewport
,gboolean show
);
"active-user" InfTextUser* : Read / Write "scrolled-window" GtkScrolledWindow* : Read / Write / Construct Only "show-user-markers" gboolean : Read / Write "user-table" InfUserTable* : 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.
typedef struct _InfTextGtkViewport InfTextGtkViewport;
InfTextGtkViewport is an opaque data type. You should only access it via the public API functions.
struct InfTextGtkViewportClass { };
This structure does not contain any public fields.
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
.
|
A GtkScrolledWindow. |
|
The InfUserTable for the text session displayed in viewport . |
Returns : |
A new InfTextGtkViewport. |
GtkScrolledWindow * inf_text_gtk_viewport_get_scrolled_window
(InfTextGtkViewport *viewport
);
Returns the underlying GtkScrolledWindow.
|
A InfTextGtkViewport. |
Returns : |
The InfTextGtkViewport's 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.
|
A InfTextGtkViewport. |
Returns : |
The InfTextGtkViewport's InfUserTable. |
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.
|
A InfTextGtkViewport. |
|
A user from viewport 's user table, or NULL . |
InfTextUser * inf_text_gtk_viewport_get_active_user
(InfTextGtkViewport *viewport
);
Returns the active user of viewport
. See
inf_text_gtk_viewport_set_active_user()
.
|
A InfTextGtkViewport. |
Returns : |
The active user of viewport . |
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.
|
A InfTextGtkViewport. |
|
Whether to show the position of non-local users. |
"active-user"
property"active-user" InfTextUser* : Read / Write
The user for which to show the viewport.
"scrolled-window"
property "scrolled-window" GtkScrolledWindow* : Read / Write / Construct Only
The underlying GtkScrolledWindow.
"show-user-markers"
property"show-user-markers" gboolean : Read / Write
Whether to indicate the position of non-local user's cursors in the scrollbar.
Default value: TRUE
"user-table"
property"user-table" InfUserTable* : Read / Write / Construct Only
The user table containing the users of the session shown in the viewport.