EventControllerScroll
Superclasses: EventController
, Object
- Constructors:
EventControllerScroll(**properties)
new(flags:Gtk.EventControllerScrollFlags) -> Gtk.EventController
Constructors
- class EventControllerScroll
- classmethod new(flags: EventControllerScrollFlags) EventController
Creates a new event controller that will handle scroll events.
- Parameters:
flags – flags affecting the controller behavior
Methods
- class EventControllerScroll
- get_flags() EventControllerScrollFlags
Gets the flags conditioning the scroll controller behavior.
- get_unit() ScrollUnit
Gets the scroll unit of the last
scroll
signal received.Always returns
%GDK_SCROLL_UNIT_WHEEL
if theDISCRETE
flag is set.Added in version 4.8.
- set_flags(flags: EventControllerScrollFlags) None
Sets the flags conditioning scroll controller behavior.
- Parameters:
flags – flags affecting the controller behavior
Properties
- class EventControllerScroll
- props.flags: EventControllerScrollFlags
The flags affecting event controller behavior.
Signals
- class EventControllerScroll.signals
- decelerate(vel_x: float, vel_y: float) None
Emitted after scroll is finished if the
KINETIC
flag is set.vel_x
andvel_y
express the initial velocity that was imprinted by the scroll events.vel_x
andvel_y
are expressed in pixels/ms.- Parameters:
vel_x – X velocity
vel_y – Y velocity
- scroll(dx: float, dy: float) bool
Signals that the widget should scroll by the amount specified by
dx
anddy
.For the representation unit of the deltas, see
get_unit
.- Parameters:
dx – X delta
dy – Y delta