BonoboView

Name

BonoboView -- View object for exporting a view of a BonoboEmbeddable component

Synopsis



#define     BONOBO_VIEW_TYPE
#define     BONOBO_VIEW                     (o)
#define     BONOBO_VIEW_CLASS               (k)
#define     BONOBO_IS_VIEW                  (o)
#define     BONOBO_IS_VIEW_CLASS            (k)
struct      BonoboView;
typedef     BonoboViewClass;
#define     BONOBO_VIEW_VERB_FUNC           (fn)
void        (*BonoboViewVerbFunc)           (BonoboView *view,
                                             const char *verb_name,
                                             void *user_data);
BonoboView* bonobo_view_construct           (BonoboView *view,
                                             Bonobo_View corba_view,
                                             GtkWidget *widget);
BonoboView* bonobo_view_new                 (GtkWidget *widget);
Bonobo_View bonobo_view_corba_object_create (BonoboObject *object);
void        bonobo_view_set_embeddable      (BonoboView *view,
                                             BonoboEmbeddable *embeddable);
BonoboEmbeddable* bonobo_view_get_embeddable
                                            (BonoboView *view);
void        bonobo_view_set_view_frame      (BonoboView *view,
                                             Bonobo_ViewFrame view_frame);
Bonobo_ViewFrame bonobo_view_get_view_frame (BonoboView *view);
Bonobo_UIContainer bonobo_view_get_remote_ui_container
                                            (BonoboView *view);
BonoboUIComponent* bonobo_view_get_ui_component
                                            (BonoboView *view);
void        bonobo_view_activate_notify     (BonoboView *view,
                                             gboolean activated);
POA_Bonobo_View__epv* bonobo_view_get_epv   (void);

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))

o : 


BONOBO_VIEW_CLASS()

#define BONOBO_VIEW_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), BONOBO_VIEW_TYPE, BonoboViewClass))

k : 


BONOBO_IS_VIEW()

#define BONOBO_IS_VIEW(o)       (GTK_CHECK_TYPE ((o), BONOBO_VIEW_TYPE))

o : 


BONOBO_IS_VIEW_CLASS()

#define BONOBO_IS_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_VIEW_TYPE))

k : 


struct BonoboView

struct BonoboView;


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))

fn : 


BonoboViewVerbFunc ()

void        (*BonoboViewVerbFunc)           (BonoboView *view,
                                             const char *verb_name,
                                             void *user_data);

view : 
verb_name : 
user_data : 


bonobo_view_construct ()

BonoboView* bonobo_view_construct           (BonoboView *view,
                                             Bonobo_View corba_view,
                                             GtkWidget *widget);

view : 
corba_view : 
widget : 
Returns : 


bonobo_view_new ()

BonoboView* bonobo_view_new                 (GtkWidget *widget);

widget : 
Returns : 


bonobo_view_corba_object_create ()

Bonobo_View bonobo_view_corba_object_create (BonoboObject *object);

object : 
Returns : 


bonobo_view_set_embeddable ()

void        bonobo_view_set_embeddable      (BonoboView *view,
                                             BonoboEmbeddable *embeddable);

view : 
embeddable : 


bonobo_view_get_embeddable ()

BonoboEmbeddable* bonobo_view_get_embeddable
                                            (BonoboView *view);

view : 
Returns : 


bonobo_view_set_view_frame ()

void        bonobo_view_set_view_frame      (BonoboView *view,
                                             Bonobo_ViewFrame view_frame);

view : 
view_frame : 


bonobo_view_get_view_frame ()

Bonobo_ViewFrame bonobo_view_get_view_frame (BonoboView *view);

view : 
Returns : 


bonobo_view_get_remote_ui_container ()

Bonobo_UIContainer bonobo_view_get_remote_ui_container
                                            (BonoboView *view);

view : 
Returns : 


bonobo_view_get_ui_component ()

BonoboUIComponent* bonobo_view_get_ui_component
                                            (BonoboView *view);

view : 
Returns : 


bonobo_view_activate_notify ()

void        bonobo_view_activate_notify     (BonoboView *view,
                                             gboolean activated);

view : 
activated : 


bonobo_view_get_epv ()

POA_Bonobo_View__epv* bonobo_view_get_epv   (void);

Returns : 

See Also

BonoboViewFrame, BonoboEmbeddable, BonoboWidget, bonobo_widget_new()