pub struct PopupCoreState {
pub area: Rect,
pub area_z: u16,
pub active: Rc<Cell<bool>>,
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.
active: Rc<Cell<bool>>Active flag for the popup.
read+write
mouse: MouseFlagsMouse flags. read+write
non_exhaustive: NonExhaustivenon-exhaustive struct.
Implementations§
Source§impl PopupCoreState
impl PopupCoreState
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§impl Debug for PopupCoreState
impl Debug for PopupCoreState
Source§impl Default for PopupCoreState
impl Default for 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
Source§fn relocate(&mut self, _shift: (i16, i16), _clip: Rect)
fn relocate(&mut self, _shift: (i16, i16), _clip: Rect)
Relocate the areas in this widgets state. Read more
Source§fn relocate_popup(&mut self, shift: (i16, i16), clip: Rect)
fn relocate_popup(&mut self, shift: (i16, i16), clip: Rect)
Relocate only popup areas.
As rendering the popups is a separate render,
this has to be separate too.
Relocate all popup areas to a clip-rect (0,0+0x0).
Relocate all areas to a clip-rect (0,0+0x0).
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
Mutably borrows from an owned value. Read more
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>
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