Struct epi::Frame

source · []
pub struct Frame(pub Arc<Mutex<FrameData>>);
Expand description

Represents the surroundings of your app.

It provides methods to inspect the surroundings (are we on the web?), allocate textures, and change settings (e.g. window size).

Frame is cheap to clone and is safe to pass to other threads.

Tuple Fields

0: Arc<Mutex<FrameData>>

Implementations

True if you are in a web environment.

Information about the integration.

Signal the app to stop/exit/quit the app (only works for native apps, not web apps). The framework will not quit immediately, but at the end of the this frame.

Set the desired inner size of the window (in egui points).

Set the desired title of the window.

Set whether to show window decorations (i.e. a frame around you app). If false it will be difficult to move and resize the app.

When called, the native window will follow the movement of the cursor while the primary mouse button is down.

Does not work on the web.

This signals the egui integration that a repaint is required.

Call this e.g. when a background process finishes in an async context and/or background thread.

for integrations only: call once per frame

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more