pub trait MenuItemCollection<R> {
    // Required methods
    fn bounds_of(&self, nth: usize) -> Rectangle;
    fn title_of(&self, nth: usize) -> &str;
    fn details_of(&self, nth: usize) -> &str;
    fn interact_with(&mut self, nth: usize) -> R;
    fn count(&self) -> usize;
    fn draw_styled<C, S, IT, P, DIS>(
        &self,
        style: &MenuStyle<C, S, IT, P, R>,
        display: &mut DIS
    ) -> Result<(), DIS::Error>
       where C: PixelColor + From<Rgb888>,
             S: IndicatorStyle,
             IT: InputAdapterSource<R>,
             P: SelectionIndicatorController,
             DIS: DrawTarget<Color = C>;
}
Expand description

Menu-related extensions for object chain elements

Required Methods§

source

fn bounds_of(&self, nth: usize) -> Rectangle

source

fn title_of(&self, nth: usize) -> &str

source

fn details_of(&self, nth: usize) -> &str

source

fn interact_with(&mut self, nth: usize) -> R

source

fn count(&self) -> usize

source

fn draw_styled<C, S, IT, P, DIS>( &self, style: &MenuStyle<C, S, IT, P, R>, display: &mut DIS ) -> Result<(), DIS::Error>
where C: PixelColor + From<Rgb888>, S: IndicatorStyle, IT: InputAdapterSource<R>, P: SelectionIndicatorController, DIS: DrawTarget<Color = C>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<I, LE, R> MenuItemCollection<R> for Link<I, LE>

source§

fn bounds_of(&self, nth: usize) -> Rectangle

source§

fn interact_with(&mut self, nth: usize) -> R

source§

fn title_of(&self, nth: usize) -> &str

source§

fn details_of(&self, nth: usize) -> &str

source§

fn count(&self) -> usize

source§

fn draw_styled<PC, S, IT, P, DIS>( &self, style: &MenuStyle<PC, S, IT, P, R>, display: &mut DIS ) -> Result<(), DIS::Error>
where PC: PixelColor + From<Rgb888>, S: IndicatorStyle, IT: InputAdapterSource<R>, P: SelectionIndicatorController, DIS: DrawTarget<Color = PC>,

source§

impl<I, R> MenuItemCollection<R> for Chain<I>
where I: MenuItemCollection<R>,

source§

fn bounds_of(&self, nth: usize) -> Rectangle

source§

fn interact_with(&mut self, nth: usize) -> R

source§

fn title_of(&self, nth: usize) -> &str

source§

fn details_of(&self, nth: usize) -> &str

source§

fn count(&self) -> usize

source§

fn draw_styled<PC, S, IT, P, DIS>( &self, style: &MenuStyle<PC, S, IT, P, R>, display: &mut DIS ) -> Result<(), DIS::Error>
where PC: PixelColor + From<Rgb888>, S: IndicatorStyle, IT: InputAdapterSource<R>, P: SelectionIndicatorController, DIS: DrawTarget<Color = PC>,

Implementors§

source§

impl<C, I, R> MenuItemCollection<R> for MenuItems<C, I, R>
where C: AsRef<[I]> + AsMut<[I]>, I: MenuItem<R>,

source§

impl<I, R> MenuItemCollection<R> for I
where I: MenuItem<R> + Marker,