PlumaWindow

## PlumaWindow PlumaWindow |

## Synopsis

    enum                PlumaWindowState;
                        PlumaWindowPrivate;
    struct              PlumaWindow;
    PlumaTab *          pluma_window_create_tab             (PlumaWindow *window,
                                                             gboolean jump_to);
    PlumaTab *          pluma_window_create_tab_from_uri    (PlumaWindow *window,
                                                             const gchar *uri,
                                                             const PlumaEncoding *encoding,
                                                             gint line_pos,
                                                             gboolean create,
                                                             gboolean jump_to);
    void                pluma_window_close_tab              (PlumaWindow *window,
                                                             PlumaTab *tab);
    void                pluma_window_close_all_tabs         (PlumaWindow *window);
    void                pluma_window_close_tabs             (PlumaWindow *window,
                                                             const GList *tabs);
    PlumaTab *          pluma_window_get_active_tab         (PlumaWindow *window);
    void                pluma_window_set_active_tab         (PlumaWindow *window,
                                                             PlumaTab *tab);
    PlumaView *         pluma_window_get_active_view        (PlumaWindow *window);
    PlumaDocument *     pluma_window_get_active_document    (PlumaWindow *window);
    GList *             pluma_window_get_documents          (PlumaWindow *window);
    GList *             pluma_window_get_unsaved_documents  (PlumaWindow *window);
    GList *             pluma_window_get_views              (PlumaWindow *window);
    GtkWindowGroup *    pluma_window_get_group              (PlumaWindow *window);
    PlumaPanel *        pluma_window_get_side_panel         (PlumaWindow *window);
    PlumaPanel *        pluma_window_get_bottom_panel       (PlumaWindow *window);
    GtkWidget *         pluma_window_get_statusbar          (PlumaWindow *window);
    GtkUIManager *      pluma_window_get_ui_manager         (PlumaWindow *window);
    PlumaWindowState    pluma_window_get_state              (PlumaWindow *window);
    PlumaTab *          pluma_window_get_tab_from_location  (PlumaWindow *window,
                                                             GFile *location);
    PlumaTab *          pluma_window_get_tab_from_uri       (PlumaWindow *window,
                                                             const gchar *uri);
    PlumaMessageBus *   pluma_window_get_message_bus        (PlumaWindow *window);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkWindow
                                           +----PlumaWindow

## Implemented Interfaces

PlumaWindow implements AtkImplementorIface and GtkBuildable.

## Properties

      "state"                    PlumaWindowState      : Read

## Signals

      "active-tab-changed"                             : Run First
      "active-tab-state-changed"                       : Run First
      "tab-added"                                      : Run First
      "tab-removed"                                    : Run First
      "tabs-reordered"                                 : Run First

## Description

## Details

### enum PlumaWindowState

    typedef enum {
    	PLUMA_WINDOW_STATE_NORMAL		= 0,
    	PLUMA_WINDOW_STATE_SAVING		= 1 << 1,
    	PLUMA_WINDOW_STATE_PRINTING		= 1 << 2,
    	PLUMA_WINDOW_STATE_LOADING		= 1 << 3,
    	PLUMA_WINDOW_STATE_ERROR		= 1 << 4,
    	PLUMA_WINDOW_STATE_SAVING_SESSION = 1 << 5
    } PlumaWindowState;

`PLUMA_WINDOW_STATE_NORMAL` |
`PLUMA_WINDOW_STATE_SAVING` |
`PLUMA_WINDOW_STATE_PRINTING` |
`PLUMA_WINDOW_STATE_LOADING` |
`PLUMA_WINDOW_STATE_ERROR` |
`PLUMA_WINDOW_STATE_SAVING_SESSION` |

### PlumaWindowPrivate

    typedef struct _PlumaWindowPrivate PlumaWindowPrivate;

### struct PlumaWindow

    struct PlumaWindow;

### pluma_window_create_tab ()

    PlumaTab *          pluma_window_create_tab             (PlumaWindow *window,
                                                             gboolean jump_to);

Creates a new PlumaTab and adds the new tab to the PlumaNotebook. In case `jump_to` is `TRUE` the PlumaNotebook switches to that new PlumaTab.

`window` : | a PlumaWindow
`jump_to` : | `TRUE` to set the new PlumaTab as active
Returns : | a new PlumaTab

### pluma_window_create_tab_from_uri ()

    PlumaTab *          pluma_window_create_tab_from_uri    (PlumaWindow *window,
                                                             const gchar *uri,
                                                             const PlumaEncoding *encoding,
                                                             gint line_pos,
                                                             gboolean create,
                                                             gboolean jump_to);

Creates a new PlumaTab loading the document specified by `uri`. In case `jump_to` is `TRUE` the PlumaNotebook swithes to that new PlumaTab. Whether `create` is `TRUE`, creates a new empty document if location does not refer to an existing file

`window` : | a PlumaWindow
`uri` : | the uri of the document
`encoding` : | a PlumaEncoding
`line_pos` : | the line position to visualize
`create` : | `TRUE` to create a new document in case `uri` does exist
`jump_to` : | `TRUE` to set the new PlumaTab as active
Returns : | a new PlumaTab

### pluma_window_close_tab ()

    void                pluma_window_close_tab              (PlumaWindow *window,
                                                             PlumaTab *tab);

Closes the `tab`.

`window` : | a PlumaWindow
`tab` : | the PlumaTab to close

### pluma_window_close_all_tabs ()

    void                pluma_window_close_all_tabs         (PlumaWindow *window);

Closes all opened tabs.

`window` : | a PlumaWindow

### pluma_window_close_tabs ()

    void                pluma_window_close_tabs             (PlumaWindow *window,
                                                             const GList *tabs);

