PlumaWindow: pluma Reference Manual

## PlumaWindow PlumaWindow |

## Functions

PlumaTab * | pluma_window_create_tab ()
PlumaTab * | pluma_window_create_tab_from_uri ()
void | pluma_window_close_tab ()
void | pluma_window_close_all_tabs ()
void | pluma_window_close_tabs ()
PlumaTab * | pluma_window_get_active_tab ()
void | pluma_window_set_active_tab ()
PlumaView * | pluma_window_get_active_view ()
PlumaDocument * | pluma_window_get_active_document ()
GList * | pluma_window_get_documents ()
GList * | pluma_window_get_unsaved_documents ()
GList * | pluma_window_get_views ()
GtkWindowGroup * | pluma_window_get_group ()
PlumaPanel * | pluma_window_get_side_panel ()
PlumaPanel * | pluma_window_get_bottom_panel ()
GtkWidget * | pluma_window_get_statusbar ()
GtkUIManager * | pluma_window_get_ui_manager ()
PlumaWindowState | pluma_window_get_state ()
PlumaTab * | pluma_window_get_tab_from_location ()
PlumaMessageBus * | pluma_window_get_message_bus ()

## Properties

PlumaWindowState | state | Read

## Signals

void | active-tab-changed | Run First
void | active-tab-state-changed | Run First
void | tab-added | Run First
void | tab-removed | Run First
void | tabs-reordered | Run First

## Types and Values

enum | PlumaWindowState
| PlumaWindowPrivate
struct | PlumaWindow

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── PlumaWindow

## Implemented Interfaces

PlumaWindow implements AtkImplementorIface and GtkBuildable.

## Description

## Functions

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

#### Parameters

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

#### Returns

a new PlumaTab.

[transfer none]

### 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

#### Parameters

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.

[transfer none]

### pluma_window_close_tab ()

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

Closes the `tab` .

#### Parameters

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.

#### Parameters

window | a PlumaWindow |

### pluma_window_close_tabs ()

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

Closes all tabs specified by `tabs` .

#### Parameters

window | a PlumaWindow |
tabs | a list of PlumaTab. | [element-type Pluma.Tab]

### pluma_window_get_active_tab ()

    PlumaTab *
    pluma_window_get_active_tab (PlumaWindow *window);

Gets the active PlumaTab in the `window` .

#### Parameters

window | a PlumaWindow |

#### Returns

the active PlumaTab in the `window` .

[transfer none]

### pluma_window_set_active_tab ()

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

Switches to the tab that matches with `tab` .

#### Parameters

window | a PlumaWindow |
tab | a PlumaTab |

### pluma_window_get_active_view ()

    PlumaView *
    pluma_window_get_active_view (PlumaWindow *window);

Gets the active PlumaView.

#### Parameters

window | a PlumaWindow |

#### Returns

the active PlumaView.

[transfer none]

### pluma_window_get_active_document ()

    PlumaDocument *
    pluma_window_get_active_document (PlumaWindow *window);

Gets the active PlumaDocument.

#### Parameters

window | a PlumaWindow |

#### Returns

the active PlumaDocument.

[transfer none]

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

#### Parameters

window | a PlumaWindow |

#### Returns

a newly allocated list with all the documents in the window.

[element-type Pluma.Document][transfer container]

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

#### Parameters

window | a PlumaWindow |

#### Returns

a list of PlumaDocument that need to be saved before closing the window.

[element-type Pluma.Document][transfer container]

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

#### Parameters

window | a PlumaWindow |

#### Returns

a newly allocated list with all the views in the window.

[element-type Pluma.View][transfer container]

### pluma_window_get_group ()

    GtkWindowGroup *
    pluma_window_get_group (PlumaWindow *window);

Gets the GtkWindowGroup in which `window` resides.

#### Parameters

window | a PlumaWindow |

#### Returns

the GtkWindowGroup.

[transfer none]

### pluma_window_get_side_panel ()

    PlumaPanel *
    pluma_window_get_side_panel (PlumaWindow *window);

Gets the side PlumaPanel of the `window` .

#### Parameters

window | a PlumaWindow |

#### Returns

the side PlumaPanel.

[transfer none]

### pluma_window_get_bottom_panel ()

    PlumaPanel *
    pluma_window_get_bottom_panel (PlumaWindow *window);

Gets the bottom PlumaPanel of the `window` .

#### Parameters

window | a PlumaWindow |

#### Returns

the bottom PlumaPanel.

[transfer none]

### pluma_window_get_statusbar ()

    GtkWidget *
    pluma_window_get_statusbar (PlumaWindow *window);

Gets the PlumaStatusbar of the `window` .

#### Parameters

window | a PlumaWindow |

#### Returns

the PlumaStatusbar of the `window` .

[transfer none]

### pluma_window_get_ui_manager ()

    GtkUIManager *
    pluma_window_get_ui_manager (PlumaWindow *window);

Gets the GtkUIManager associated with the `window` .

#### Parameters

window | a PlumaWindow |

#### Returns

the GtkUIManager of the `window` .

[transfer none]

### pluma_window_get_state ()

    PlumaWindowState
    pluma_window_get_state (PlumaWindow *window);

Retrieves the state of the `window` .

#### Parameters

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

#### Parameters

window | a PlumaWindow |
location | a GFile |

#### Returns

the PlumaTab that matches with the given `location` .

[transfer none]

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

#### Parameters

window | a PlumaWindow |

#### Returns

the PlumaMessageBus associated with `window` .

[transfer none]

## Types and Values

### enum PlumaWindowState

#### Members

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;

## Property Details

### The `“state”` property

      “state”                    PlumaWindowState

The window's state.

Owner: PlumaWindow

Flags: Read

## Signal Details

### The `“active-tab-changed”` signal

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

Flags: Run First

### The `“active-tab-state-changed”` signal

    void
    user_function (PlumaWindow *plumawindow,
                   gpointer     user_data)

Flags: Run First

### The `“tab-added”` signal

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

Flags: Run First

### The `“tab-removed”` signal

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

Flags: Run First

### The `“tabs-reordered”` signal

    void
    user_function (PlumaWindow *plumawindow,
                   gpointer     user_data)

Flags: Run First