GnomeApp

Name

GnomeApp — The toplevel GNOME container

Synopsis


#include <gnome.h>


struct      GnomeApp
GtkWidget*  gnome_app_new                   (gchar *appname,
                                             char *title);
void        gnome_app_construct             (GnomeApp *app,
                                             gchar *appname,
                                             char *title);
#define     GNOME_APP_MENUBAR_NAME
#define     GNOME_APP_TOOLBAR_NAME
void        gnome_app_set_menus             (GnomeApp *app,
                                             GtkMenuBar *menubar);
void        gnome_app_set_toolbar           (GnomeApp *app,
                                             GtkToolbar *toolbar);
void        gnome_app_set_statusbar         (GnomeApp *app,
                                             GtkWidget *statusbar);
void        gnome_app_set_contents          (GnomeApp *app,
                                             GtkWidget *contents);
void        gnome_app_add_toolbar           (GnomeApp *app,
                                             GtkToolbar *toolbar,
                                             const gchar *name,
                                             GnomeDockItemBehavior behavior,
                                             GnomeDockPlacement placement,
                                             gint band_num,
                                             gint band_position,
                                             gint offset);
void        gnome_app_add_docked            (GnomeApp *app,
                                             GtkWidget *widget,
                                             const gchar *name,
                                             GnomeDockItemBehavior behavior,
                                             GnomeDockPlacement placement,
                                             gint band_num,
                                             gint band_position,
                                             gint offset);
void        gnome_app_add_dock_item         (GnomeApp *app,
                                             GnomeDockItem *item,
                                             GnomeDockPlacement placement,
                                             gint band_num,
                                             gint band_position,
                                             gint offset);
void        gnome_app_enable_layout_config  (GnomeApp *app,
                                             gboolean enable);
GnomeDock*  gnome_app_get_dock              (GnomeApp *app);
GnomeDockItem* gnome_app_get_dock_item_by_name
                                            (GnomeApp *app,
                                             const gchar *name);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBin
                     +----GtkWindow
                           +----GnomeApp

Description

Toplevel GNOME applications would normally use one GnomeApp widget as their toplevel window. You can create as many GnomeApp widgets as you want, for example, some people use one GnomeApp per document their application loads.

Once you have created one instance of this widget, you would add your main application view information to this window by using gnome_app_set_contents() routine.

The GnomeApp has support for including a menubar one or more toolbars and a statusbar for your application, it also takes care of intalling the accelerators for you when used in conjuction with the gnome-app-helper routines. The toolbars are inserted into GnomeDock widgets.

The gnome-app-helper module provides various helper routines to simplify the configuration of your menus and toolbars, but you can create those yourself and use the gnome_app_set_menus(), gnome_app_add_toolbar(), gnome_app_set_toolbar(), gnome_app_add_dock_item(), and gnome_app_add_docked().

Details


GnomeApp

struct GnomeApp;


gnome_app_new()

GtkWidget*  gnome_app_new                   (gchar *appname,
                                             char *title);

Create a new (empty) application window. You must specify the application's name (used internally as an identifier). title can be left as NULL, in which case the window's title will not be set.

appname : Name of program, using in file names and paths.title : Window title for application.Returns : Pointer to new GNOME app object


gnome_app_construct()

void        gnome_app_construct             (GnomeApp *app,
                                             gchar *appname,
                                             char *title);

Constructor for language bindings; you don't normally need this.

app : Pointer to newly-created GNOME app object.appname : Name of program, using in file names and paths.title : Window title for application.


GNOME_APP_MENUBAR_NAME

#define GNOME_APP_MENUBAR_NAME "Menubar"


GNOME_APP_TOOLBAR_NAME

#define GNOME_APP_TOOLBAR_NAME "Toolbar"


gnome_app_set_menus()

void        gnome_app_set_menus             (GnomeApp *app,
                                             GtkMenuBar *menubar);

Sets the menu bar of the application window.

app : Pointer to GNOME app object.menubar : Menu bar widget for main app window.


gnome_app_set_toolbar()

void        gnome_app_set_toolbar           (GnomeApp *app,
                                             GtkToolbar *toolbar);

Sets the main toolbar of the application window.

app : Pointer to GNOME app object.toolbar : Toolbar widget for main app window.


gnome_app_set_statusbar()

void        gnome_app_set_statusbar         (GnomeApp *app,
                                             GtkWidget *statusbar);

Sets the status bar of the application window.

app : Pointer to GNOME app objectstatusbar : Statusbar widget for main app window


gnome_app_set_contents()

void        gnome_app_set_contents          (GnomeApp *app,
                                             GtkWidget *contents);

Sets the content area of the GNOME app's main window.

app : Pointer to GNOME app object.contents : Widget to be application content area.


gnome_app_add_toolbar()

void        gnome_app_add_toolbar           (GnomeApp *app,
                                             GtkToolbar *toolbar,
                                             const gchar *name,
                                             GnomeDockItemBehavior behavior,
                                             GnomeDockPlacement placement,
                                             gint band_num,
                                             gint band_position,
                                             gint offset);

app : toolbar : name : behavior : placement : band_num : band_position : offset : 


gnome_app_add_docked()

void        gnome_app_add_docked            (GnomeApp *app,
                                             GtkWidget *widget,
                                             const gchar *name,
                                             GnomeDockItemBehavior behavior,
                                             GnomeDockPlacement placement,
                                             gint band_num,
                                             gint band_position,
                                             gint offset);

app : widget : name : behavior : placement : band_num : band_position : offset : 


gnome_app_add_dock_item()

void        gnome_app_add_dock_item         (GnomeApp *app,
                                             GnomeDockItem *item,
                                             GnomeDockPlacement placement,
                                             gint band_num,
                                             gint band_position,
                                             gint offset);

app : item : placement : band_num : band_position : offset : 


gnome_app_enable_layout_config()

void        gnome_app_enable_layout_config  (GnomeApp *app,
                                             gboolean enable);

app : enable : 


gnome_app_get_dock()

GnomeDock*  gnome_app_get_dock              (GnomeApp *app);

app : Returns


gnome_app_get_dock_item_by_name()

GnomeDockItem* gnome_app_get_dock_item_by_name
                                            (GnomeApp *app,
                                             const gchar *name);

app : name : Returns