pub struct MenuConfig {
pub close_behavior: PopupCloseBehavior,
pub style: StyleModifier,
/* private fields */
}
Expand description
Configuration and style for menus.
Fields§
§close_behavior: PopupCloseBehavior
If the user clicks, should we close the menu?
style: StyleModifier
Override the menu style.
Default is menu_style
.
Implementations§
Source§impl MenuConfig
impl MenuConfig
Sourcepub const MENU_CONFIG_TAG: &'static str = "egui_menu_config"
pub const MENU_CONFIG_TAG: &'static str = "egui_menu_config"
The tag used to store the menu config in the UiStack
.
pub fn new() -> Self
Sourcepub fn close_behavior(self, close_behavior: PopupCloseBehavior) -> Self
pub fn close_behavior(self, close_behavior: PopupCloseBehavior) -> Self
If the user clicks, should we close the menu?
Sourcepub fn style(self, style: impl Into<StyleModifier>) -> Self
pub fn style(self, style: impl Into<StyleModifier>) -> Self
Override the menu style.
Default is menu_style
.
Trait Implementations§
Source§impl Clone for MenuConfig
impl Clone for MenuConfig
Source§fn clone(&self) -> MenuConfig
fn clone(&self) -> MenuConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MenuConfig
impl Debug for MenuConfig
Auto Trait Implementations§
impl Freeze for MenuConfig
impl !RefUnwindSafe for MenuConfig
impl Send for MenuConfig
impl Sync for MenuConfig
impl Unpin for MenuConfig
impl !UnwindSafe for MenuConfig
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