Struct ytesrev::anchor::Anchor [−][src]
pub struct Anchor<T: Drawable + KnownSize> { pub inner: T, pub direction: AnchorDirection, }
An anchor instance
Fields
inner: T
The inner object to be anchored
direction: AnchorDirection
The direction to anchor to
Methods
impl<T: Drawable + KnownSize> Anchor<T>
[src]
impl<T: Drawable + KnownSize> Anchor<T>
pub fn new(direction: AnchorDirection, inner: T) -> Anchor<T>
[src]
pub fn new(direction: AnchorDirection, inner: T) -> Anchor<T>
Create a new Anchor instance
Trait Implementations
impl<T: Drawable + KnownSize> Drawable for Anchor<T>
[src]
impl<T: Drawable + KnownSize> Drawable for Anchor<T>
fn content(&self) -> Vec<&Drawable>
[src]
fn content(&self) -> Vec<&Drawable>
What this object contains
fn content_mut(&mut self) -> Vec<&mut Drawable>
[src]
fn content_mut(&mut self) -> Vec<&mut Drawable>
What this object contains, mutably
fn load(&mut self)
[src]
fn load(&mut self)
Load all content
fn update(&mut self, dt: f64)
[src]
fn update(&mut self, dt: f64)
Tick the object
fn step(&mut self)
[src]
fn step(&mut self)
When the user presses space, the state of the presentation is advanced. This method is what is called. Read more
fn state(&self) -> State
[src]
fn state(&self) -> State
What state the object is in
fn draw(
&mut self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
[src]
fn draw(
&mut self,
canvas: &mut Canvas<Window>,
pos: &Position,
settings: DrawSettings
)
Draw everything
fn register(&mut self)
[src]
fn register(&mut self)
Register all content. This is mostly just used by [LatexObj
]s, that need to be registered before loaded. Read more
impl<T: Drawable + KnownSize> KnownSize for Anchor<T>
[src]
impl<T: Drawable + KnownSize> KnownSize for Anchor<T>