Enum cursive::view::Offset
[−]
[src]
pub enum Offset { Center, Absolute(usize), Parent(usize), }
Single-dimensional offset policy.
Variants
Center
In the center of the screen
Absolute(usize)
Place top-left corner at the given absolute coordinates
Parent(usize)
Offset from the previous layer's top-left corner.
If this is the first layer, behaves like Absolute
.
Methods
impl Offset
[src]
fn compute_offset(&self, size: usize, available: usize, parent: usize) -> usize
Computes a single-dimension offset requred to draw a view.
Trait Implementations
impl Clone for Offset
[src]
fn clone(&self) -> Offset
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more