Enum cursive::view::Offset
[−]
[src]
pub enum Offset { Center, Absolute(usize), Parent(isize), }
Single-dimensional offset policy.
Variants
Center
In the center of the screen
Absolute(usize)
Place top-left corner at the given absolute coordinates
Parent(isize)
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 PartialEq for Offset
[src]
fn eq(&self, __arg_0: &Offset) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Offset) -> bool
This method tests for !=
.
impl Debug for Offset
[src]
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