|  |  |  | LibBonoboUI API Reference Manual |  | 
|---|---|---|---|---|
                    BonoboWidget;
                    BonoboWidgetPrivate;
                    BonoboWidgetClass;
Bonobo_Unknown      bonobo_widget_get_objref            (BonoboWidget *bw);
GtkWidget*          bonobo_widget_new_control           (const char *moniker,
                                                         Bonobo_UIContainer uic);
GtkWidget*          bonobo_widget_new_control_from_objref
                                                        (Bonobo_Control control,
                                                         Bonobo_UIContainer uic);
BonoboControlFrame* bonobo_widget_get_control_frame     (BonoboWidget *bw);
Bonobo_UIContainer  bonobo_widget_get_ui_container      (BonoboWidget *bw);
void                (*BonoboWidgetAsyncFn)              (BonoboWidget *widget,
                                                         CORBA_Environment *ev,
                                                         gpointer user_data);
GtkWidget*          bonobo_widget_new_control_async     (const char *moniker,
                                                         Bonobo_UIContainer uic,
                                                         BonoboWidgetAsyncFn fn,
                                                         gpointer user_data);
BonoboWidget*       bonobo_widget_construct_control_from_objref
                                                        (BonoboWidget *bw,
                                                         Bonobo_Control control,
                                                         Bonobo_UIContainer uic,
                                                         CORBA_Environment *ev);
BonoboWidget*       bonobo_widget_construct_control     (BonoboWidget *bw,
                                                         const char *moniker,
                                                         Bonobo_UIContainer uic,
                                                         CORBA_Environment *ev);
void                bonobo_widget_set_property          (BonoboWidget *control,
                                                         const char *first_prop,
                                                         ...);
void                bonobo_widget_get_property          (BonoboWidget *control,
                                                         const char *first_prop,
                                                         ...);
#define             bonobo_widget_get_uih               (w)
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----BonoboWidget
Bonobo component embedding for hydrocephalic imbeciles.
Pure cane sugar.
This purpose of BonoboWidget is to make container-side use of Bonobo as easy as pie. This widget has two functions:
Provide a simple wrapper for embedding Controls. Embedding controls is already really easy, but BonoboWidget reduces the work from about 5 lines to 1. To embed a given control, just do:
       bw = bonobo_widget_new_control ("id for control", toplevel_ui_handler);
       gtk_container_add (some_container, bw);
          
        You are free to make the 2nd (UIContainer) argument to
        bonobo_widget_new_control() be CORBA_OBJECT_NIL.
      
To provide an extremely simple wrapper for using Monikers. In fact all BonoboWidget use uses the OAFIID: moniker to activate its sub-components. However monikers (bonobo-moniker-util) are far more powerful than this:
	         bw = bonobo_widget_new_control ("file:/demo/a.jpeg", toplevel_ui_handler);
          will launch an application that can render a jpeg as a control, usualy the Eye Of Gnome (EOG), and embed it as a control.
There are also functions for fetching and setting values in the Control PropertyBag, but the use of these functions is discouraged.
Bonobo_Unknown bonobo_widget_get_objref (BonoboWidget *bw);
| 
 | |
| Returns : | 
GtkWidget* bonobo_widget_new_control (const char *moniker, Bonobo_UIContainer uic);
This function is a simple wrapper for easily embedding controls
into applications.  It will launch the component identified by id
and will return it as a GtkWidget.
| 
 | A Moniker describing the object to be activated | 
| 
 | Bonobo_UIContainer for the launched object or CORBA_OBJECT_NIL if there is no need of menu / toolbar merging. | 
| Returns : | A GtkWidget that is bound to the Bonobo Control. | 
GtkWidget* bonobo_widget_new_control_from_objref (Bonobo_Control control, Bonobo_UIContainer uic);
This function is a simple wrapper for easily embedding controls
into applications.  This function is used when you have already
a CORBA object reference to an IDL:Bonobo/Control:1.0 (the
control) argument.
| 
 | A CORBA Object reference to an IDL:Bonobo/Control:1.0 | 
| 
 | Bonobo_UIContainer for the launched object or CORBA_OBJECT_NIL if there is no need of menu / toolbar merging. | 
