NcMenuOptions

Type Alias NcMenuOptions 

Source
pub type NcMenuOptions = ncmenu_options;
Expand description

Options struct for NcMenu.

Aliased Type§

#[repr(C)]
pub struct NcMenuOptions { pub sections: *mut ncmenu_section, pub sectioncount: i32, pub headerchannels: u64, pub sectionchannels: u64, pub flags: u64, }

Fields§

§sections: *mut ncmenu_section

array of ‘sectioncount’ menu_sections

§sectioncount: i32

must be positive

§headerchannels: u64

styling for header

§sectionchannels: u64

styling for sections

§flags: u64

flag word of NCMENU_OPTION_*

Implementations§

Source§

impl NcMenuOptions

§NcMenuOptions constructors

Source

pub fn new(sections: &mut [NcMenuSection]) -> Self

New NcMenuOptions for NcMenu.

sections must contain at least 1 NcMenuSection.

Source

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.

Source§

impl NcMenuOptions

§NcMenuOptions methods

Source

pub fn header_channels(&self) -> NcChannels

Returns the styling for the header.

(No equivalent C style function)

Source

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)

Source

pub fn section_channels(&self) -> NcChannels

Returns the styling for the sections.

(No equivalent C style function)

Source

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)

Source§

impl NcMenuOptions

Source

pub const BOTTOM: u64 = 1u64

NcMenuOptions flag: Bottom row (as opposed to top row).

Source

pub const HIDING: u64 = 2u64

NcMenuOptions flag: Hides the menu when not unrolled.