Bonobo API Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
"set-frame" void user_function (BonoboControl *bonobocontrol, |
The BonoboControl object implements the CORBA interface for handling remote embeddable components. A Control is a light weight, single view, arbitrarily complex 'widget'. Controls typicaly expose much of their functionality through a property bag.
A BonoboControl provides the server ( or component ) side
implementation of a Control. The client that uses this
control will probably use a
If you want to expose your widget as a control it is very simple
Example 1. CORBA-ifying your GtkWidget
BonoboControl *control; GtkWidget *widget; Bonobo_Unknown corba_object; widget = |
Example 2. A pretty useless Control
GtkWidget *widget; widget = gtk_button_new_with_label ("My Control"); gtk_widget_show (widget); return bonobo_control_new (widget); |
One final thing worth thinking about is activation. When a control
is embedded inside a BonoboControlFrame, it is initialy inactive.
In order for the control to recieve interactive input it is neccessary
to use bonobo_control_frame_activate. This signals to the control
that it is activated, at which point the Control should merge any
UI elements it has with the associated
typedef struct { BonoboXObjectClass parent_class; POA_Bonobo_Control__epv epv; /* Signals. */ void (*set_frame) (BonoboControl *control); void (*activate) (BonoboControl *control, gboolean state); } BonoboControlClass; |
BonoboControl* bonobo_control_new ( |
This function creates a new BonoboControl object for widget.
widget : | a GTK widget that contains the control and will be passed to the container process. |
Returns : | a BonoboControl object that implements the Bonobo::Control CORBA service that will transfer the widget to the container process. |
|
Returns the GtkWidget associated with a BonoboControl.
control : | a BonoboControl |
Returns : | the BonoboControl's widget |
void bonobo_control_set_automerge (BonoboControl *control, |
Sets whether or not the control handles menu/toolbar merging automatically. If automerge is on, the control will automatically register its BonoboUIComponent with the remote BonoboUIContainer when it is activated.
control : | |
automerge : | Whether or not menus and toolbars should be automatically merged when the control is activated. |
|
control : | |
Returns : | Whether or not the control is set to automerge its menus/toolbars. See bonobo_control_set_automerge(). |
void bonobo_control_set_property (BonoboControl *control, const char *first_prop, ...); |
control : | |
first_prop : | |
... : |
|
void bonobo_control_get_property (BonoboControl *control, const char *first_prop, ...); |
control : | |
first_prop : | |
... : |
|
BonoboControl* bonobo_control_construct (BonoboControl *control, |
control : | |
widget : | |
Returns : |
|
control : | The control |
Returns : | the associated UI component |
void bonobo_control_set_ui_component (BonoboControl *control, |
control : | |
component : |
|
|
control : | A BonoboControl object which is associated with a remote ControlFrame. |
Returns : | The Bonobo_UIContainer CORBA server for the remote BonoboControlFrame. |
void bonobo_control_set_control_frame (BonoboControl *control, |
Sets the ControlFrame for control to control_frame.
control : | A BonoboControl object. |
control_frame : | A CORBA interface for the ControlFrame which contains this Controo. |
|
control : | A BonoboControl object whose Bonobo_ControlFrame CORBA interface is being retrieved. |
Returns : | The Bonobo_ControlFrame CORBA object associated with control, this is a CORBA_Object_duplicated object. You need to CORBA_Object_release it when you are done with it. |
void bonobo_control_set_properties (BonoboControl *control, BonoboPropertyBag *pb); |
Binds pb to control. When a remote object queries control for its property bag, pb will be used in the responses.
control : | A BonoboControl object. |
pb : |
BonoboPropertyBag* bonobo_control_get_properties (BonoboControl *control); |
control : | A BonoboControl whose PropertyBag has already been set. |
Returns : | The BonoboPropertyBag bound to control. |
|
control : | A BonoboControl which is bound to a remote BonoboControlFrame. |
ev : | CORBA exception environment. |
Returns : | A |
void bonobo_control_activate_notify (BonoboControl *control, |
Notifies the remote ControlFrame which is associated with control that control has been activated/deactivated.
control : | A BonoboControl object which is bound to a remote ControlFrame. |
activated : | Whether or not control has been activated. |
void user_function (BonoboControl *bonobocontrol, |
bonobocontrol : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (BonoboControl *bonobocontrol, |
bonobocontrol : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |