Struct libnotcurses_sys::c_api::ffi::ncmenu_options
source · [−]#[repr(C)]pub struct ncmenu_options {
pub sections: *mut ncmenu_section,
pub sectioncount: c_int,
pub headerchannels: u64,
pub sectionchannels: u64,
pub flags: u64,
}Fields
sections: *mut ncmenu_sectionarray of ‘sectioncount’ menu_sections
sectioncount: c_intmust be positive
headerchannels: u64styling for header
sectionchannels: u64styling for sections
flags: u64flag word of NCMENU_OPTION_*
Implementations
sourcepub fn new(sections: &mut [NcMenuSection]) -> Self
pub fn new(sections: &mut [NcMenuSection]) -> Self
New NcMenuOptions for NcMenu.
sections must contain at least 1 NcMenuSection.
sourcepub fn with_all_args<CHS1, CHS2>(
sections: &mut [NcMenuSection],
style_header: CHS1,
style_sections: CHS2,
flags: u64
) -> Self where
CHS1: Into<NcChannels>,
CHS2: Into<NcChannels>,
pub fn with_all_args<CHS1, CHS2>(
sections: &mut [NcMenuSection],
style_header: CHS1,
style_sections: CHS2,
flags: u64
) -> Self where
CHS1: Into<NcChannels>,
CHS2: Into<NcChannels>,
New NcMenuOptions for NcMenu, with all args.
sections must contain at least 1 NcMenuSection.
sourcepub fn header_channels(&self) -> NcChannels
pub fn header_channels(&self) -> NcChannels
Returns the styling for the header.
(No equivalent C style function)
sourcepub fn header_channels_mut(&mut self) -> &mut NcChannels_u64
pub fn header_channels_mut(&mut self) -> &mut NcChannels_u64
Returns a mutable reference of the styling for the sections.
(No equivalent C style function)
sourcepub fn section_channels(&self) -> NcChannels
pub fn section_channels(&self) -> NcChannels
Returns the styling for the sections.
(No equivalent C style function)
sourcepub fn section_channels_mut(&mut self) -> &mut NcChannels_u64
pub fn section_channels_mut(&mut self) -> &mut NcChannels_u64
Returns a mutable reference of the styling for the sections.
(No equivalent C style function)
sourcepub const BOTTOM: u64 = 1u64
pub const BOTTOM: u64 = 1u64
NcMenuOptions flag: Bottom row (as opposed to top row).
sourcepub const HIDING: u64 = 2u64
pub const HIDING: u64 = 2u64
NcMenuOptions flag: Hides the menu when not unrolled.
Trait Implementations
sourcefn eq(&self, other: &ncmenu_options) -> bool
fn eq(&self, other: &ncmenu_options) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ncmenu_options) -> bool
fn ne(&self, other: &ncmenu_options) -> bool
This method tests for !=.
sourcefn partial_cmp(&self, other: &ncmenu_options) -> Option<Ordering>
fn partial_cmp(&self, other: &ncmenu_options) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
Auto Trait Implementations
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more