Struct libnotcurses_sys::widgets::NcSelectorBuilder
source · [−]pub struct NcSelectorBuilder { /* private fields */ }Expand description
A handy builder for NcSelector.
Implementations
sourceimpl 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
sourceimpl Debug for NcSelectorBuilder
impl Debug for NcSelectorBuilder
sourceimpl Default for NcSelectorBuilder
impl Default for NcSelectorBuilder
sourcefn default() -> NcSelectorBuilder
fn default() -> NcSelectorBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for NcSelectorBuilder
impl Send for NcSelectorBuilder
impl Sync for NcSelectorBuilder
impl Unpin for NcSelectorBuilder
impl UnwindSafe for NcSelectorBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more