Re: Proposal of a Bonobo::Zoomable interface



Miguel de Icaza <miguel helixcode com> writes:

> > Currently, there is no good zooming interface in Bonobo.
> > I mean, there is this "set_zoom_level" signal on a BonoboView,
> > but there is no way for a container application to
> > 
> > a) find out whether a component supports zooming
> 
> Zooming as implemented in Bonobo is there for using in compound
> documents, and you really should support that in your component if it
> is supposed to be part of an embeded document.  

Unfortunately, it is for this reason not at all useful for Controls.
 
> > b) ask the component for its current zoom factor
> 
> You always set this, or you should be able to keep track of this
> without requiring the embedded piece to report this

For a compound document this might make sense. In a Control context,
or a case where you areuisng an Embeddable in a Control-like way, the
component itself may have some internal UI for setting the zoom level
(perhaps it merges a control onto the toolbar; perhaps it has a right
click menu). In any case, set-only interfaces are generally not the
best design. For instacme, the component may have been passed to you by
someone else who intialized it to a particular zoom level; it would be
annoying to have to also pass the zoom level in that case.

> > c) ask the component about its zooming capabilities, for instance
> >    if it has a minimum/maximum zoom factor, if it only supports
> >    fixed zoom levels etc.
> 
> This seems like it will bloat every application.  Now every
> application will have to query its components and find out what sizes
> the embedded is happy to deal with.

Well, again, this might be excessive in a compound document context,
but not for other uses.

> When the right thing to do is to have every component support zooming
> at every resolution possible.  

Sometimes that is not feasible or desirable. Stepwise-zoomable
components already exist in any case, it's just a matter of whether
they will be supported only by Nautilus, or by any app that uses
Bonobo. The Zoomable interface in Nautilus is pretty general, and was
even blessed by Federico at one point, though, so leaving it a
Nautilus-only thing might not be the most useful approach to the
problem.

 - Maciej




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