pub struct PointerMap {
pub profile: String,
pub options: Options,
pub input: InputModifiers,
pub value_keys: ValueKeys,
pub wheel_device: WheelDevice,
pub wheel_speed: f32,
pub bindings: Vec<PointerBinding>,
pub drag_cursors: BTreeMap<DragKind, DragCursor>,
pub view_keys: BTreeMap<String, Vec<Chord>>,
pub keys_dispatched: bool,
}Expand description
What every pointer gesture does, per canvas kind, with the options in force: what canvases read.
Fields§
§profile: StringThe profile in use.
options: Options§input: InputModifiers§value_keys: ValueKeysThe modifiers of a value’s arrow-key steps, when not its drag’s.
wheel_device: WheelDevice§wheel_speed: f32What a wheel’s lines are multiplied by (input.wheel_speed); 1: egui’s own
points a line.
bindings: Vec<PointerBinding>§drag_cursors: BTreeMap<DragKind, DragCursor>The profile’s drag cursors (Profile::drag_cursors); read them
with PointerMap::drag_cursor.
view_keys: BTreeMap<String, Vec<Chord>>The navigation commands’ keys in force (VIEW_COMMANDS), by
command: the profile’s, or the keymap’s with the user’s changes.
keys_dispatched: boolThe application’s keymap dispatches the navigation keys (and sends the commands to the canvas in use): a canvas does not read them itself. Off for a map made from a profile alone.
Implementations§
Source§impl PointerMap
impl PointerMap
Sourcepub fn from_profile(profile: &Profile) -> PointerMap
pub fn from_profile(profile: &Profile) -> PointerMap
A profile’s bindings alone (no user override), with its options.
Sourcepub fn from_keymap(keymap: &Keymap, profile: &Profile) -> PointerMap
pub fn from_keymap(keymap: &Keymap, profile: &Profile) -> PointerMap
The keymap’s pointer bindings, the profile’s options.
Sourcepub fn view_keys(&self, command: &str) -> &[Chord]
pub fn view_keys(&self, command: &str) -> &[Chord]
The keys of a navigation command (view.fit) in force.
Sourcepub fn drag_cursor(&self, kind: DragKind) -> DragCursor
pub fn drag_cursor(&self, kind: DragKind) -> DragCursor
The cursors a drag kind shows: the profile’s, each name it leaves
empty or does not know, and its policy when it gives none, the
kind’s own (DragKind::cursors).
Sourcepub fn drag_cursor_over(&self, kind: DragKind, below: DragCursor) -> DragCursor
pub fn drag_cursor_over(&self, kind: DragKind, below: DragCursor) -> DragCursor
The profile’s cursors of a drag kind over below (a kit’s):
what the profile gives wins, the rest is below’s
(DragCursor::over).
Sourcepub fn command(&self, scope: &str, chord: &Chord) -> Option<&CommandId>
pub fn command(&self, scope: &str, chord: &Chord) -> Option<&CommandId>
The command a pointer chord runs in a scope.
Sourcepub fn chords<'a>(
&'a self,
scope: &'a str,
command: &'a CommandId,
) -> impl Iterator<Item = &'a Chord> + 'a
pub fn chords<'a>( &'a self, scope: &'a str, command: &'a CommandId, ) -> impl Iterator<Item = &'a Chord> + 'a
The chords running a command in a scope.
Sourcepub fn scope<'a>(
&'a self,
scope: &'a str,
) -> impl Iterator<Item = &'a PointerBinding> + 'a
pub fn scope<'a>( &'a self, scope: &'a str, ) -> impl Iterator<Item = &'a PointerBinding> + 'a
A scope’s bindings.
Trait Implementations§
Source§impl Clone for PointerMap
impl Clone for PointerMap
Source§fn clone(&self) -> PointerMap
fn clone(&self) -> PointerMap
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more