/* 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 <http://www.gnu.org/licenses/>.
 */

#include <gtkmm/gesturesingle.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/gesturesingle_p.h)

namespace Gtk
{
/** Drag gesture.
 *
 * This is a Gesture implementation that recognizes drag
 * operations. The drag operation itself can be tracked through
 * signal_drag_begin(), signal_drag_update() and
 * signal_drag_end(), or the relevant coordinates be
 * extracted through get_offset() and get_start_point().
 *
 * @newin{3,14}
 *
 * @ingroup Gestures
 */
class GTKMM_API GestureDrag : public GestureSingle
{
  _CLASS_GOBJECT(GestureDrag, GtkGestureDrag, GTK_GESTURE_DRAG, GestureSingle, GtkGestureSingle, , , GTKMM_API)

protected:
  /** Constructs a Gesture that recognizes drags.
   */
  _CTOR_DEFAULT

public:
  /** Creates a Gesture that recognizes drags.
   *
   * @newin{3,14}
   *
   * @return A RefPtr to a new GestureDrag.
   */
  _WRAP_CREATE()

  _WRAP_METHOD(bool get_start_point(double& x, double& y) const, gtk_gesture_drag_get_start_point)
  _WRAP_METHOD(bool get_offset(double& x, double& y) const, gtk_gesture_drag_get_offset)

  // no_default_handler because GtkGestureDragClass is private.
  _WRAP_SIGNAL(void drag_begin(double start_x, double start_y), "drag-begin", no_default_handler)
  _WRAP_SIGNAL(void drag_update(double offset_x, double offset_y), "drag-update", no_default_handler)
  _WRAP_SIGNAL(void drag_end(double offset_x, double offset_y), "drag-end", no_default_handler)

  // GestureDrag has no properties
};

} // namespace Gtk
