Re: Proposal of a Bonobo::Zoomable interface



Darin Adler <darin eazel com> writes:

> on 9/26/00 8:14 AM, Martin Baulig at martin home-of-linux org wrote:
> 
> > This is basically copied from Nautilus::Zoomable, but I added a way to
> > find out whether there is a minimum/maximum zoom level (`has_min_zoom_level').
> > 
> > How do you like this ?
> 
> We (the Nautilus team) would love to see the Zoomable interface in Bonobo.
> Martin's proposal leaves out the ZoomableFrame interface, which is used by
> the object to report zoom level changes to the container.

Well, this whole thing started at the hotel bar in Nuernberg for me since
I wanted to add zooming to the eog component when it is used in nautilus.
After reading some Nautilus source code and drinking some Pinacolada's I
realized that it'd be a mess to require -lnautilus for every single component
which wants to be zoomable in Nautilus and that the only clean way to do this
is to do this in Bonobo .... :-)

>     /* A zoomable has the responsibility to look for this
>      * interface on its Bonobo frame and call
>      * zoom_level_changed whenever it changes the zoom level (on
>      * its own or due to calls from the zoomable interface).
>      */
> 
>     interface ZoomableFrame : ::Bonobo::Unknown {
>         oneway void report_zoom_level_changed (in float zoom_level);
>     };

Oh, yes. I'm gonna implement this as well.

In the Bonobo GTK-Object abstraction layer, this also becomes quite useful
when you want to invoke methods on the Bonobo::Zoomable, for instance

        void    bonobo_zoomable_frame_zoom_in   (BonoboZoomableFrame *frame);

which will then talk to the component's Bonobo::Zoomable CORBA object.

> One other note.
> 
> Due to alignment problems in ORBit-generated code on Solaris, we had to
> change all the zoom levels in Zoomable from double to to float to make it
> work on Solaris. I recommend the same thing for Bonobo -- we don't really
> need the additional precision of double -- unless we can somehow get this
> ORBit problem fixed in time for the Bonobo 1.0 release.

Well, then I'll l use float instead of double for all my new code, thanks
for the warning.

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




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