Struct nvim_gtk::ui_model::UiModel[][src]

pub struct UiModel {
    pub columns: usize,
    pub rows: usize,
    cur_row: usize,
    cur_col: usize,
    model: Box<[Line]>,
}

Fields

columns: usizerows: usizecur_row: usizecur_col: usizemodel: Box<[Line]>

Implementations

impl UiModel[src]

pub fn new(rows: u64, columns: u64) -> UiModel[src]

pub fn empty() -> UiModel[src]

pub fn model(&self) -> &[Line][src]

pub fn model_mut(&mut self) -> &mut [Line][src]

pub fn cur_point(&self) -> ModelRect[src]

pub fn set_cursor(&mut self, row: usize, col: usize) -> ModelRectVec[src]

pub fn get_cursor(&self) -> (usize, usize)[src]

pub fn put_one(
    &mut self,
    row: usize,
    col: usize,
    ch: &str,
    double_width: bool,
    hl: Rc<Highlight>
)
[src]

pub fn put(
    &mut self,
    row: usize,
    col: usize,
    ch: &str,
    double_width: bool,
    repeat: usize,
    hl: Rc<Highlight>
)
[src]

pub fn swap_rows(&mut self, target: &mut UiModel, to_row: usize)[src]

Copy rows from 0 to to_row, col from 0 self.columns

Don’t do any validation!

fn swap_row(
    &mut self,
    target_row: i64,
    offset: i64,
    left_col: usize,
    right_col: usize
)
[src]

pub fn scroll(
    &mut self,
    top: i64,
    bot: i64,
    left: usize,
    right: usize,
    count: i64,
    default_hl: &Rc<Highlight>
) -> ModelRect
[src]

pub fn clear(&mut self, default_hl: &Rc<Highlight>)[src]

fn clear_region(
    &mut self,
    top: usize,
    bot: usize,
    left: usize,
    right: usize,
    default_hl: &Rc<Highlight>
)
[src]

pub fn clear_glyphs(&mut self)[src]

Trait Implementations

impl ModelClipIteratorFactory for UiModel[src]

Clip implemented as top - 1/bot + 1 this is because in some cases(like ‘g’ character) drawing character does not fit to calculated bounds and if one line must be repainted - also previous and next line must be repainted to

Auto Trait Implementations

impl !RefUnwindSafe for UiModel

impl !Send for UiModel

impl !Sync for UiModel

impl Unpin for UiModel

impl UnwindSafe for UiModel

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.