pub struct PopupCoreState {
pub area: Rect,
pub area_z: u16,
pub widget_area: Rect,
pub h_scroll: ScrollState,
pub v_scroll: ScrollState,
pub active: ContainerFlag,
pub mouse: MouseFlags,
pub non_exhaustive: NonExhaustive,
}Fields§
§area: RectArea for the widget. This is the area given to render(), corrected by the given constraints. read only. renewed for each render.
area_z: u16Z-Index for the popup.
widget_area: RectArea where the widget can render it’s content. read only. renewed for each render.
h_scroll: ScrollStateHorizontal scroll state if active. read+write
v_scroll: ScrollStateVertical scroll state if active. read+write
active: ContainerFlagActive flag for the popup.
Uses a ContainerFlag that can be combined with the FocusFlags your widget uses for handling its focus to detect the transition ‘Did the popup loose focus and should it be closed now’.
If you don’t rely on Focus this way, this will just be a boolean flag that indicates active/visible.
See See the examples how to use for both cases. read+write
mouse: MouseFlagsMouse flags. read+write
non_exhaustive: NonExhaustivenon-exhaustive struct.
Implementations§
Source§impl PopupCoreState
impl PopupCoreState
Sourcepub fn new() -> PopupCoreState
pub fn new() -> PopupCoreState
New
Sourcepub fn named(name: &str) -> PopupCoreState
pub fn named(name: &str) -> PopupCoreState
New with a focus name.
Sourcepub fn set_area_z(&mut self, z: u16)
pub fn set_area_z(&mut self, z: u16)
Set the z-index of the popup.
Sourcepub fn flip_active(&mut self)
pub fn flip_active(&mut self)
Flip visibility of the popup.
Sourcepub fn set_active(&mut self, active: bool)
pub fn set_active(&mut self, active: bool)
Show the popup. This will set gained/lost flags according to the change. If the popup is hidden this will clear all the areas.
Sourcepub fn clear_areas(&mut self)
pub fn clear_areas(&mut self)
Clear the areas.
Trait Implementations§
Source§impl Clone for PopupCoreState
impl Clone for PopupCoreState
Source§fn clone(&self) -> PopupCoreState
fn clone(&self) -> PopupCoreState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PopupCoreState
impl Debug for PopupCoreState
Source§impl Default for PopupCoreState
impl Default for PopupCoreState
Source§fn default() -> PopupCoreState
fn default() -> PopupCoreState
Source§impl HandleEvent<Event, Popup, PopupOutcome> for PopupCoreState
impl HandleEvent<Event, Popup, PopupOutcome> for PopupCoreState
Source§impl RelocatableState for PopupCoreState
impl RelocatableState for PopupCoreState
Auto Trait Implementations§
impl !Freeze for PopupCoreState
impl !RefUnwindSafe for PopupCoreState
impl !Send for PopupCoreState
impl !Sync for PopupCoreState
impl Unpin for PopupCoreState
impl !UnwindSafe for PopupCoreState
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
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>
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>
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