Re: Proposal of a Bonobo::Zoomable interface



After playing around with this a bit, it should be:

====
BonoboZoomable  *bonobo_zoomable_new       (void);

BonoboZoomable  *bonobo_zoomable_construct (BonoboZoomable *zoomable,
                                            Bonobo_Zoomable corba_zoomable);
====

This is normally used like this

====
static BonoboView *
view_factory_common (.....)
{
        BonoboView *view;
	view_data_t *view_data = g_new (view_data_t, 1);
	GtkWidget *root;

        /* ..... */
        root = wherever_we_get_it_from ();
        view = bonobo_view_new (root);
        /* ..... */

	view_data->zoomable = bonobo_zoomable_new ();

	bonobo_object_add_interface (BONOBO_OBJECT (view),
				     BONOBO_OBJECT (view_data->zoomable));

        /* ..... */
        return view
}
====

At this time, the component doesn't know the zooming parameters yet; it needs
to load a file first.

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]