Skip to main content

Module pointer

Module pointer 

Source
Expand description

Pointer gestures in an application, owned by egui-pop: the pointer profile setting (input.pointer_profile: Document, darktable, Photoshop, Lightroom Classic, Blender / node editors, Trackpad; Document unless the application picks another with AppBuilder::pointer_profile; a retired id such as adobe names its successor, lightroom), the options each profile gives its default for (input.slider_wheel, input.image_double_click, input.dock_drag: what a plain drag of a floating palette does, its default the application’s with AppBuilder::dock_drag), the wheel device (input.wheel_device) and speed (input.wheel_speed), and the gesture commands (gesture.image.zoom…) the profile binds to pointer chords in the keymap’s default layer (docs/pointer-gestures.md).

Experimental: may change in any release (docs/stability.md).

The user’s changes are ordinary user-layer bindings, made in the shortcuts editor: they stay over the profile. When the profile changes and some exist, a dialog asks whether to keep them on the new profile or drop them (pointer.overrides, { "value": "keep" | "drop" }).

The application publishes what is in force to its context (egui_pop_core::pointer::set_map) after each change of the keymap or of these settings: the canvases read it.

Constants§

CATEGORY
The category gesture commands are listed under.
CMD_OVERRIDES
Keeps or drops the user’s pointer gesture changes ({ "value": "keep" | "drop" }): what the dialog shown on a change of profile runs.
FROM_PROFILE
An option’s choice that follows the profile.
SETTING_DOCK_DRAG
The setting: what a plain drag of a floating palette does (profile, modifier-docks, modifier-floats, dwell; DockDrag).
SETTING_IMAGE_DOUBLE_CLICK
The setting: a double click on the image (profile, fit, leave, nothing).
SETTING_PROFILE
The setting: the pointer profile, by id.
SETTING_SLIDER_WHEEL
The setting: the wheel over sliders (profile, guarded, value).
SETTING_WHEEL_DEVICE
The setting: what sends wheel events (auto, mouse, trackpad).
SETTING_WHEEL_SPEED
The setting: what a mouse wheel’s lines are multiplied by.
SYSTEM_WHEEL_LINES
The lines a notch moves on a system nobody changed, which is 1 on the speed.

Functions§

options
The options in force: the settings’, or the profile’s where they say profile.
overrides
The gesture commands whose bindings the user changed.
profile
The profile in force: the setting’s, else the default.
profile_id
The profile the setting asks for (its id; it may name no shipped profile; an alias is given as the profile it names).
set_dock_drag
Asks for a palette drag mode (the input.dock_drag setting: profile or one of DockDrag::CHOICES), said once as pop.settings.changed and in force from the next pass.
set_profile
Asks for a profile (the setting), applied before the next frame. An alias (adobe) asks for the profile it names (lightroom).
wheel_speed
The wheel speed in force: the setting’s, else 1.
wheel_speed_of_lines
The speed the system’s lines a notch seed: SYSTEM_WHEEL_LINES are 1, and what the setting cannot hold is its nearest end.