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.
sourcepub fn width(self, width: u16) -> PopupMenu<'a>
pub fn width(self, width: u16) -> PopupMenu<'a>
Fixed width for the menu. If not set it uses 1.5 times the length of the longest item.
sourcepub fn width_opt(self, width: Option<u16>) -> PopupMenu<'a>
pub fn width_opt(self, width: Option<u16>) -> PopupMenu<'a>
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.
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
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§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