/* * bonobo-zoomable.idl: Bonobo::Zoomable - a zoomable interface for Controls. * * Copyright (C) 2000 Eazel, Inc. * 2000 SuSE GmbH. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Authors: Maciej Stachowiak * Martin Baulig */ #ifndef BONOBO_ZOOMABLE_IDL #define BONOBO_ZOOMABLE_IDL #include "Bonobo_Unknown.idl" module Bonobo { typedef float ZoomLevel; typedef string ZoomLevelName; typedef sequence ZoomLevelList; typedef sequence ZoomLevelNameList; /* A zoomable has the responsibility to look for this * interface on its Bonobo control frame and call * onLevelChanged whenever it changes the zoom level (on * its own or due to calls from the zoomable interface). */ interface ZoomableFrame : ::Bonobo::Unknown { /** * onLevelChanged: * @zoom_level: The new zoom level. * * Informs the ZoomableFrame that the zoom level has changed. * The Zoomable should call this each time it successfully * completed a zooming operation. */ oneway void onLevelChanged (in float zoom_level); /** * onParametersChanged: * * Informs the ZoomableFrame that some of the zoom parameters * such as min/max zoom level has changed, for instance after * loading a new file into the component. */ oneway void onParametersChanged (); void unImplemented1 (); void unImplemented2 (); void unImplemented3 (); void unImplemented4 (); }; interface Zoomable : Bonobo::Unknown { /* * This is a read-only value and indicates the actual current * zoom level of the component. It is changed by the component * after successfully completing a zooming operation before * calling the `onLevelChanged' method on its ZoomableFrame. */ readonly attribute float level; /* Information about the type of zooming that's supported. */ readonly attribute float minLevel; readonly attribute float maxLevel; readonly attribute boolean hasMinLevel; readonly attribute boolean hasMaxLevel; readonly attribute boolean isContinuous; readonly attribute ZoomLevelList preferredLevels; readonly attribute ZoomLevelNameList preferredLevelNames; /* * High level operations. * These can cause a change in the zoom level. * The zoomable itself must decide what the concepts * "one level in", "one level out", and "to fit" mean. */ oneway void zoomIn (); oneway void zoomOut (); oneway void zoomFit (); oneway void zoomDefault (); /** * setLevel: * @zoom_level: The new zoom level. * * Tells the component to zoom to @zoom_level. * * If the component only supports fixed zoom levels, * then the actual zoom level will be set to the * closest possible value of @zoom_level. */ void setLevel (in float zoom_level); /** * setFrame: * @zoomable_frame: A Bonobo_ZoomableFrame. * * Gives the Zoomable a handle to its ZoomableFrame. */ void setFrame (in ZoomableFrame zoomable_frame); void unImplemented1 (); void unImplemented2 (); void unImplemented3 (); void unImplemented4 (); }; }; #endif /* BONOBO_ZOOMABLE_IDL */