Gtk.GestureZoom

g GObject.Object GObject.Object Gtk.EventController Gtk.EventController GObject.Object->Gtk.EventController Gtk.Gesture Gtk.Gesture Gtk.EventController->Gtk.Gesture Gtk.GestureZoom Gtk.GestureZoom Gtk.Gesture->Gtk.GestureZoom

Subclasses:

None

Methods

Inherited:

Gtk.Gesture (17), Gtk.EventController (13), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_scale_delta ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gtk.Gesture (1), Gtk.EventController (4)

Signals

Inherited:

Gtk.Gesture (5), GObject.Object (1)

Name

Short Description

scale-changed

Emitted whenever the distance between both tracked sequences changes.

Fields

Inherited:

Gtk.Gesture (5), GObject.Object (1)

Class Details

class Gtk.GestureZoom(**kwargs)
Bases:

Gtk.Gesture

Abstract:

No

Structure:

Gtk.GestureZoomClass

GtkGestureZoom is a GtkGesture for 2-finger pinch/zoom gestures.

Whenever the distance between both tracked sequences changes, the [signal`Gtk`.GestureZoom::scale-changed] signal is emitted to report the scale factor.

classmethod new()[source]
Returns:

a newly created GtkGestureZoom

Return type:

Gtk.Gesture

Returns a newly created GtkGesture that recognizes pinch/zoom gestures.

get_scale_delta()[source]
Returns:

the scale delta

Return type:

float

Gets the scale delta.

If self is active, this function returns the zooming difference since the gesture was recognized (hence the starting point is considered 1:1). If self is not active, 1 is returned.

Signal Details

Gtk.GestureZoom.signals.scale_changed(gesture_zoom, scale)
Signal Name:

scale-changed

Flags:

RUN_FIRST

Parameters:
  • gesture_zoom (Gtk.GestureZoom) – The object which received the signal

  • scale (float) – Scale delta, taking the initial state as 1:1

Emitted whenever the distance between both tracked sequences changes.