Bonobo API Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
"activated" void user_function (BonoboControlFrame *bonobocontrolframe, |
The BonoboControlFrame object is used to embed a Control. Most
people will want to use
The control frame is coupled to an embedded control and is used to allow the Control to communicate with its environment, particuarly getting the BonoboUIContainer for merging its menu / toolbar UI elements.
Example 1. A nice use of a BonoboControlFrame
BonoboWidget * bonobo_widget_construct_control_from_objref (BonoboWidget *bw, Bonobo_Control control, Bonobo_UIContainer uic) { GtkWidget *control_frame_widget; /* * Create a local ControlFrame for it. */ bw->priv->control_frame = bonobo_control_frame_new (uic); bonobo_control_frame_bind_to_control (bw->priv->control_frame, control); ... bonobo_control_frame_set_autoactivate (bw->priv->control_frame, TRUE); /* * Grab the actual widget which visually contains the remote * Control. This is a GtkSocket, in reality. */ control_frame_widget = bonobo_control_frame_get_widget (bw->priv->control_frame); /* * Now stick it into this BonoboWidget. */ gtk_container_add (GTK_CONTAINER (bw), control_frame_widget); /* * Always remember to show the widget before reporting bugs. */ gtk_widget_show (control_frame_widget); if (uic != CORBA_OBJECT_NIL) bw->priv->uic = bonobo_object_dup_ref (uic, NULL); return bw; } |
typedef struct { BonoboXObject base; BonoboControlFramePrivate *priv; } BonoboControlFrame; |
typedef struct { BonoboXObjectClass parent_class; POA_Bonobo_ControlFrame__epv epv; /* Signals. */ void (*activated) (BonoboControlFrame *control_frame, gboolean state); void (*activate_uri) (BonoboControlFrame *control_frame, const char *uri, gboolean relative); } BonoboControlFrameClass; |
BonoboControlFrame* bonobo_control_frame_new ( |
ui_container : | The |
Returns : | BonoboControlFrame object that implements the Bonobo::ControlFrame CORBA service. |
|
Use this function when you want to embed a BonoboControl into your container's widget hierarchy. Once you have bound the BonoboControlFrame to a remote BonoboControl, place the widget returned by bonobo_control_frame_get_widget() into your widget hierarchy and the control will appear in your application.
frame : | The BonoboControlFrame whose widget is being requested.a |
Returns : | A GtkWidget which has the remote BonoboControl physically inside it. |
void bonobo_control_frame_set_ui_container (BonoboControlFrame *control_frame, |
Associates a new Bonobo_UIContainer object with this ControlFrame. This is only allowed while the Control is deactivated.
control_frame : | A BonoboControlFrame object. |
uic : | A Bonobo_UIContainer object reference. |
void bonobo_control_frame_control_activate (BonoboControlFrame *control_frame); |
Activates the BonoboControl embedded in control_frame by calling the
control_frame : | The BonoboControlFrame object whose control should be activated. |
void bonobo_control_frame_control_deactivate (BonoboControlFrame *control_frame); |
Deactivates the BonoboControl embedded in control_frame by calling
the
control_frame : | The BonoboControlFrame object whose control should be deactivated. |
void bonobo_control_frame_set_autoactivate (BonoboControlFrame *control_frame, |
Modifies the autoactivate behavior of control_frame. If control_frame is set to autoactivate, then it will automatically send an "activate" message to the Control to which it is bound when it gets a focus-in event, and a "deactivate" message when it gets a focus-out event. Autoactivation is off by default.
control_frame : | A BonoboControlFrame object. |
autoactivate : | A flag which indicates whether or not the ControlFrame should automatically perform activation on the Control to which it is bound. |
|
control_frame : | A BonoboControlFrame object. |
Returns : | A boolean which indicates whether or not control_frame is set to automatically activate its Control. See bonobo_control_frame_set_autoactivate(). |
|
This retrives a Bonobo_PropertyBag reference from its associated Bonobo Control
control_frame : | the control frame |
ev : | CORBA exception environment |
Returns : | CORBA property bag reference or CORBA_OBJECT_NIL |
void bonobo_control_frame_set_propbag (BonoboControlFrame *control_frame, BonoboPropertyBag *propbag); |
Makes control_frame use propbag for its ambient properties. When control_frame's Control requests the ambient properties, it will get them from propbag.
control_frame : | A BonoboControlFrame object. |
propbag : | A BonoboPropertyBag which will hold control_frame's ambient properties. |
BonoboPropertyBag* bonobo_control_frame_get_propbag (BonoboControlFrame *control_frame); |
control_frame : | A BonoboControlFrame object whose PropertyBag has been set. |
Returns : | The BonoboPropertyBag object which has been associated with control_frame. |
void bonobo_control_frame_control_set_state (BonoboControlFrame *control_frame, |
Proxies state to the control bound to control_frame.
control_frame : | A BonoboControlFrame object which is bound to a remote BonoboControl. |
state : | A |
void bonobo_control_frame_set_autostate (BonoboControlFrame *control_frame, |
Changes whether or not control_frame automatically proxies state changes to its associated control. The default mode is for the control frame to autopropagate.
control_frame : | A BonoboControlFrame object. |
autostate : | Whether or not GtkWidget state changes should be automatically propagated down to the Control. |
|
control_frame : | A BonoboControlFrame object. |
Returns : | Whether or not this control frame will automatically proxy GtkState changes to its associated Control. |
void bonobo_control_frame_bind_to_control (BonoboControlFrame *control_frame, |
Associates control with this control_frame.
control_frame : | A BonoboControlFrame object. |
control : | The CORBA object for the BonoboControl embedded in this BonoboControlFrame. |
|
control_frame : | A BonoboControlFrame which is bound to a remote BonoboControl. |
Returns : | The Bonobo_Control CORBA interface for the remote Control which is bound to frame. See also bonobo_control_frame_bind_to_control(). |
|
control_frame : | A BonoboControlFrame object. |
Returns : | The Bonobo_UIContainer object reference associated with this ControlFrame. This ui_container is specified when the ControlFrame is created. See bonobo_control_frame_new(). |
BonoboControlFrame* bonobo_control_frame_construct (BonoboControlFrame *control_frame, |
Initializes control_frame with the parameters.
control_frame : | The BonoboControlFrame object to be initialized. |
ui_container : | A CORBA object for the UIContainer for the container application. |
Returns : | the initialized BonoboControlFrame object control_frame that implements the Bonobo::ControlFrame CORBA service. |
void bonobo_control_frame_size_request (BonoboControlFrame *control_frame, int *desired_width, int *desired_height); |
control_frame : | |
desired_width : | |
desired_height : |
|
void bonobo_control_frame_sync_realize (BonoboControlFrame *frame); |
frame : |
|
void bonobo_control_frame_sync_unrealize (BonoboControlFrame *frame); |
frame : |
|
void user_function (BonoboControlFrame *bonobocontrolframe, |
bonobocontrolframe : | the object which received the signal. |
arg1 : | |
user_data : | user data set when the signal handler was connected. |
void user_function (BonoboControlFrame *bonobocontrolframe, |
bonobocontrolframe : | the object which received the signal. |
arg1 : | |
arg2 : | |
user_data : | user data set when the signal handler was connected. |