/* Copyright (C) 2014 The gtkmm Development Team
*
* 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.1 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, see .
*/
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/gesture_p.h)
namespace Gtk
{
/** Zoom gesture.
*
* This is a Gesture implementation able to recognize
* pinch/zoom gestures. Whenever the distance between both tracked
* sequences changes, signal_scale_changed() is emitted to report the scale factor.
*
* @newin{3,14}
*
* @ingroup Gestures
*/
class GTKMM_API GestureZoom : public Gesture
{
_CLASS_GOBJECT(GestureZoom, GtkGestureZoom, GTK_GESTURE_ZOOM, Gesture, GtkGesture, , , GTKMM_API)
protected:
/** There is no create() method that corresponds to this constructor,
* because this constructor shall only be used by derived classes.
*/
_CTOR_DEFAULT
/** Constructs a Gesture that recognizes zoom in/out gestures
* (usually known as pinch/zoom).
*/
_WRAP_CTOR(GestureZoom(Widget& widget), gtk_gesture_zoom_new)
public:
/** Creates a Gesture that recognizes zoom in/out gestures
* (usually known as pinch/zoom).
*
* @newin{3,14}
*
* @param widget Widget the gesture relates to.
* @return A RefPtr to a new GestureZoom.
*/
_WRAP_CREATE(Widget& widget)
_WRAP_METHOD(double get_scale_delta() const, gtk_gesture_zoom_get_scale_delta)
// no_default_handler because GtkGestureZoomClass is private.
_WRAP_SIGNAL(void scale_changed(double scale), "scale-changed", no_default_handler)
// GestureZoom has no properties
};
} // namespace Gtk