#[repr(C)]pub struct KuiMenuItem {
pub label: KuiStr,
pub role: u32,
pub enabled: u32,
pub id: *const KuiValue,
pub accel: KuiStr,
pub checked: u32,
pub submenu: *const KuiMenuItem,
pub submenu_count: usize,
}Expand description
One row of a menu (kui_open_menu, kui_menu_bar,
kui_select), read while the call runs.
label may be empty for a standard role, which then reads the way
the platform words it. id is what the row posts when chosen; NULL
posts the row’s text. accel is drawn right-aligned and bound to
nothing — the shortcut is the host’s, and this only says which one.
Fields§
§label: KuiStr§role: u32A KUI_MENU_* role.
enabled: u32Zero disables the row: drawn dimmed, not focusable, not choosable. A row present-but-dead rather than absent, so a menu’s shape does not change under the pointer.
id: *const KuiValue§accel: KuiStr§checked: u32Non-zero draws a checkmark beside the row (and sets the platform’s own check state where the host renders the menu): a setting the row is, not a command it runs.
The rows this row opens, submenu_count of them in the same
struct (backlog F128); null / 0 is an ordinary row. ABI 26.
Trait Implementations§
Source§impl Clone for KuiMenuItem
impl Clone for KuiMenuItem
impl Copy for KuiMenuItem
Auto Trait Implementations§
impl !Send for KuiMenuItem
impl !Sync for KuiMenuItem
impl Freeze for KuiMenuItem
impl RefUnwindSafe for KuiMenuItem
impl Unpin for KuiMenuItem
impl UnsafeUnpin for KuiMenuItem
impl UnwindSafe for KuiMenuItem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.