pub struct AppBar { /* private fields */ }Implementations§
Source§impl AppBar
impl AppBar
Sourcepub fn get_mut<T>(&mut self, appbaritem_handle: Handle<T>) -> Option<&mut T>where
T: Into<AppBarItem>,
pub fn get_mut<T>(&mut self, appbaritem_handle: Handle<T>) -> Option<&mut T>where
T: Into<AppBarItem>,
Get a mutable reference to an item from the app bar by its handle. The item has to be converted to an AppBarItem.
§Arguments
appbaritem_handle- The handle of the item to get
§Returns
An option containing a mutable reference to the item if found, or None if the item doesn’t exist or the handle is invalid
Sourcepub fn show<T>(&mut self, handle: Handle<T>)where
T: Into<AppBarItem>,
pub fn show<T>(&mut self, handle: Handle<T>)where
T: Into<AppBarItem>,
Show an item in the app bar. The item has to be converted to an AppBarItem. This method should only be called in AppBarEvents::on_update(…) method (if overwritten). By default, all items are hidden and whenever the focus changes, the AppCUI framework hides all items and starts from the focus control and moves to its parent and calls this method to show the items.
Remark: If you don’t implement AppBarEvents::on_update(…) method, if does not matter that you have added items to your AppBar - they will be hidden (unless you call .show(…) method).
§Arguments
handle- The handle of the item to show
Auto Trait Implementations§
impl Freeze for AppBar
impl RefUnwindSafe for AppBar
impl Send for AppBar
impl Sync for AppBar
impl Unpin for AppBar
impl UnsafeUnpin for AppBar
impl UnwindSafe for AppBar
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.