pub struct PopupMenu<'a> { /* private fields */ }Expand description
Popup menu.
Implementations§
Source§impl<'a> PopupMenu<'a>
impl<'a> PopupMenu<'a>
Sourcepub fn item_parsed(self, text: &'a str) -> PopupMenu<'a>
pub fn item_parsed(self, text: &'a str) -> PopupMenu<'a>
Sourcepub fn item_string(self, txt: String) -> PopupMenu<'a>
pub fn item_string(self, txt: String) -> PopupMenu<'a>
Add an owned text as item.
Sourcepub fn separator(self, separator: Separator) -> PopupMenu<'a>
pub fn separator(self, separator: Separator) -> PopupMenu<'a>
Sets the separator for the last item added. If there is none adds this as an empty menu-item.
Fixed width for the menu. If not set it uses 1.5 times the length of the longest item.
Fixed width for the menu. If not set it uses 1.5 times the length of the longest item.
Sourcepub fn constraint(self, placement: PopupConstraint) -> PopupMenu<'a>
pub fn constraint(self, placement: PopupConstraint) -> PopupMenu<'a>
Set relative placement.
Sourcepub fn boundary(self, boundary: Rect) -> PopupMenu<'a>
pub fn boundary(self, boundary: Rect) -> PopupMenu<'a>
Set outer bounds for the popup-menu. If not set, the Buffer::area is used as outer bounds.
Sourcepub fn highlight_style(self, style: Style) -> PopupMenu<'a>
pub fn highlight_style(self, style: Style) -> PopupMenu<'a>
Highlight style.
Sourcepub fn highlight_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
pub fn highlight_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
Highlight style.
Sourcepub fn disabled_style(self, style: Style) -> PopupMenu<'a>
pub fn disabled_style(self, style: Style) -> PopupMenu<'a>
Disabled item style.
Sourcepub fn disabled_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
pub fn disabled_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
Disabled item style.
Sourcepub fn right_style(self, style: Style) -> PopupMenu<'a>
pub fn right_style(self, style: Style) -> PopupMenu<'a>
Style for the hotkey.
Sourcepub fn right_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
pub fn right_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
Style for the hotkey.
Sourcepub fn focus_style(self, style: Style) -> PopupMenu<'a>
pub fn focus_style(self, style: Style) -> PopupMenu<'a>
Focus/Selection style.
Sourcepub fn focus_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
pub fn focus_style_opt(self, style: Option<Style>) -> PopupMenu<'a>
Focus/Selection style.
Sourcepub fn get_block_size(&self) -> Size
pub fn get_block_size(&self) -> Size
Get the padding the block imposes as a Size.
Sourcepub fn get_block_padding(&self) -> Padding
pub fn get_block_padding(&self) -> Padding
Get the padding the block imposes as Padding.
pub fn width(&self) -> u16
pub fn height(&self) -> u16
Trait Implementations§
Source§impl<'a> StatefulWidget for &PopupMenu<'a>
impl<'a> StatefulWidget for &PopupMenu<'a>
Source§type State = PopupMenuState
type State = PopupMenuState
State associated with the stateful widget. Read more
Source§impl StatefulWidget for PopupMenu<'_>
impl StatefulWidget for PopupMenu<'_>
Source§type State = PopupMenuState
type State = PopupMenuState
State associated with the stateful widget. Read more
Auto Trait Implementations§
impl<'a> !Freeze for PopupMenu<'a>
impl<'a> !RefUnwindSafe for PopupMenu<'a>
impl<'a> Send for PopupMenu<'a>
impl<'a> !Sync for PopupMenu<'a>
impl<'a> Unpin for PopupMenu<'a>
impl<'a> UnwindSafe for PopupMenu<'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