[−][src]Struct ytesrev::layout::split::Split
A split at a centain percent
Fields
amount: Box<dyn Fn(u32) -> u32>
How to split the window. The argument is the size of the window in the splitting direction (horizortal gives width, vertical gives height), and the return value is how many pixels the first element should take
orientation: Orientation
The orientation to split
order: UpdateOrder
The stepping order
first: T
The first content
second: U
The second content
Methods
impl<T: Drawable, U: Drawable> Split<T, U>
[src]
pub fn new(
amount: Box<dyn Fn(u32) -> u32>,
orientation: Orientation,
order: UpdateOrder,
first: T,
second: U
) -> Split<T, U>
[src]
amount: Box<dyn Fn(u32) -> u32>,
orientation: Orientation,
order: UpdateOrder,
first: T,
second: U
) -> Split<T, U>
Create a new Split
pub fn new_ratio(
ratio: f64,
orientation: Orientation,
order: UpdateOrder,
first: T,
second: U
) -> Split<T, U>
[src]
ratio: f64,
orientation: Orientation,
order: UpdateOrder,
first: T,
second: U
) -> Split<T, U>
Create a new Split
that splits by a ratio. The ratio must be between 0 and 1.
pub fn new_const(
pixels: u32,
orientation: Orientation,
order: UpdateOrder,
first: T,
second: U
) -> Split<T, U>
[src]
pixels: u32,
orientation: Orientation,
order: UpdateOrder,
first: T,
second: U
) -> Split<T, U>
Create a new Split
that split by a constant number of pixels.
Trait Implementations
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
)
fn step(&mut self)
[src]
fn state(&self) -> State
[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 load(&mut self)
[src]
Load all content
fn event(&mut self, e: Event)
[src]
When any event occurs
fn update(&mut self, dt: f64)
[src]
Tick the object
impl<T: Drawable, U: Drawable> Send for Split<T, U>
[src]
Auto Trait Implementations
impl<T, U> Unpin for Split<T, U> where
T: Unpin,
U: Unpin,
T: Unpin,
U: Unpin,
impl<T, U> !Sync for Split<T, U>
impl<T, U> !UnwindSafe for Split<T, U>
impl<T, U> !RefUnwindSafe for Split<T, U>
Blanket Implementations
impl<T> Layerable for T where
T: Drawable,
[src]
T: Drawable,
fn as_drawable(&Self) -> &dyn Drawable
[src]
fn as_drawable_mut(&mut Self) -> &mut dyn Drawable
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,