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