[][src]Struct makepad_widget::TextCursor

pub struct TextCursor {
    pub head: usize,
    pub tail: usize,
    pub max: usize,
}

Fields

head: usizetail: usizemax: usize

Methods

impl TextCursor[src]

pub fn has_selection(&self) -> bool[src]

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

pub fn clamp_range(&mut self, range: &Option<(usize, usize)>)[src]

pub fn delta(&self, delta: isize) -> (usize, usize)[src]

pub fn collapse(&mut self, start: usize, end: usize, new_len: usize) -> isize[src]

pub fn calc_max(
    &mut self,
    text_buffer: &TextBuffer,
    old: (TextPos, usize)
) -> (TextPos, usize)
[src]

pub fn move_home(&mut self, text_buffer: &TextBuffer)[src]

pub fn move_end(&mut self, text_buffer: &TextBuffer)[src]

pub fn move_left(&mut self, char_count: usize, _text_buffer: &TextBuffer)[src]

pub fn move_right(
    &mut self,
    char_count: usize,
    total_char_count: usize,
    _text_buffer: &TextBuffer
)
[src]

pub fn move_up(&mut self, line_count: usize, text_buffer: &TextBuffer)[src]

pub fn move_down(
    &mut self,
    line_count: usize,
    total_char_count: usize,
    text_buffer: &TextBuffer
)
[src]

Trait Implementations

impl Clone for TextCursor[src]

impl PartialEq<TextCursor> for TextCursor[src]

impl Debug for TextCursor[src]

impl StructuralPartialEq for TextCursor[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = !

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.

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

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

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