[−][src]Trait ytesrev::drawable::Drawable
An object that can be drawn
Required methods
fn content(&self) -> Vec<&dyn Drawable>
What this object contains
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
What this object contains, mutably
fn step(&mut self)
When the user presses space, the state of the presentation is advanced. This method is what is called.
fn state(&self) -> State
What state the object is in
fn draw(
&self,
_canvas: &mut Canvas<Window>,
_position: &Position,
_settings: DrawSettings
)
&self,
_canvas: &mut Canvas<Window>,
_position: &Position,
_settings: DrawSettings
)
Draw everything
Provided methods
fn register(&mut self)
Register all content. This is mostly just used by LatexObj
s, that need to be
registered before loaded.
fn load(&mut self)
Load all content
fn event(&mut self, e: Event)
When any event occurs
fn update(&mut self, dt: f64)
Tick the object
Implementors
impl Drawable for Empty
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
fn draw(
&self,
_canvas: &mut Canvas<Window>,
_position: &Position,
_settings: DrawSettings
)
[src]
&self,
_canvas: &mut Canvas<Window>,
_position: &Position,
_settings: DrawSettings
)
impl Drawable for PngImage
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
_settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
_settings: DrawSettings
)
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
impl Drawable for LatexObj
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
position: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
position: &Position,
settings: DrawSettings
)
fn register(&mut self)
[src]
fn load(&mut self)
[src]
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
impl Drawable for Layered
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
impl Drawable for Solid
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
position: &Position,
_settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
position: &Position,
_settings: DrawSettings
)
impl<'a> Drawable for Stack
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
impl<T: Drawable + KnownSize> Drawable for Anchor<T>
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn load(&mut self)
[src]
fn update(&mut self, dt: f64)
[src]
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
impl<T: Drawable + KnownSize> Drawable for Margin<T>
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn load(&mut self)
[src]
fn update(&mut self, dt: f64)
[src]
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
impl<T: Drawable> Drawable for WithSize<T>
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn load(&mut self)
[src]
fn update(&mut self, dt: f64)
[src]
fn step(&mut self)
[src]
fn state(&self) -> State
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
impl<T: Drawable, U: Drawable> Drawable for Split<T, U>
[src]
fn content(&self) -> Vec<&dyn Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
[src]
fn draw(
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
&self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)