Name
BonoboView -- View object for exporting a view of a BonoboEmbeddable component
Description
BonoboView objects are typically created on the view factory
callback of a BonoboEmbeddable object. Bonobo components should be
able to provide as many view objects as requested by the
BonoboEmbeddable object on demand.
It is the programmer's responsibility to keep the contents of all the
views displaying the same information (modulo per-view state, like
the zoom factor).
If your component provides menus, then you use the
bonobo_view_set_ui_handler() on your view to provide it with a set
of menus and toolbars. You can also retrieve the container's UI
handler using bonobo_view_get_ui_handler().
You can register verbs in the View by using the
bonobo_view_register_verb(). When you want to stop supporting a
verb, you can use the bonobo_view_unregister_verb(). Alternatively,
you can hook up to the "do_verb" signal and catch the verb requests
on the signal handler.
BonoboView objects get a chance to tell their containers their
desired size by responding to the "size_query" signal. They will
get their size assigned later. The size assignment happens on the
GtkWidget using the normal Gtk+ size allocation procedure.
If your component supports zooming, connect to the
"set_zoom_factor" signal. This signal takes a floating point value
that indicates the desired zoom factor requested by your container.
Details
BONOBO_VIEW_TYPE
#define BONOBO_VIEW_TYPE (bonobo_view_get_type ()) |
Returns the GtkType associated with the BonoboView object.
BONOBO_VIEW()
#define BONOBO_VIEW(o) (GTK_CHECK_CAST ((o), BONOBO_VIEW_TYPE, BonoboView)) |
BONOBO_VIEW_CLASS()
#define BONOBO_VIEW_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_VIEW_TYPE, BonoboViewClass)) |
BONOBO_IS_VIEW()
#define BONOBO_IS_VIEW(o) (GTK_CHECK_TYPE ((o), BONOBO_VIEW_TYPE)) |
BONOBO_IS_VIEW_CLASS()
#define BONOBO_IS_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_VIEW_TYPE)) |
BonoboViewClass
typedef struct {
BonoboControlClass parent_class;
/*
* Signals
*/
void (*do_verb) (BonoboView *view,
const CORBA_char *verb_name);
void (*set_zoom_factor) (BonoboView *view, double zoom);
} BonoboViewClass; |
BONOBO_VIEW_VERB_FUNC()
#define BONOBO_VIEW_VERB_FUNC(fn) ((BonoboViewVerbFunc)(fn)) |
BonoboViewVerbFunc ()
void (*BonoboViewVerbFunc) (BonoboView *view,
const char *verb_name,
void *user_data); |
bonobo_view_construct ()
BonoboView* bonobo_view_construct (BonoboView *view,
Bonobo_View corba_view,
GtkWidget *widget); |
bonobo_view_new ()
BonoboView* bonobo_view_new (GtkWidget *widget); |
bonobo_view_corba_object_create ()
Bonobo_View bonobo_view_corba_object_create (BonoboObject *object); |
bonobo_view_set_embeddable ()
void bonobo_view_set_embeddable (BonoboView *view,
BonoboEmbeddable *embeddable); |
bonobo_view_get_embeddable ()
BonoboEmbeddable* bonobo_view_get_embeddable
(BonoboView *view); |
bonobo_view_set_view_frame ()
void bonobo_view_set_view_frame (BonoboView *view,
Bonobo_ViewFrame view_frame); |
bonobo_view_get_view_frame ()
Bonobo_ViewFrame bonobo_view_get_view_frame (BonoboView *view); |
bonobo_view_get_remote_ui_container ()
Bonobo_UIContainer bonobo_view_get_remote_ui_container
(BonoboView *view); |
bonobo_view_get_ui_component ()
BonoboUIComponent* bonobo_view_get_ui_component
(BonoboView *view); |
bonobo_view_activate_notify ()
void bonobo_view_activate_notify (BonoboView *view,
gboolean activated); |
bonobo_view_get_epv ()
POA_Bonobo_View__epv* bonobo_view_get_epv (void); |
See Also
BonoboViewFrame, BonoboEmbeddable, BonoboWidget, bonobo_widget_new()