pub struct NcSelectorBuilder { /* private fields */ }Expand description
A handy builder for NcSelector.
Implementations§
Source§impl NcSelectorBuilder
impl NcSelectorBuilder
Sourcepub fn default_item(self, item: u32) -> Self
pub fn default_item(self, item: u32) -> Self
Selects the default item
It is selected at the start and must be between 0 and itemcount-1.
Sourcepub fn max_display(self, max: u32) -> Self
pub fn max_display(self, max: u32) -> Self
Selects the maximum number of items to display at once.
0 uses all available space.
Sets the footer string.
Sourcepub fn all_channels(
self,
item_opt: impl Into<NcChannels>,
item_desc: impl Into<NcChannels>,
seltitle: impl Into<NcChannels>,
selfooter: impl Into<NcChannels>,
selbox: impl Into<NcChannels>,
) -> Self
pub fn all_channels( self, item_opt: impl Into<NcChannels>, item_desc: impl Into<NcChannels>, seltitle: impl Into<NcChannels>, selfooter: impl Into<NcChannels>, selbox: impl Into<NcChannels>, ) -> Self
Sets all the NcChannels.
Sourcepub fn item_channels(
self,
opt: impl Into<NcChannels>,
desc: impl Into<NcChannels>,
) -> Self
pub fn item_channels( self, opt: impl Into<NcChannels>, desc: impl Into<NcChannels>, ) -> Self
Sets the NcChannels for the item.
Sourcepub fn title_channels(self, title: impl Into<NcChannels>) -> Self
pub fn title_channels(self, title: impl Into<NcChannels>) -> Self
Sets the NcChannels for the title.
Sourcepub fn secondary_channels(self, secondary: impl Into<NcChannels>) -> Self
pub fn secondary_channels(self, secondary: impl Into<NcChannels>) -> Self
Sets the NcChannels for the secondary title and the footer.
Sourcepub fn box_channels(self, box: impl Into<NcChannels>) -> Self
pub fn box_channels(self, box: impl Into<NcChannels>) -> Self
Sets the NcChannels for the box title.
Sourcepub fn finish(self, plane: &mut NcPlane) -> NcResult<&mut NcSelector>
pub fn finish(self, plane: &mut NcPlane) -> NcResult<&mut NcSelector>
Finishes the builder and returns the NcSelector.
Trait Implementations§
Source§impl Debug for NcSelectorBuilder
impl Debug for NcSelectorBuilder
Source§impl Default for NcSelectorBuilder
impl Default for NcSelectorBuilder
Source§fn default() -> NcSelectorBuilder
fn default() -> NcSelectorBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NcSelectorBuilder
impl RefUnwindSafe for NcSelectorBuilder
impl Send for NcSelectorBuilder
impl Sync for NcSelectorBuilder
impl Unpin for NcSelectorBuilder
impl UnwindSafe for NcSelectorBuilder
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