pub struct Menubar<'a> { /* private fields */ }Expand description
Menubar widget. This handles the configuration only, to get the widgets for rendering call Menubar::into_widgets and use both results for rendering.
Implementations§
source§impl<'a> Menubar<'a>
impl<'a> Menubar<'a>
pub fn new(structure: &'a dyn MenuStructure<'a>) -> Menubar<'a>
sourcepub fn title_style(self, style: Style) -> Menubar<'a>
pub fn title_style(self, style: Style) -> Menubar<'a>
Menu-title style.
sourcepub fn select_style(self, style: Style) -> Menubar<'a>
pub fn select_style(self, style: Style) -> Menubar<'a>
Selection
sourcepub fn focus_style(self, style: Style) -> Menubar<'a>
pub fn focus_style(self, style: Style) -> Menubar<'a>
Selection + Focus
sourcepub fn popup_width(self, width: u16) -> Menubar<'a>
pub fn popup_width(self, width: u16) -> Menubar<'a>
Fixed width for the menu. If not set it uses 1.5 times the length of the longest item.
sourcepub fn popup_placement(self, placement: SubmenuPlacement) -> Menubar<'a>
pub fn popup_placement(self, placement: SubmenuPlacement) -> Menubar<'a>
Placement relative to the render-area.
sourcepub fn popup_block(self, block: Block<'a>) -> Menubar<'a>
pub fn popup_block(self, block: Block<'a>) -> Menubar<'a>
Block for borders.
sourcepub fn into_widgets(self) -> (MenubarLine<'a>, MenubarPopup<'a>)
pub fn into_widgets(self) -> (MenubarLine<'a>, MenubarPopup<'a>)
Create the widgets for the Menubar. This returns a widget for the menu-line and for the menu-popup.
The menu-popup should be rendered, after all widgets that might be below the popup have been rendered.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Menubar<'a>
impl<'a> !RefUnwindSafe for Menubar<'a>
impl<'a> !Send for Menubar<'a>
impl<'a> !Sync for Menubar<'a>
impl<'a> Unpin for Menubar<'a>
impl<'a> !UnwindSafe for Menubar<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more