Skip to main content

Module gestures

Module gestures 

Source
Expand description

The viewport’s gestures, as data so an input profile can remap them. The pointer’s come from the pointer profile in force (egui_pop_core::pointer, docs/pointer-gestures.md): what the wheel, a scroll, a pinch, each click, double click and drag does with each set of modifiers (ViewGestures); set_gestures sets them outright. They follow the shared interaction grammar:

Experimental: may change in any release (docs/stability.md).
  • Space held: a drag pans, whatever is under the pointer (a handle included);
  • Escape during a gesture puts things back as they were, with no trace (a Cancel signal);
  • double click on the canvas: the profile’s view action (fit by default, or leave the view); on a handle, that handle’s reset;
  • the wheel over the canvas zooms around the pointer or pans, as the profile says; over a handle it adjusts that handle’s quantity;
  • a primary drag on a handle moves it, whatever the profile.

Structs§

Gestures
The viewport’s gestures: the image canvas’s, shared with each pane of the library’s comparison (egui_pop_core::pointer::view, which runs them). An image canvas’s gestures, as data so an input profile can remap them: the pointer’s from the profile in force, the keys as by default.
ViewGestures
The views’ gestures and their action, shared with every zoomable view (egui_pop_core::pointer::view). A view’s pointer gestures: per set of modifiers (index), what the wheel, a scroll and a pinch do, what a click and a double click of each button do, and which buttons’ drags pan.

Enums§

ViewAction
The views’ gestures and their action, shared with every zoomable view (egui_pop_core::pointer::view). What a pointer gesture does to a view.

Functions§

gestures
The viewports’ gestures in a context: those set, else the pointer profile’s.
graph_gestures
The node graph’s pointer gestures in a context (its canvas.graph scope).
hint
What the pointer does in a view’s scope with the modifiers held now, in words (Wheel: zoom · MiddleDrag: pan): a canvas’s hint, empty when nothing is bound with them.
set_gestures
Sets the viewports’ gestures in a context, over the pointer profile’s (the comparison’s panes follow them too).