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]
pub fn compute_offset(
&self,
size: usize,
available: usize,
parent: usize
) -> usize
[src]
&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
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Offset) -> bool
[src]
This method tests for !=
.
impl Debug for Offset
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more