GeditWindow

GeditWindow

Synopsis

enum                GeditWindowState;
                    GeditWindowPrivate;
                    GeditWindow;
GeditTab *          gedit_window_create_tab             (GeditWindow *window,
                                                         gboolean jump_to);
GeditTab *          gedit_window_create_tab_from_uri    (GeditWindow *window,
                                                         const gchar *uri,
                                                         const GeditEncoding *encoding,
                                                         gint line_pos,
                                                         gboolean create,
                                                         gboolean jump_to);
void                gedit_window_close_tab              (GeditWindow *window,
                                                         GeditTab *tab);
void                gedit_window_close_all_tabs         (GeditWindow *window);
void                gedit_window_close_tabs             (GeditWindow *window,
                                                         const GList *tabs);
GeditTab *          gedit_window_get_active_tab         (GeditWindow *window);
void                gedit_window_set_active_tab         (GeditWindow *window,
                                                         GeditTab *tab);
GeditView *         gedit_window_get_active_view        (GeditWindow *window);
GeditDocument *     gedit_window_get_active_document    (GeditWindow *window);
GList *             gedit_window_get_documents          (GeditWindow *window);
GList *             gedit_window_get_unsaved_documents  (GeditWindow *window);
GList *             gedit_window_get_views              (GeditWindow *window);
GtkWindowGroup *    gedit_window_get_group              (GeditWindow *window);
GeditPanel *        gedit_window_get_side_panel         (GeditWindow *window);
GeditPanel *        gedit_window_get_bottom_panel       (GeditWindow *window);
GtkWidget *         gedit_window_get_statusbar          (GeditWindow *window);
GtkUIManager *      gedit_window_get_ui_manager         (GeditWindow *window);
GeditWindowState    gedit_window_get_state              (GeditWindow *window);
GeditTab *          gedit_window_get_tab_from_location  (GeditWindow *window,
                                                         GFile *location);
GeditTab *          gedit_window_get_tab_from_uri       (GeditWindow *window,
                                                         const gchar *uri);
GeditMessageBus *   gedit_window_get_message_bus        (GeditWindow *window);

Object Hierarchy

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

Implemented Interfaces

GeditWindow implements AtkImplementorIface and GtkBuildable.

Properties

  "state"                    GeditWindowState      : 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 GeditWindowState

typedef enum
{
	GEDIT_WINDOW_STATE_NORMAL		= 0,
	GEDIT_WINDOW_STATE_SAVING		= 1 << 1,
	GEDIT_WINDOW_STATE_PRINTING		= 1 << 2,
	GEDIT_WINDOW_STATE_LOADING		= 1 << 3,
	GEDIT_WINDOW_STATE_ERROR		= 1 << 4,
	GEDIT_WINDOW_STATE_SAVING_SESSION = 1 << 5
} GeditWindowState;

GeditWindowPrivate

typedef struct _GeditWindowPrivate GeditWindowPrivate;

GeditWindow

typedef struct _GeditWindow GeditWindow;

gedit_window_create_tab ()

GeditTab *          gedit_window_create_tab             (GeditWindow *window,
                                                         gboolean jump_to);

Creates a new GeditTab and adds the new tab to the GeditNotebook. In case jump_to is TRUE the GeditNotebook switches to that new GeditTab.

window :

a GeditWindow

jump_to :

TRUE to set the new GeditTab as active

Returns :

a new GeditTab

gedit_window_create_tab_from_uri ()

GeditTab *          gedit_window_create_tab_from_uri    (GeditWindow *window,
                                                         const gchar *uri,
                                                         const GeditEncoding *encoding,
                                                         gint line_pos,
                                                         gboolean create,
                                                         gboolean jump_to);

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

window :

a GeditWindow

uri :

the uri of the document

encoding :

a GeditEncoding

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 GeditTab as active

Returns :

a new GeditTab

gedit_window_close_tab ()

void                gedit_window_close_tab              (GeditWindow *window,
                                                         GeditTab *tab);

Closes the tab.

window :

a GeditWindow

tab :

the GeditTab to close

gedit_window_close_all_tabs ()

void                gedit_window_close_all_tabs         (GeditWindow *window);

Closes all opened tabs.

window :

a GeditWindow

gedit_window_close_tabs ()

void                gedit_window_close_tabs             (GeditWindow *window,
                                                         const GList *tabs);

Closes all tabs specified by tabs.

window :

a GeditWindow

tabs :

a list of GeditTab

gedit_window_get_active_tab ()

