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

impl Debug for Offset
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

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 !=.