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 focus_style(self, style: Style) -> Menubar<'a>
pub fn focus_style(self, style: Style) -> Menubar<'a>
Selection + Focus
Sourcepub fn right_style(self, style: Style) -> Menubar<'a>
pub fn right_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_alignment(self, alignment: HorizontalAlignment) -> Menubar<'a>
pub fn popup_alignment(self, alignment: HorizontalAlignment) -> Menubar<'a>
Placement relative to the render-area.
Sourcepub fn popup_offset(self, offset: (i16, i16)) -> Menubar<'a>
pub fn popup_offset(self, offset: (i16, i16)) -> Menubar<'a>
Placement relative to the render-area.
Sourcepub fn popup_placement(self, placement: Placement) -> Menubar<'a>
pub fn popup_placement(self, placement: Placement) -> Menubar<'a>
Placement relative to the render-area.
Sourcepub fn popup_style(self, style: Style) -> Menubar<'a>
pub fn popup_style(self, style: Style) -> Menubar<'a>
Base style for the popup-menu.
Sourcepub fn popup_block(self, block: Block<'a>) -> Menubar<'a>
pub fn popup_block(self, block: Block<'a>) -> Menubar<'a>
Block for the popup-menu.
Sourcepub fn popup_focus_style(self, style: Style) -> Menubar<'a>
pub fn popup_focus_style(self, style: Style) -> Menubar<'a>
Selection + Focus for the popup-menu.
Sourcepub fn popup_right_style(self, style: Style) -> Menubar<'a>
pub fn popup_right_style(self, style: Style) -> Menubar<'a>
Hotkey for the popup-menu.
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§
Source§impl<'a> StatefulWidget for Menubar<'a>
impl<'a> StatefulWidget for Menubar<'a>
Source§type State = MenubarState
type State = MenubarState
State associated with the stateful widget. Read more
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§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