Re: Proposal of a Bonobo::Zoomable interface



Miguel de Icaza <miguel helixcode com> writes:

> > Well, I can understand that it may be a bit of bloat if you have many
> > components embedded in a compound document, but this interface really
> > isn't so large that it'll cause a bloat and applications which only
> > support compound documents can still emit the "set_zoom_level" signal
> > on the view rather than using the Zoomable interface.
> 
> The issue I have with it is that you will have to write a lot of code
> to handle the min-zoom, max-zoom, zoom-steps IFF the interface is
> supported by the control, if not, do not use it.

So you mean, there should be one single function to query all of them ?

For the component, it is not much work to set them all, it'll do some

        bonobo_zoomable_set_parameters (view_data->zoomable, 0.0, 0.0,
                                        FALSE, FALSE, TRUE, NULL, 0);

or even

        /* make each zoom level correspond to a font size */
        float *zoom_levels[6] = { 8.0, 10.0, 12.0, 14.0, 16.0, 18.0 };

        bonobo_zoomable_set_parameters (view_data->zoomable, 8.0, 18.0,
                                        TRUE, TRUE, FALSE, zoom_levels, 6);


That's already most of it. It's then the container's job to deal with the
values, for instance display a zooming UI element.

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




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