Struct egui::Memory [−][src]
pub struct Memory {
pub options: Options,
pub data: TypeMap,
pub data_temp: TypeMap,
pub id_data: AnyMap<Id>,
pub id_data_temp: AnyMap<Id>,
// some fields omitted
}
Expand description
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.
If you want to store data for your widgets, you should look at data
/data_temp
and
id_data
/id_data_temp
fields, and read the documentation of any
module.
Fields
options: Options
data: TypeMap
This map stores current states for widgets that don’t require Id
.
This will be saved between different program runs if you use the persistence
feature.
data_temp: TypeMap
Same as data
, but this data will not be saved between runs.
id_data: AnyMap<Id>
This map stores current states for all widgets with custom Id
s.
This will be saved between different program runs if you use the persistence
feature.
id_data_temp: AnyMap<Id>
Same as id_data
, but this data will not be saved between runs.
Implementations
Give keyboard focus to a specific widget.
See also crate::Response::request_focus
.
Surrender keyboard focus for a specific widget.
See also crate::Response::surrender_focus
.
Stop editing of active TextEdit
(if any).
Forget window positions, sizes etc. Can be used to auto-layout windows.
Popups
Popups are things like combo-boxes, color pickers, menus etc. Only one can be be open at a time.
If true, all windows, menus, tooltips etc are to be visible at once.
This is useful for testing, benchmarking, pre-caching, etc.
Experimental feature!
If true, all windows, menus, tooltips etc are to be visible at once.
This is useful for testing, benchmarking, pre-caching, etc.
Experimental feature!
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Memory
impl !UnwindSafe for Memory
Blanket Implementations
Mutably borrows from an owned value. Read more