/* 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/gesture.h>

_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 GestureZoom : public Gesture
{
  _CLASS_GOBJECT(GestureZoom, GtkGestureZoom, GTK_GESTURE_ZOOM, Gesture, GtkGesture)

protected:
  /** Constructs a Gesture that recognizes zoom in/out gestures
   * (usually known as pinch/zoom).
   */
  _CTOR_DEFAULT

public:
  /** Creates a Gesture that recognizes zoom in/out gestures
   * (usually known as pinch/zoom).
   *
   * @newin{3,14}
   *
   * @return A RefPtr to a new GestureZoom.
   */
  _WRAP_CREATE()

  _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
