pub struct MenubarState {
pub area: Rect,
pub z_areas: [ZRect; 2],
pub bar: MenuLineState,
pub popup: PopupMenuState,
}Expand description
State & event-handling.
Fields§
§area: RectTotal area for the menubar and any visible popup. readonly. renewed for each render.
z_areas: [ZRect; 2]Areas for the menubar. readonly. renewed for each render.
bar: MenuLineStateState for the menu.
popup: PopupMenuStateState for the last rendered popup menu.
Implementations§
source§impl MenubarState
impl MenubarState
sourcepub fn new() -> MenubarState
pub fn new() -> MenubarState
State.
For the specifics use the public fields menu and popup.
sourcepub fn named(name: &'static str) -> MenubarState
pub fn named(name: &'static str) -> MenubarState
New state with a focus name.
sourcepub fn popup_active(&self) -> bool
pub fn popup_active(&self) -> bool
Submenu visible/active.
sourcepub fn set_popup_active(&mut self, active: bool)
pub fn set_popup_active(&mut self, active: bool)
Submenu visible/active.
Trait Implementations§
source§impl Clone for MenubarState
impl Clone for MenubarState
source§fn clone(&self) -> MenubarState
fn clone(&self) -> MenubarState
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 MenubarState
impl Debug for MenubarState
source§impl Default for MenubarState
impl Default for MenubarState
source§fn default() -> MenubarState
fn default() -> MenubarState
Returns the “default value” for a type. Read more
source§impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenubarState
impl HandleEvent<Event, MouseOnly, MenuOutcome> for MenubarState
source§impl HandleEvent<Event, Popup, MenuOutcome> for MenubarState
impl HandleEvent<Event, Popup, MenuOutcome> for MenubarState
source§impl HandleEvent<Event, Regular, MenuOutcome> for MenubarState
impl HandleEvent<Event, Regular, MenuOutcome> for MenubarState
source§impl HasFocus for MenubarState
impl HasFocus for MenubarState
source§fn z_areas(&self) -> &[ZRect]
fn z_areas(&self) -> &[ZRect]
The widget might have several disjointed/overlapping areas.
This is the case if it is showing a popup, but there might be other causes. Read more
source§fn build(&self, builder: &mut FocusBuilder)
fn build(&self, builder: &mut FocusBuilder)
Build the focus-structure for the container.
Declares how the widget interacts with focus. Read more
source§fn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Focused?
source§fn lost_focus(&self) -> bool
fn lost_focus(&self) -> bool
Just lost focus.
source§fn gained_focus(&self) -> bool
fn gained_focus(&self) -> bool
Just gained focus.
Auto Trait Implementations§
impl !Freeze for MenubarState
impl !RefUnwindSafe for MenubarState
impl !Send for MenubarState
impl !Sync for MenubarState
impl Unpin for MenubarState
impl !UnwindSafe for MenubarState
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