## InfTextGtkViewport InfTextGtkViewport |

## Synopsis

                        InfTextGtkViewport;
    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);

## Object Hierarchy

      GObject
       +----InfTextGtkViewport

## Properties

      "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

## Description

## Details

### InfTextGtkViewport

    typedef struct _InfTextGtkViewport InfTextGtkViewport;

### inf_text_gtk_viewport_new ()

    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`.

`scroll` : | A GtkScrolledWindow.
`user_table` : | The InfUserTable for the text session displayed in `viewport`.
Returns : | A new InfTextGtkViewport.

### inf_text_gtk_viewport_get_scrolled_window ()

    GtkScrolledWindow * inf_text_gtk_viewport_get_scrolled_window
                                                            (InfTextGtkViewport *viewport);

Returns the underlying GtkScrolledWindow.

`viewport` : | A InfTextGtkViewport.
Returns : | The InfTextGtkViewport's GtkScrolledWindow.

### inf_text_gtk_viewport_get_user_table ()

    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.

`viewport` : | A InfTextGtkViewport.
Returns : | The InfGtkTextViewport's InfUserTable.

### inf_text_gtk_viewport_set_active_user ()

    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.

`viewport` : | A InfTextGtkViewport.
`user` : | A user from `viewport`'s user table, or `NULL`.

### inf_text_gtk_viewport_get_active_user ()

    InfTextUser *       inf_text_gtk_viewport_get_active_user
                                                            (InfTextGtkViewport *viewport);

Returns the active user of `viewport`. See `inf_text_gtk_viewport_set_active_user()`.

`viewport` : | A InfTextGtkViewport.
Returns : | The active user of `viewport`.

### inf_text_gtk_viewport_set_show_user_markers ()

    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.

`viewport` : | A InfTextGtkViewport.
`show` : | Whether to show the position of non-local users.

## Property Details

### The `"active-user"` property

      "active-user"              InfTextUser*          : Read / Write

The user for which to show the viewport.

### The `"scrolled-window"` property

      "scrolled-window"          GtkScrolledWindow*    : Read / Write / Construct Only

The underlying GtkScrolledWindow.

### The `"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

### The `"user-table"` property

      "user-table"               InfUserTable*         : Read / Write / Construct Only

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