Struct rat_widget::menubar::MenuBarState
source · pub struct MenuBarState {
pub bar: MenuLineState,
pub popup: PopupMenuState,
pub area: Rect,
pub z_areas: [ZRect; 2],
}Expand description
State & event-handling.
Fields§
§bar: MenuLineStateState for the menu.
popup: PopupMenuStateState for the last rendered popup menu.
area: RectTotal area for the menubar and any visible popup.
z_areas: [ZRect; 2]Areas for the menubar.
Implementations§
source§impl MenuBarState
impl MenuBarState
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 HasFocusFlag for MenuBarState
impl HasFocusFlag for MenuBarState
source§fn z_areas(&self) -> &[ZRect]
fn z_areas(&self) -> &[ZRect]
The widget might have several disjointed areas.
This is the case if it is showing a popup, but there
might be other causes. Read more
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