Whole document tree
BonoboViewSynopsis
DescriptionBonoboView 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). Since GtkWidgets do not support linear zooming, it is essential to understand that you cannot use GtkWidgets inside your view - you must write custom rendering code. An embeddable view is not a Control - by this I mean that it does not control its own sizing, rendering or layout. It is entirely a slave to the parent with respect to this. A View should never render scroll bars into itself ( unless, exceptionaly if it is activated, and allows the user to pan around a larger area ). Essentialy a non-activated view should only show things that it will print, and should render WYSIWYG as much as possible. Embeddable's views scale linearly to obey the zoom level they are given. If your component provides menus, then you use the bonobo_view_get_remote_ui_container() to retrieve a Bonobo_UIContainer handle to merge your menu / toolbar items into. 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. Your component must support zooming to be a true embeddable. There are two ways to support zoom.
DetailsBonoboViewClass
BonoboViewVerbFunc ()
bonobo_view_construct ()
item_creator might be NULL for widget-based views. bonobo_view_new ()
This function creates a new BonoboView object for widget bonobo_view_set_embeddable ()
This function associates view with the specified GnomeEmbeddabe object, embeddable. bonobo_view_set_view_frame ()
Sets the ViewFrame for view to view_frame. bonobo_view_get_remote_ui_container ()
|