pub fn new(title: impl Into<LabelText<T>>) -> MenuItem<T> {
        let mut id = COUNTER.next() as u32;
        if id == 0 {
            id = COUNTER.next() as u32;
        }
        MenuItem {
            id: MenuItemId(std::num::NonZeroU32::new(id)),
            title: title.into(),
            callback: None,
            hotkey: None,
            selected: None,
            enabled: None,
            old_state: None,
        }
    }
/// Create a new menu item with a given name.
Create a new menu item with a given name.
Create a new menu item with a given name .
pub fn new(title: impl Into<LabelText<T>>) -> MenuItem<T> {
        let mut id = COUNTER.next() as u32;
        if id == 0 {
            id = COUNTER.next() as u32;
        }
        MenuItem {
            id: MenuItemId(std::num::NonZeroU32::new(id)),
            title: title.into(),
            callback: None,
            hotkey: None,
            selected: None,
            enabled: None,
            old_state: None,
        }
    }
pub fn new ( title : impl Into < LabelText < T > > ) -> MenuItem < T > { let mut id = COUNTER . next ( ) as u32 ; if id == 0 { id = COUNTER . next ( ) as u32 ; } MenuItem { id : MenuItemId ( std :: num :: NonZeroU32 :: new ( id ) ) , title : title . into ( ) , callback : None , hotkey : None , selected : None , enabled : None , old_state : None , } }
Create a new menu item with a given name.
Create a new menu item with a given name .
title
impl Into<LabelText<T>>
title
impl Into<LabelText<T>>