Closes all tabs specified by `tabs`.

`window` : | a PlumaWindow
`tabs` : | a list of PlumaTab

### pluma_window_get_active_tab ()

    PlumaTab *          pluma_window_get_active_tab         (PlumaWindow *window);

Gets the active PlumaTab in the `window`.

`window` : | a PlumaWindow
Returns : | the active PlumaTab in the `window`.

### pluma_window_set_active_tab ()

    void                pluma_window_set_active_tab         (PlumaWindow *window,
                                                             PlumaTab *tab);

Switches to the tab that matches with `tab`.

`window` : | a PlumaWindow
`tab` : | a PlumaTab

### pluma_window_get_active_view ()

    PlumaView *         pluma_window_get_active_view        (PlumaWindow *window);

Gets the active PlumaView.

`window` : | a PlumaWindow
Returns : | the active PlumaView

### pluma_window_get_active_document ()

    PlumaDocument *     pluma_window_get_active_document    (PlumaWindow *window);

Gets the active PlumaDocument.

`window` : | a PlumaWindow
Returns : | the active PlumaDocument

### pluma_window_get_documents ()

    GList *             pluma_window_get_documents          (PlumaWindow *window);

Gets a newly allocated list with all the documents in the window. This list must be freed.

`window` : | a PlumaWindow
Returns : | a newly allocated list with all the documents in the window

### pluma_window_get_unsaved_documents ()

    GList *             pluma_window_get_unsaved_documents  (PlumaWindow *window);

Gets the list of documents that need to be saved before closing the window.

`window` : | a PlumaWindow
Returns : | a list of PlumaDocument that need to be saved before closing the window

### pluma_window_get_views ()

    GList *             pluma_window_get_views              (PlumaWindow *window);

Gets a list with all the views in the window. This list must be freed.

`window` : | a PlumaWindow
Returns : | a newly allocated list with all the views in the window

### pluma_window_get_group ()

    GtkWindowGroup *    pluma_window_get_group              (PlumaWindow *window);

Gets the GtkWindowGroup in which `window` resides.

`window` : | a PlumaWindow
Returns : | the GtkWindowGroup

### pluma_window_get_side_panel ()

    PlumaPanel *        pluma_window_get_side_panel         (PlumaWindow *window);

Gets the side PlumaPanel of the `window`.

`window` : | a PlumaWindow
Returns : | the side PlumaPanel.

### pluma_window_get_bottom_panel ()

    PlumaPanel *        pluma_window_get_bottom_panel       (PlumaWindow *window);

Gets the bottom PlumaPanel of the `window`.

`window` : | a PlumaWindow
Returns : | the bottom PlumaPanel.

### pluma_window_get_statusbar ()

    GtkWidget *         pluma_window_get_statusbar          (PlumaWindow *window);

Gets the PlumaStatusbar of the `window`.

`window` : | a PlumaWindow
Returns : | the PlumaStatusbar of the `window`.

### pluma_window_get_ui_manager ()

    GtkUIManager *      pluma_window_get_ui_manager         (PlumaWindow *window);

Gets the GtkUIManager associated with the `window`.

`window` : | a PlumaWindow
Returns : | the GtkUIManager of the `window`.

### pluma_window_get_state ()

    PlumaWindowState    pluma_window_get_state              (PlumaWindow *window);

Retrieves the state of the `window`.

`window` : | a PlumaWindow
Returns : | the current PlumaWindowState of the `window`.

### pluma_window_get_tab_from_location ()

    PlumaTab *          pluma_window_get_tab_from_location  (PlumaWindow *window,
                                                             GFile *location);

Gets the PlumaTab that matches with the given `location`.

`window` : | a PlumaWindow
`location` : | a GFile
Returns : | the PlumaTab that matches with the given `location`.

### pluma_window_get_tab_from_uri ()

    PlumaTab *          pluma_window_get_tab_from_uri       (PlumaWindow *window,
                                                             const gchar *uri);

### Warning

`pluma_window_get_tab_from_uri` has been deprecated since version 2.24 and should not be used in newly-written code. Use `pluma_window_get_tab_from_location()` instead.

Gets the PlumaTab that matches `uri`.

`window` : | a PlumaWindow
`uri` : | the uri to get the PlumaTab
Returns : | the PlumaTab associated with `uri`.

### pluma_window_get_message_bus ()

    PlumaMessageBus *   pluma_window_get_message_bus        (PlumaWindow *window);

Gets the PlumaMessageBus associated with `window`. The returned reference is owned by the window and should not be unreffed.

`window` : | a PlumaWindow
Returns : | the PlumaMessageBus associated with `window`

## Property Details

### The `"state"` property

      "state"                    PlumaWindowState      : Read

The window's state.

## Signal Details

### The `"active-tab-changed"` signal

    void                user_function                      (PlumaWindow *plumawindow,
                                                            PlumaTab    *arg1,
                                                            gpointer     user_data)        : Run First

### The `"active-tab-state-changed"` signal

    void                user_function                      (PlumaWindow *plumawindow,
                                                            gpointer     user_data)        : Run First

### The `"tab-added"` signal

    void                user_function                      (PlumaWindow *plumawindow,
                                                            PlumaTab    *arg1,
                                                            gpointer     user_data)        : Run First

### The `"tab-removed"` signal

    void                user_function                      (PlumaWindow *plumawindow,
                                                            PlumaTab    *arg1,
                                                            gpointer     user_data)        : Run First

### The `"tabs-reordered"` signal

    void                user_function                      (PlumaWindow *plumawindow,
                                                            gpointer     user_data)        : Run First