egui/egui_demo_lib/src/apps/demo/mod.rs

41 lines
955 B
Rust
Raw Normal View History

//! Demo-code for showing how egui is used.
2021-01-01 16:11:05 +00:00
//!
//! The demo-code is also used in benchmarks and tests.
// ----------------------------------------------------------------------------
mod app;
pub mod dancing_strings;
2021-01-01 16:11:05 +00:00
pub mod demo_window;
mod demo_windows;
pub mod drag_and_drop;
pub mod font_book;
2021-01-01 16:11:05 +00:00
pub mod font_contents_emoji;
pub mod font_contents_ubuntu;
2021-01-25 19:52:47 +00:00
pub mod layout_test;
pub mod painting;
pub mod scrolling;
2021-01-25 19:14:39 +00:00
pub mod sliders;
pub mod tests;
2021-01-01 16:11:05 +00:00
pub mod toggle_switch;
pub mod widget_gallery;
2021-01-01 16:11:05 +00:00
mod widgets;
pub mod window_options;
2021-01-01 16:11:05 +00:00
pub use {app::*, demo_window::DemoWindow, demo_windows::*, widgets::Widgets};
2021-01-01 16:11:05 +00:00
// ----------------------------------------------------------------------------
/// Something to view in the demo windows
pub trait View {
fn ui(&mut self, ui: &mut egui::Ui);
}
/// Something to view
pub trait Demo {
fn name(&self) -> &str;
/// Show windows, etc
fn show(&mut self, ctx: &egui::CtxRef, open: &mut bool);
}