/* 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
{
/** Rotate gesture.
*
* This is a Gesture implementation able to recognize
* 2-finger rotations. Whenever the angle between both handled sequences
* changes, signal_angle_changed() is emitted.
*
* @newin{3,14}
*
* @ingroup Gestures
*/
class GTKMM_API GestureRotate : public Gesture
{
_CLASS_GOBJECT(GestureRotate, GtkGestureRotate, GTK_GESTURE_ROTATE, 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 2-touch rotation gestures.
*/
_WRAP_CTOR(GestureRotate(Widget& widget), gtk_gesture_rotate_new)
public:
/** Creates a Gesture that recognizes 2-touch rotation gestures.
*
* @newin{3,14}
*
* @param widget Widget the gesture relates to.
* @return A RefPtr to a new GestureRotate.
*/
_WRAP_CREATE(Widget& widget)
_WRAP_METHOD(double get_angle_delta() const, gtk_gesture_rotate_get_angle_delta)
// no_default_handler because GtkGestureRotateClass is private.
_WRAP_SIGNAL(void angle_changed(double angle, double angle_delta), "angle-changed", no_default_handler)
// GestureRotate has no properties
};
} // namespace Gtk