| Returns : | the controlwrapped as a GtkWidget. | 
BonoboControlFrame* bonobo_widget_get_control_frame (BonoboWidget *bw);
Every IDL:Bonobo/Control:1.0 needs to be placed inside an
IDL:Bonobo/ControlFrame:1.0.  This returns the BonoboControlFrame
object that wraps the Control in the bonobo_widget.
| 
 | |
| Returns : | The BonoboControlFrame associated with the bonobo_widget | 
Bonobo_UIContainer bonobo_widget_get_ui_container (BonoboWidget *bw);
| 
 | |
| Returns : | the CORBA object reference to the Bonobo_UIContainer
associated with the bonobo_widget. | 
void (*BonoboWidgetAsyncFn) (BonoboWidget *widget, CORBA_Environment *ev, gpointer user_data);
| 
 | |
| 
 | |
| 
 | 
GtkWidget* bonobo_widget_new_control_async (const char *moniker, Bonobo_UIContainer uic, BonoboWidgetAsyncFn fn, gpointer user_data);
This method creates a widget, returns it to the user, and asynchronously activates a control to insert into the widget.
| 
 | A Moniker describing the object to be activated | 
| 
 | Bonobo_UIContainer for the launched object or CORBA_OBJECT_NIL if there is no need of menu / toolbar merging. | 
| 
 | a callback function called when the activation has happend | 
| 
 | user data to be passed back to the callback. | 
| Returns : | a (temporarily) empty Widget to be filled with the control later | 
BonoboWidget* bonobo_widget_construct_control_from_objref (BonoboWidget *bw, Bonobo_Control control, Bonobo_UIContainer uic, CORBA_Environment *ev);
This is a constructor function. Only usable for wrapping and derivation of new objects. For normal use, please refer to bonobo_widget_new_control_from_objref.
| 
 | A BonoboWidget to construct | 
| 
 | A CORBA Object reference to an IDL:Bonobo/Control:1.0 | 
| 
 | Bonobo_UIContainer for the launched object or CORBA_OBJECT_NIL if there is no need of menu / toolbar merging. | 
| 
 | a CORBA exception environment | 
| Returns : | A BonoboWidget (the bw) | 
BonoboWidget* bonobo_widget_construct_control (BonoboWidget *bw, const char *moniker, Bonobo_UIContainer uic, CORBA_Environment *ev);
This is a constructor function. Only usable for wrapping and derivation of new objects. For normal use, please refer to bonobo_widget_new_control.
This function will unref the passed in bw in case it cannot launch
the component and return NULL in such a case.  Otherwise it returns
the bw itself.
| 
 | A BonoboWidget to construct | 
| 
 | A Moniker describing the object to be activated | 
| 
 | Bonobo_UIContainer for the launched object or CORBA_OBJECT_NIL if there is no need of menu / toolbar merging. | 
| 
 | a CORBA exception environment | 
| Returns : | A BonoboWidget or NULL | 
void bonobo_widget_set_property (BonoboWidget *control, const char *first_prop, ...);
This is a utility function used to set a number of properties
in the Bonobo Control in control.
This function takes a variable list of arguments that must be NULL
terminated.  Arguments come in tuples: a string (for the argument
name) and the data type that is to be transfered.  The
implementation of the actual setting of the PropertyBag values is
done by the bonobo_property_bag_client_setv() function).
This only works for BonoboWidgets that represent controls (ie,
that were returned by bonobo_widget_new_control_from_objref() or
bonobo_widget_new_control().
| 
 | A BonoboWidget that represents an IDL:Bonobo/Control:1.0 | 
| 
 | first property name to set. | 
| 
 | 
void bonobo_widget_get_property (BonoboWidget *control, const char *first_prop, ...);
This is a utility function used to get a number of properties
in the Bonobo Control in control.
This function takes a variable list of arguments that must be NULL
terminated.  Arguments come in tuples: a string (for the argument
name) and a pointer where the data will be stored.  The
implementation of the actual setting of the PropertyBag values is
done by the bonobo_property_bag_client_setv() function).
This only works for BonoboWidgets that represent controls (ie,
that were returned by bonobo_widget_new_control_from_objref() or
bonobo_widget_new_control().
| 
 | A BonoboWidget that represents an IDL:Bonobo/Control:1.0 | 
| 
 | first property name to set. | 
| 
 | 
   Object activation happens with bonobo_get_object().
BonoboControl, BonoboControlFrame, BonoboObject, BonoboView, BonoboEmbeddable, BonoboUIContainer, BonoboItemContainer.