Struct imgui::SuspendedContext [−][src]
pub struct SuspendedContext(_);
Expand description
A suspended imgui-rs context.
A suspended context retains its state, but is not usable without activating it first.
Examples
Suspended contexts are not directly very useful, but you can activate them:
let suspended = imgui::SuspendedContext::create();
match suspended.activate() {
Ok(ctx) => {
// ctx is now the active context
},
Err(suspended) => {
// activation failed, so you get the suspended context back
}
}
Implementations
Creates a new suspended imgui-rs context with a shared font atlas.
Attempts to activate this suspended context.
If there is no active context, this suspended context is activated and Ok
is returned,
containing the activated context.
If there is already an active context, nothing happens and Err
is returned, containing
the original suspended context.