pub trait Drawable: Send {
    fn content(&self) -> Vec<&dyn Drawable>;
    fn content_mut(&mut self) -> Vec<&mut dyn Drawable>;
    fn step(&mut self);
    fn state(&self) -> State;
    fn draw(
        &self,
        _canvas: &mut Canvas<Window>,
        _position: &Position,
        _settings: DrawSettings
    ); fn register(&mut self) { ... } fn load(&mut self) { ... } fn event(&mut self, e: Event) { ... } fn update(&mut self, dt: f64) { ... } }
Expand description

An object that can be drawn

Required Methods

What this object contains

What this object contains, mutably

When the user presses space, the state of the presentation is advanced. This method is what is called.

What state the object is in

Draw everything

Provided Methods

Register all content. This is mostly just used by LatexObjs, that need to be registered before loaded.

Load all content

When any event occurs

Tick the object

Implementors