[][src]Struct egui::Memory

pub struct Memory {
    pub all_collpasing_are_open: bool,
    pub all_menus_are_open: bool,
    pub all_windows_are_open: bool,
    // some fields omitted
}

The data that Egui persists between frames.

This includes window positions and sizes, how far the user has scrolled in a ScrollArea etc.

If you want this to persist when closing your app you should serialize Memory and store it.

Fields

all_collpasing_are_open: bool

Useful for debugging, benchmarking etc.

all_menus_are_open: bool

Useful for debugging, benchmarking etc.

all_windows_are_open: bool

Useful for debugging, benchmarking etc.

Implementations

impl Memory[src]

pub fn layer_id_at(
    &self,
    pos: Pos2,
    resize_interact_radius_side: f32
) -> Option<LayerId>
[src]

pub fn lost_kb_focus(&self, id: Id) -> bool[src]

True if the given widget had keyboard focus last frame, but not this one.

pub fn has_kb_focus(&self, id: Id) -> bool[src]

pub fn request_kb_focus(&mut self, id: Id)[src]

pub fn surrender_kb_focus(&mut self, id: Id)[src]

pub fn interested_in_kb_focus(&mut self, id: Id)[src]

Register this widget as being interested in getting keyboard focus. This will allow the user to select it with tab and shift-tab.

pub fn stop_text_input(&mut self)[src]

Stop editing of active TextEdit (if any).

pub fn is_anything_being_dragged(&self) -> bool[src]

pub fn is_being_dragged(&self, id: Id) -> bool[src]

pub fn reset_areas(&mut self)[src]

Forget window positions, sizes etc. Can be used to auto-layout windows.

impl Memory[src]

Popups

Popups are things like combo-boxes, color pickers, menus etc. Only one can be be open at a time.

pub fn is_popup_open(&mut self, popup_id: Id) -> bool[src]

pub fn open_popup(&mut self, popup_id: Id)[src]

pub fn close_popup(&mut self)[src]

pub fn toggle_popup(&mut self, popup_id: Id)[src]

Trait Implementations

impl Clone for Memory[src]

impl Debug for Memory[src]

impl Default for Memory[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.