Struct egui::containers::AreaState
source · pub struct AreaState {
pub pivot_pos: Option<Pos2>,
pub pivot: Align2,
pub size: Option<Vec2>,
pub interactable: bool,
pub last_became_visible_at: Option<f64>,
}
Expand description
State of an Area
that is persisted between frames.
Areas back crate::Window
s and other floating containers,
like tooltips and the popups of crate::ComboBox
.
Fields§
§pivot_pos: Option<Pos2>
Last known position of the pivot.
pivot: Align2
The anchor point of the area, i.e. where on the area the Self::pivot_pos
refers to.
size: Option<Vec2>
Last known size.
Area size is intentionally NOT persisted between sessions,
so that a bad tooltip or menu size won’t be remembered forever.
A resizable crate::Window
remembers the size the user picked using
the state in the crate::Resize
container.
interactable: bool
If false, clicks goes straight through to what is behind us. Useful for tooltips etc.
last_became_visible_at: Option<f64>
At what time was this area first shown?
Used to fade in the area.
Implementations§
source§impl AreaState
impl AreaState
sourcepub fn left_top_pos(&self) -> Pos2
pub fn left_top_pos(&self) -> Pos2
The left top positions of the area.
sourcepub fn set_left_top_pos(&mut self, pos: Pos2)
pub fn set_left_top_pos(&mut self, pos: Pos2)
Move the left top positions of the area.
Trait Implementations§
impl Copy for AreaState
Auto Trait Implementations§
impl Freeze for AreaState
impl RefUnwindSafe for AreaState
impl Send for AreaState
impl Sync for AreaState
impl Unpin for AreaState
impl UnwindSafe for AreaState
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
)