pub struct MenuItemIdentifierDynamic<U>where
U: MenuItemIdentifierDynamicUpdate,{ /* private fields */ }Trait Implementations§
Source§impl<U> Component for MenuItemIdentifierDynamic<U>where
U: MenuItemIdentifierDynamicUpdate,
impl<U> Component for MenuItemIdentifierDynamic<U>where
U: MenuItemIdentifierDynamicUpdate,
Source§type Output = ()
type Output = ()
The type yielded by the component in response to an event. Typical components only yield
meaningful results when certain conditions have been met (e.g. an item is chosen from a
menu), thus it’s common for this type to be
Option<_>.Source§type State = ()
type State = ()
The type of the external state of this component. This allows multiple different components
to share the same piece of state. For components whose entire state is contained within the
component itself, set this to
().Source§fn render(
&self,
state: &<MenuItemIdentifierDynamic<U> as Component>::State,
ctx: Ctx<'_>,
fb: &mut FrameBuffer,
)
fn render( &self, state: &<MenuItemIdentifierDynamic<U> as Component>::State, ctx: Ctx<'_>, fb: &mut FrameBuffer, )
Render the component to a frame buffer
Source§fn update(
&mut self,
_state: &mut <MenuItemIdentifierDynamic<U> as Component>::State,
_ctx: Ctx<'_>,
event: Event,
) -> <MenuItemIdentifierDynamic<U> as Component>::Output
fn update( &mut self, _state: &mut <MenuItemIdentifierDynamic<U> as Component>::State, _ctx: Ctx<'_>, event: Event, ) -> <MenuItemIdentifierDynamic<U> as Component>::Output
Update the internal and extnal state of this component in response to an event, and yield a
value.
Source§fn size(
&self,
state: &<MenuItemIdentifierDynamic<U> as Component>::State,
ctx: Ctx<'_>,
) -> UCoord
fn size( &self, state: &<MenuItemIdentifierDynamic<U> as Component>::State, ctx: Ctx<'_>, ) -> UCoord
Return the current size (in cells) of this component. This allows decorators to account for
the size of the components they decorate (e.g. when drawing a border around a component, its
size must be known).
Source§impl<U> MenuItemIdentifier for MenuItemIdentifierDynamic<U>where
U: MenuItemIdentifierDynamicUpdate,
impl<U> MenuItemIdentifier for MenuItemIdentifierDynamic<U>where
U: MenuItemIdentifierDynamicUpdate,
fn init_selection(&mut self, selection: bool)
fn set_selection(&mut self, selection: bool)
Auto Trait Implementations§
impl<U> Freeze for MenuItemIdentifierDynamic<U>where
U: Freeze,
impl<U> RefUnwindSafe for MenuItemIdentifierDynamic<U>where
U: RefUnwindSafe,
impl<U> Send for MenuItemIdentifierDynamic<U>where
U: Send,
impl<U> Sync for MenuItemIdentifierDynamic<U>where
U: Sync,
impl<U> Unpin for MenuItemIdentifierDynamic<U>where
U: Unpin,
impl<U> UnwindSafe for MenuItemIdentifierDynamic<U>where
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more