[][src]Struct ytesrev::margin::Margin

pub struct Margin<T: Drawable + KnownSize> {
    pub margin: (u32, u32, u32, u32),
    pub inner: T,
}

A wrapper around a Drawable with KnownSize, giving it a margin on all sides

Fields

margin: (u32, u32, u32, u32)

The margin: (top, right, bottom, left)

inner: T

The thing to be marginalized

Methods

impl<T: Drawable + KnownSize> Margin<T>[src]

pub fn new(margin: (u32, u32, u32, u32), inner: T) -> Margin<T>[src]

Create a new Margin

pub fn new_vert_hor(vertical: u32, horizontal: u32, inner: T) -> Margin<T>[src]

Create a new Margin with the same top and bottom, as well as the same left and right

Trait Implementations

impl<T: Drawable + KnownSize> Drawable for Margin<T>[src]

fn register(&mut self)[src]

Register all content. This is mostly just used by [LatexObj]s, that need to be registered before loaded. Read more

fn event(&mut self, e: Event)[src]

When any event occurs

impl<T: Drawable + KnownSize> KnownSize for Margin<T>[src]

Auto Trait Implementations

impl<T> Sync for Margin<T> where
    T: Sync

impl<T> Unpin for Margin<T> where
    T: Unpin

impl<T> Send for Margin<T>

impl<T> RefUnwindSafe for Margin<T> where
    T: RefUnwindSafe

impl<T> UnwindSafe for Margin<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Layerable for T where
    T: Drawable
[src]

impl<T> Stackable for T where
    T: Drawable + KnownSize
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,