Debian Codegraph @

gtk/src/gesturerotate.hg

raw
1 /* Copyright (C) 2014 The gtkmm Development Team
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #include <gtkmm/gesture.h>
18
19 _DEFS(gtkmm,gtk)
20 _PINCLUDE(gtkmm/private/gesture_p.h)
21
22 namespace Gtk
23 {
24 /** Rotate gesture.
25 *
26 * This is a Gesture implementation able to recognize
27 * 2-finger rotations. Whenever the angle between both handled sequences
28 * changes, signal_angle_changed() is emitted.
29 *
30 * @newin{3,14}
31 *
32 * @ingroup Gestures
33 */
34 class GTKMM_API GestureRotate : public Gesture
35 {
36 _CLASS_GOBJECT(GestureRotate, GtkGestureRotate, GTK_GESTURE_ROTATE, Gesture, GtkGesture, , , GTKMM_API)
37
38 protected:
39 /** There is no create() method that corresponds to this constructor,
40 * because this constructor shall only be used by derived classes.
41 */
42 _CTOR_DEFAULT
43
44 /** Constructs a Gesture that recognizes 2-touch rotation gestures.
45 */
46 _WRAP_CTOR(GestureRotate(Widget& widget), gtk_gesture_rotate_new)
47
48 public:
49 /** Creates a Gesture that recognizes 2-touch rotation gestures.
50 *
51 * @newin{3,14}
52 *
53 * @param widget Widget the gesture relates to.
54 * @return A RefPtr to a new GestureRotate.
55 */
56 _WRAP_CREATE(Widget& widget)
57
58 _WRAP_METHOD(double get_angle_delta() const, gtk_gesture_rotate_get_angle_delta)
59
60 // no_default_handler because GtkGestureRotateClass is private.
61 _WRAP_SIGNAL(void angle_changed(double angle, double angle_delta), "angle-changed", no_default_handler)
62
63 // GestureRotate has no properties
64 };
65
66 } // namespace Gtk