GtrWindow

GtrWindow

Synopsis

struct              GtrWindow;
struct              GtrWindowClass;
enum                GtrWindowPlacement;
GType               gtr_window_register_type            (GTypeModule *module);
GtrTab *            gtr_window_create_tab               (GtrWindow *window,
                                                         GtrPo *po);
GtrTab *            gtr_window_get_active_tab           (GtrWindow *window);
GList *             gtr_window_get_all_tabs             (GtrWindow *window);
GtrNotebook *       gtr_window_get_notebook             (GtrWindow *window);
GtrHeader *         gtr_window_get_header_from_active_tab
                                                        (GtrWindow *window);
GtkWidget *         gtr_window_get_statusbar            (GtrWindow *window);
GtkUIManager *      gtr_window_get_ui_manager           (GtrWindow *window);
GtrView *           gtr_window_get_active_view          (GtrWindow *window);
GList *             gtr_window_get_all_views            (GtrWindow *window,
                                                         gboolean original,
                                                         gboolean translated);
void                gtr_window_add_widget               (GtrWindow *window,
                                                         GtkWidget *widget,
                                                         const gchar *name,
                                                         const gchar *title,
                                                         const gchar *stock_id,
                                                         GtrWindowPlacement placement);
void                gtr_window_remove_widget            (GtrWindow *window,
                                                         GtkWidget *widget);
GtkWidget *         gtr_window_get_tab_from_location    (GtrWindow *window,
                                                         GFile *location);
void                gtr_window_set_active_tab           (GtrWindow *window,
                                                         GtkWidget *tab);
GtkWidget *         gtr_window_get_tm_menu              (GtrWindow *window);
                    GtrWindowPrivate;

Description

Details

struct GtrWindow

struct GtrWindow {
  GtkWindow parent_instance;
};


struct GtrWindowClass

struct GtrWindowClass {
  GtkWindowClass parent_class;
};


enum GtrWindowPlacement

typedef enum
{
  GTR_WINDOW_PLACEMENT_NONE = 0,
  GTR_WINDOW_PLACEMENT_TOP,
  GTR_WINDOW_PLACEMENT_BOTTOM,
  GTR_WINDOW_PLACEMENT_RIGHT,
  GTR_WINDOW_PLACEMENT_LEFT,
  GTR_WINDOW_PLACEMENT_CENTER,
  GTR_WINDOW_PLACEMENT_FLOATING
} GtrWindowPlacement;


gtr_window_register_type ()

GType               gtr_window_register_type            (GTypeModule *module);


gtr_window_create_tab ()

GtrTab *            gtr_window_create_tab               (GtrWindow *window,
                                                         GtrPo *po);

Adds a new GtrTab to the GtrNotebook and returns the GtrTab.

window :

a GtrWindow

po :

a GtrPo

Returns :

a new GtrTab object. [transfer none]

gtr_window_get_active_tab ()

GtrTab *            gtr_window_get_active_tab           (GtrWindow *window);

Gets the active GtrTab of the window.

window :

a GtrWindow

Returns :

the active GtrTab of the window. [transfer none]

gtr_window_get_all_tabs ()

GList *             gtr_window_get_all_tabs             (GtrWindow *window);

Gets a list of all tabs in the window or NULL if there is no tab opened.

window :

a GtrWindow

Returns :

a list of all tabs in the window or NULL if there is no tab opened. [transfer container]

gtr_window_get_notebook ()

GtrNotebook *       gtr_window_get_notebook             (GtrWindow *window);

Gets the main GtrNotebook of the window.

window :

a GtrWindow

Returns :

the GtrNotebook of the window. [transfer none]

gtr_window_get_header_from_active_tab ()

GtrHeader *         gtr_window_get_header_from_active_tab
                                                        (GtrWindow *window);

Gets the GtrHeader of the GtrPo of in the active GtrTab.

window :

a GtrWindow

Returns :

the GtrHeader of the GtrPo of in the active GtrTab. [transfer none]

gtr_window_get_statusbar ()

GtkWidget *         gtr_window_get_statusbar            (GtrWindow *window);

Gets the statusbar widget of the window.

window :

a GtrWindow

Returns :

the statusbar widget of the window. [transfer none]

gtr_window_get_ui_manager ()

GtkUIManager *      gtr_window_get_ui_manager           (GtrWindow *window);

Gets the GtkUIManager of the window.

window :

a GtrWindow

Returns :

the GtkUIManager of the window. [transfer none]

gtr_window_get_active_view ()

GtrView *           gtr_window_get_active_view          (GtrWindow *window);

Gets the active translation view in the GtranslationWindow or NULL if there is not tab opened.

window :

a GtranslationWindow

Returns :

the active translation view in the GtranslationWindow or NULL if there is not tab opened. [transfer none]

gtr_window_get_all_views ()

GList *             gtr_window_get_all_views            (GtrWindow *window,
                                                         gboolean original,
                                                         gboolean translated);

Returns all the views currently present in GtranslationWindow

window :

the GtranslationWindow

original :

TRUE if you want original TextViews.

translated :

TRUE if you want transtated TextViews.

Returns :

a newly allocated list of GtranslationWindow objects. [transfer container]

gtr_window_add_widget ()

void                gtr_window_add_widget               (GtrWindow *window,
                                                         GtkWidget *widget,
                                                         const gchar *name,
                                                         const gchar *title,
                                                         const gchar *stock_id,
                                                         GtrWindowPlacement placement);

Adds a new widget to the window in the placement you prefer with and specific name, title and icon you want.

window :

a GtrWindow

widget :

the widget to add in the window

name :

the name of the widged

title :

the title

stock_id :

the stock id for the icon

placement :

a GtrWindowPlacement

gtr_window_remove_widget ()

void                gtr_window_remove_widget            (GtrWindow *window,
                                                         GtkWidget *widget);

Removes from the window the widget if it exists.

window :

a GtrWindow

widget :

the widget to remove

gtr_window_get_tab_from_location ()

GtkWidget *         gtr_window_get_tab_from_location    (GtrWindow *window,
                                                         GFile *location);

Gets the GtrTab of the GtrWindows that matches with the location.

window :

a GtrWindow

location :

the GFile of the po file of the GtrTab

Returns :

the GtrTab which location matches with its po file. [transfer none]

gtr_window_set_active_tab ()

void                gtr_window_set_active_tab           (GtrWindow *window,
                                                         GtkWidget *tab);

Sets the active tab for the window.

window :

a GtrWindow

tab :

a GtrTab

gtr_window_get_tm_menu ()

GtkWidget *         gtr_window_get_tm_menu              (GtrWindow *window);

window :

a GtrWindow

Returns :

get the tm_menu GtkWidget instance. [transfer none]

GtrWindowPrivate

typedef struct _GtrWindowPrivate GtrWindowPrivate;