![]() |
![]() |
![]() |
MATE UI Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <libmateui/libmateui.h> #define MATE_APP_MENUBAR_NAME #define MATE_APP_TOOLBAR_NAME struct MateApp; GtkWidget * mate_app_new (const gchar *appname
,const gchar *title
); void mate_app_construct (MateApp *app
,const gchar *appname
,const gchar *title
); void mate_app_set_menus (MateApp *app
,GtkMenuBar *menubar
); void mate_app_set_toolbar (MateApp *app
,GtkToolbar *toolbar
); void mate_app_set_statusbar (MateApp *app
,GtkWidget *statusbar
); void mate_app_set_statusbar_custom (MateApp *app
,GtkWidget *container
,GtkWidget *statusbar
); void mate_app_set_contents (MateApp *app
,GtkWidget *contents
); void mate_app_add_toolbar (MateApp *app
,GtkToolbar *toolbar
,const gchar *name
,MateComponentDockItemBehavior behavior
,MateComponentDockPlacement placement
,gint band_num
,gint band_position
,gint offset
); GtkWidget * mate_app_add_docked (MateApp *app
,GtkWidget *widget
,const gchar *name
,MateComponentDockItemBehavior behavior
,MateComponentDockPlacement placement
,gint band_num
,gint band_position
,gint offset
); void mate_app_add_dock_item (MateApp *app
,MateComponentDockItem *item
,MateComponentDockPlacement placement
,gint band_num
,gint band_position
,gint offset
); void mate_app_enable_layout_config (MateApp *app
,gboolean enable
); MateComponentDock * mate_app_get_dock (MateApp *app
); MateComponentDockItem * mate_app_get_dock_item_by_name (MateApp *app
,const gchar *name
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----MateApp
The MateApp
widget and associated functions provides the easiest way to
create an almost complete MATE application in libmateui. Simple create an
instance of the widget, append any menus, toolbar(s) and a status bar, as
required (this will probably be done with some functions from the following
pages). Then fill in the main contents with a call to mate_app_set_contents()
and start the main loop (with gtk_main()
).
#define MATE_APP_MENUBAR_NAME "Menubar"
The name of the menubar as it is passed to libmatecomponent.
#define MATE_APP_TOOLBAR_NAME "Toolbar"
The name of the default toolbar that is added to the application widget by default.
struct MateApp;
A widget representing an entire MATE application, including the main window, menus, toolbar(s) and status bar.
GtkWidget * mate_app_new (const gchar *appname
,const gchar *title
);
Create a new (empty) application window. You must specify the appname
(used
internally as an identifier). The title
param can be left as NULL, in
which case the window's title will not be set.
|
Name of program, used in file names and paths. |
|
Window title for application. |
Returns : |
Pointer to new MateApp object. |
void mate_app_construct (MateApp *app
,const gchar *appname
,const gchar *title
);
Constructor for language bindings; you don't normally need this.
|
A newly created MateApp object. |
|
Name of program, using in file names and paths. |
|
Window title for application. |
void mate_app_set_menus (MateApp *app
,GtkMenuBar *menubar
);
Sets the menu bar of the application window.
|
A MateApp instance. |
|
Menu bar widget for main application window. |
void mate_app_set_toolbar (MateApp *app
,GtkToolbar *toolbar
);
Sets the main toolbar of the application window.
|
A MateApp instance. |
|
Toolbar widget for main app window. |
void mate_app_set_statusbar (MateApp *app
,GtkWidget *statusbar
);
Sets the status bar of the application window.
|
A MateApp instance |
|
Statusbar widget for main app window |
void mate_app_set_statusbar_custom (MateApp *app
,GtkWidget *container
,GtkWidget *statusbar
);
Sets the status bar of the application window, but use container
as its container.
|
A MateApp instance |
|
container widget containing the statusbar |
|
Statusbar widget for main app window |
void mate_app_set_contents (MateApp *app
,GtkWidget *contents
);
Sets the content area of the main window of app
.
|
A MateApp instance. |
|
Widget to be application content area. |
void mate_app_add_toolbar (MateApp *app
,GtkToolbar *toolbar
,const gchar *name
,MateComponentDockItemBehavior behavior
,MateComponentDockPlacement placement
,gint band_num
,gint band_position
,gint offset
);
Create a new MateComponentDockItem widget containing toolbar
, and add it
to app
's dock with the specified layout information. Notice that,
if automatic layout configuration is enabled, the layout is
overridden by the saved configuration, if any.
|
A MateApp widget |
|
Toolbar to be added to app 's dock
|
|
Name for the dock item that will contain toolbar
|
|
Behavior for the new dock item |
|
Placement for the new dock item |
|
Number of the band where the dock item should be placed |
|
Position of the new dock item in band band_num
|
|
Offset from the previous dock item in the band; if there is no previous item, offset from the beginning of the band. |
GtkWidget * mate_app_add_docked (MateApp *app
,GtkWidget *widget
,const gchar *name
,MateComponentDockItemBehavior behavior
,MateComponentDockPlacement placement
,gint band_num
,gint band_position
,gint offset
);
Add widget
as a dock item according to the specified layout
information. Notice that, if automatic layout configuration is
enabled, the layout is overridden by the saved configuration, if
any.
|
A MateApp widget. |
|
Widget to be added to the MateApp. |
|
Name for the new dock item. |
|
Behavior for the new dock item. |
|
Placement for the new dock item. |
|
Number of the band where the dock item should be placed. |
|
Position of the new dock item in band band_num .
|
|
Offset from the previous dock item in the band; if there is no previous item, offset from the beginning of the band. |
Returns : |
The dock item used to contain the widget. |
void mate_app_add_dock_item (MateApp *app
,MateComponentDockItem *item
,MateComponentDockPlacement placement
,gint band_num
,gint band_position
,gint offset
);
Add item
according to the specified layout information. Notice
that, if automatic layout configuration is enabled, the layout is
overridden by the saved configuration, if any.
|
A MateApp widget. |
|
Dock item to be added to app 's dock.
|
|
Placement for the dock item. |
|
Number of the band where the dock item should be placed. |
|
Position of the dock item in band band_num .
|
|
Offset from the previous dock item in the band; if there is no previous item, offset from the beginning of the band. |
void mate_app_enable_layout_config (MateApp *app
,gboolean enable
);
Specify whether app
should automatically save the dock's
layout configuration via mate-config whenever it changes or not.
|
A MateApp widget. |
|
Boolean specifying whether automatic configuration saving is enabled. |
MateComponentDock * mate_app_get_dock (MateApp *app
);
Retrieves the MateComponentDock widget contained in app
.
|
A MateApp widget |
Returns : |
The relevant MateComponentDock widget. |