pub struct PopupCoreState {
pub area: Rect,
pub area_z: u16,
pub widget_area: Rect,
pub h_scroll: ScrollState,
pub v_scroll: ScrollState,
pub active: FocusFlag,
pub mouse: MouseFlags,
pub non_exhaustive: NonExhaustive,
}Expand description
State for the PopupCore.
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: FocusFlagActive flag for the popup.
Note
This will change to a bool in the future. Use is_active and set_active to future-proof.
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
👎Deprecated since 1.0.2: name is ignored
pub fn named(_name: &str) -> PopupCoreState
New with a focus name.
Sourcepub fn set_area_z(&mut self, z: u16)
👎Deprecated since 1.2.0: job for the main widget
pub fn set_area_z(&mut self, z: u16)
Set the z-index of the popup.
Sourcepub fn area_z(&self) -> u16
👎Deprecated since 1.2.0: job for the main widget
pub fn area_z(&self) -> u16
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) -> bool
pub fn set_active(&mut self, active: bool) -> bool
Show the popup. This will set gained/lost flags according to the change. If the popup is hidden this will clear all flags.
Sourcepub fn clear_areas(&mut self)
pub fn clear_areas(&mut self)
Clear all stored 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
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