pub trait UiBuilder {
// Required method
fn do_ui(&mut self, ui: &Ui<Self>);
// Provided method
fn pre_render(&mut self, _ctx: &mut CurrentContext<'_>) { ... }
}
Expand description
The main trait that the user must implement to create a UI.
Required Methods§
Provided Methods§
Sourcefn pre_render(&mut self, _ctx: &mut CurrentContext<'_>)
fn pre_render(&mut self, _ctx: &mut CurrentContext<'_>)
This function is run after do_ui
but before rendering.
It can be used to clear the framebuffer, or prerender something.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.