[][src]Trait egui::app::App

pub trait App {
    pub fn ui(
        &mut self,
        ctx: &Arc<Context>,
        integration_context: &mut IntegrationContext<'_>
    ); pub fn setup(&mut self, _ctx: &Arc<Context>) { ... }
pub fn on_exit(&mut self, _storage: &mut dyn Storage) { ... } }

Implement this trait to write apps that can be compiled both natively using the egui_glium crate, and deployed as a web site using the egui_web crate.

Required methods

pub fn ui(
    &mut self,
    ctx: &Arc<Context>,
    integration_context: &mut IntegrationContext<'_>
)
[src]

Called each time the UI needs repainting, which may be many times per second. Put your widgets into a SidePanel, TopPanel, CentralPanel, Window or Area.

Loading content...

Provided methods

pub fn setup(&mut self, _ctx: &Arc<Context>)[src]

Called once before the first frame. Allows you to do setup code and to call ctx.set_fonts(). Optional.

pub fn on_exit(&mut self, _storage: &mut dyn Storage)[src]

Called once on shutdown. Allows you to save state.

Loading content...

Implementors

impl App for DemoApp[src]

Loading content...