Whole document tree
BonoboWindow
Name BonoboWindow -- the toplevel application window implementation
Description The BonoboWindow class uses a BonoboUIEngine, in combination
with several BonoboUISync classes to achieve a powerful new
top-level window widget. It's API mandates the use of XML to
specify your UI, it also strongly encourages the use of the
BonoboUIComponent API to create even the top-level UI. This
incurs almost no penalty since ORBit's CORBA implementation is
extremely fast in-processes. This in turn encourages people to
ensure that even their top-level components are capable of being
used as controls with minimal effort.
Example 1. Creating a BonoboWindow
BonoboUIContainer *ui_container;
BonoboUIComponent *ui_component;
BonoboWindow *win;
win = BONOBO_WINDOW (
bonobo_window_new ("Win", "My Test Application"));
ui_container = bonobo_ui_container_new ();
bonobo_ui_container_set_win (ui_container, win);
bonobo_ui_engine_config_set_path (
bonobo_window_get_ui_engine (win),
"/my-application-name/UIConfig/kvps");
So, even for a toplevel window we also want to create a
BonoboUIComponent to merge our toplevel UI elements in:
Example 2. Setting up the window UI
ui_component = bonobo_ui_component_new ("my-app");
/* Associate the BonoboUIComponent with the container */
bonobo_ui_component_set_container (
ui_component, BONOBO_OBJREF (ui_container);
bonobo_ui_util_set_ui (
ui_component, MY_COMPILE_TIME_PREFIX,
"GNOME_MyApp.ui", "my-app");
Where GNOME_MyApp.ui is the toplevel UI xml file.
Details bonobo_window_construct ()GtkWidget* bonobo_window_construct (BonoboWindow *win,
const char *win_name,
const char *title);
Construct a new BonoboWindow
bonobo_window_new ()GtkWidget* bonobo_window_new (const char *win_name,
const char *title);
bonobo_window_set_contents ()void bonobo_window_set_contents (BonoboWindow *win,
GtkWidget *contents);
Insert a widget into the main window contents.
bonobo_window_get_contents ()GtkWidget* bonobo_window_get_contents (BonoboWindow *win);
bonobo_window_set_name ()void bonobo_window_set_name (BonoboWindow *win,
const char *win_name);
Set the name of the window - used for configuration
serialization.
bonobo_window_get_name ()char* bonobo_window_get_name (BonoboWindow *win);
Gets the name of a window.
bonobo_window_get_accel_group ()GtkAccelGroup* bonobo_window_get_accel_group
(BonoboWindow *win);
bonobo_window_add_popup ()void bonobo_window_add_popup (BonoboWindow *win,
GtkMenu *popup,
const char *path);
Add a popup menu at path
bonobo_window_remove_popup ()void bonobo_window_remove_popup (BonoboWindow *win,
const char *path);
Remove the popup at path
bonobo_window_get_ui_engine ()BonoboUIEngine* bonobo_window_get_ui_engine (BonoboWindow *win);
Gets the associated UIEngine.
See Also BonoboUIEngine, BonoboUISync, BonoboUIComponent