pub struct MenuRegistry<G>{ /* private fields */ }Implementations§
Source§impl<G> MenuRegistry<G>
impl<G> MenuRegistry<G>
pub fn new() -> Self
pub fn register_normal(&mut self, kind: MenuItemKind)
pub fn register_checkbox(&mut self, kind: MenuItemKind, group: G) -> bool
pub fn register_radio( &mut self, kind: MenuItemKind, group: G, default: Option<MenuId>, ) -> bool
pub fn deregister_normal(&mut self, id: &MenuId) -> bool
pub fn deregister_checkbox(&mut self, id: &MenuId, group: G) -> bool
pub fn deregister_radio(&mut self, id: &MenuId, group: G) -> bool
pub fn handle_event(&mut self, id: &MenuId) -> Result<&MenuItemMeta<G>, String>
pub fn get_checkbox_id_from_group( &self, group: G, ) -> Option<&HashSet<Rc<MenuId>>>
pub fn get_radio_id_from_group(&self, group: &G) -> Option<&HashSet<Rc<MenuId>>>
Trait Implementations§
Source§impl<G> Clone for MenuRegistry<G>
impl<G> Clone for MenuRegistry<G>
Source§fn clone(&self) -> MenuRegistry<G>
fn clone(&self) -> MenuRegistry<G>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<G> Freeze for MenuRegistry<G>
impl<G> !RefUnwindSafe for MenuRegistry<G>
impl<G> !Send for MenuRegistry<G>
impl<G> !Sync for MenuRegistry<G>
impl<G> Unpin for MenuRegistry<G>where
G: Unpin,
impl<G> UnsafeUnpin for MenuRegistry<G>
impl<G> !UnwindSafe for MenuRegistry<G>
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