/* 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/gesturesingle_p.h) namespace Gtk { /** "Press and Hold" gesture. * * This is a Gesture implementation able to recognize * long presses, triggering signal_pressed() after the * timeout is exceeded. * * If the touchpoint is lifted before the timeout passes, or if it drifts * too far of the initial press point, signal_cancelled() will be emitted. * * @newin{3,14} * * @ingroup Gestures */ class GTKMM_API GestureLongPress : public GestureSingle { _CLASS_GOBJECT(GestureLongPress, GtkGestureLongPress, GTK_GESTURE_LONG_PRESS, GestureSingle, GtkGestureSingle, , , 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 long presses. */ _WRAP_CTOR(GestureLongPress(Widget& widget), gtk_gesture_long_press_new) public: /** Creates a Gesture that recognizes long presses. * * @newin{3,14} * * @param widget Widget the gesture relates to. * @return A RefPtr to a new GestureLongPress. */ _WRAP_CREATE(Widget& widget) // no_default_handler because GtkGestureLongPressClass is private. _WRAP_SIGNAL(void pressed(double x, double y), "pressed", no_default_handler) _WRAP_SIGNAL(void cancelled(), "cancelled", no_default_handler) _WRAP_PROPERTY("delay-factor", double, newin "3,20") // GestureLongPress has no methods }; } // namespace Gtk