Skip to main content

SelectionIndicatorController

Trait SelectionIndicatorController 

Source
pub trait SelectionIndicatorController: Copy {
    type State: Default + Copy;

    // Required methods
    fn update_target(&self, state: &mut Self::State, y: i32);
    fn jump_to_target(&self, state: &mut Self::State);
    fn offset(&self, state: &Self::State) -> i32;
    fn update(&self, state: &mut Self::State) -> bool;
}

Required Associated Types§

Required Methods§

Source

fn update_target(&self, state: &mut Self::State, y: i32)

Source

fn jump_to_target(&self, state: &mut Self::State)

Source

fn offset(&self, state: &Self::State) -> i32

Source

fn update(&self, state: &mut Self::State) -> bool

Advances the animation by a single frame.

Returns whether the indicator’s position changed, i.e. whether the menu needs to be redrawn.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§