Struct rustty_oxide::core::frame::Frame
[−]
[src]
pub struct Frame { /* fields omitted */ }
The Frame
struct is the building block for all future
widgets inside of Oxide. Objects of Frame
abstract away
the actual creation and drawing of areas of a terminal,
because this process is the same for all widgets. Every
widget should contain one Frame
type to be used to render
text to the screen
Methods
impl Frame
[src]
fn new(cols: usize, rows: usize) -> Frame
[src]
Constructs a new Frame object with a width of cols
and height of rows
fn draw_into(&self, cells: &mut CellAccessor)
[src]
Draw the buffer contained inside of the base object to a valid object that implements CellAccessor.
fn resize(&mut self, new_size: Size)
[src]
Trait Implementations
impl HasSize for Frame
[src]
impl CellAccessor for Frame
[src]
fn cellvec(&self) -> &Vec<Cell>
[src]
fn cellvec_mut(&mut self) -> &mut Vec<Cell>
[src]
fn clear(&mut self, blank: Cell)
[src]
Clears self
, using the given Cell
as a blank.
fn pos_to_index(&self, x: usize, y: usize) -> Option<usize>
[src]
fn get(&self, x: usize, y: usize) -> Option<&Cell>
[src]
Returns a reference to the Cell
at the given coordinates, or None
if the index is out of bounds. Read more
fn get_mut(&mut self, x: usize, y: usize) -> Option<&mut Cell>
[src]
Returns a mutable reference to the Cell
at the given coordinates, or None
if the index is out of bounds. Read more
impl HasPosition for Frame
[src]
impl Alignable for Frame
[src]
fn halign(&mut self, parent: &HasSize, halign: HorizontalAlign, margin: usize)
[src]
fn valign(&mut self, parent: &HasSize, valign: VerticalAlign, margin: usize)
[src]
fn align(
&mut self,
parent: &HasSize,
halign: HorizontalAlign,
valign: VerticalAlign,
margin: (usize, usize)
)
[src]
&mut self,
parent: &HasSize,
halign: HorizontalAlign,
valign: VerticalAlign,
margin: (usize, usize)
)