Skip to content
Snippets Groups Projects
slide.rs 651 B
use eframe::egui::{Context, Ui};

// See slide directory. This file exists to make the individual slides accessible to the
// rest of the code.
pub mod s1_title;
pub mod s2_introduction;
pub mod s3_complexity;
pub mod s4_automata;
pub mod s5_emergence;
pub mod s6_fractals;
pub mod s7_computation;
pub mod s8_mosaic;
pub mod s9_conclusion;

/// An interface for all slides.
pub trait Slide {
    /// Returns whether "done" i.e. whether should switch to next slide.
    /// Repaint automatically requested.
    fn transition(&mut self, _ctx: &Context) -> bool {
        true
    }

    /// Renders slide into UI.
    fn show(&mut self, ui: &mut Ui);
}