GeditTab *          gedit_window_get_active_tab         (GeditWindow *window);

Gets the active GeditTab in the window.

window :

a GeditWindow

Returns :

the active GeditTab in the window.

gedit_window_set_active_tab ()

void                gedit_window_set_active_tab         (GeditWindow *window,
                                                         GeditTab *tab);

Switches to the tab that matches with tab.

window :

a GeditWindow

tab :

a GeditTab

gedit_window_get_active_view ()

GeditView *         gedit_window_get_active_view        (GeditWindow *window);

Gets the active GeditView.

window :

a GeditWindow

Returns :

the active GeditView

gedit_window_get_active_document ()

GeditDocument *     gedit_window_get_active_document    (GeditWindow *window);

Gets the active GeditDocument.

window :

a GeditWindow

Returns :

the active GeditDocument

gedit_window_get_documents ()

GList *             gedit_window_get_documents          (GeditWindow *window);

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

window :

a GeditWindow

Returns :

a newly allocated list with all the documents in the window

gedit_window_get_unsaved_documents ()

GList *             gedit_window_get_unsaved_documents  (GeditWindow *window);

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

window :

a GeditWindow

Returns :

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

gedit_window_get_views ()

GList *             gedit_window_get_views              (GeditWindow *window);

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

window :

a GeditWindow

Returns :

a newly allocated list with all the views in the window

gedit_window_get_group ()

GtkWindowGroup *    gedit_window_get_group              (GeditWindow *window);

Gets the GtkWindowGroup in which window resides.

window :

a GeditWindow

Returns :

the GtkWindowGroup

gedit_window_get_side_panel ()

GeditPanel *        gedit_window_get_side_panel         (GeditWindow *window);

Gets the side GeditPanel of the window.

window :

a GeditWindow

Returns :

the side GeditPanel.

gedit_window_get_bottom_panel ()

GeditPanel *        gedit_window_get_bottom_panel       (GeditWindow *window);

Gets the bottom GeditPanel of the window.

window :

a GeditWindow

Returns :

the bottom GeditPanel.

gedit_window_get_statusbar ()

GtkWidget *         gedit_window_get_statusbar          (GeditWindow *window);

Gets the GeditStatusbar of the window.

window :

a GeditWindow

Returns :

the GeditStatusbar of the window.

gedit_window_get_ui_manager ()

GtkUIManager *      gedit_window_get_ui_manager         (GeditWindow *window);

Gets the GtkUIManager associated with the window.

window :

a GeditWindow

Returns :

the GtkUIManager of the window.

gedit_window_get_state ()

GeditWindowState    gedit_window_get_state              (GeditWindow *window);

Retrieves the state of the window.

window :

a GeditWindow

Returns :

the current GeditWindowState of the window.

gedit_window_get_tab_from_location ()

GeditTab *          gedit_window_get_tab_from_location  (GeditWindow *window,
                                                         GFile *location);

Gets the GeditTab that matches with the given location.

window :

a GeditWindow

location :

a GFile

Returns :

the GeditTab that matches with the given location.

gedit_window_get_tab_from_uri ()

GeditTab *          gedit_window_get_tab_from_uri       (GeditWindow *window,
                                                         const gchar *uri);

Warning

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

Gets the GeditTab that matches uri.

window :

a GeditWindow

uri :

the uri to get the GeditTab

Returns :

the GeditTab associated with uri.

gedit_window_get_message_bus ()

GeditMessageBus *   gedit_window_get_message_bus        (GeditWindow *window);

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

window :

a GeditWindow

Returns :

the GeditMessageBus associated with window

Property Details

The "state" property

  "state"                    GeditWindowState      : Read

The window's state.

Signal Details

The "active-tab-changed" signal

void                user_function                      (GeditWindow *geditwindow,
                                                        GeditTab    *arg1,
                                                        gpointer     user_data)        : Run First

The "active-tab-state-changed" signal

void                user_function                      (GeditWindow *geditwindow,
                                                        gpointer     user_data)        : Run First

The "tab-added" signal

void                user_function                      (GeditWindow *geditwindow,
                                                        GeditTab    *arg1,
                                                        gpointer     user_data)        : Run First

The "tab-removed" signal

void                user_function                      (GeditWindow *geditwindow,
                                                        GeditTab    *arg1,
                                                        gpointer     user_data)        : Run First

The "tabs-reordered" signal

void                user_function                      (GeditWindow *geditwindow,
                                                        gpointer     user_data)        : Run First