Struct epaint::Galley[][src]

pub struct Galley {
    pub text: String,
    pub rows: Vec<Row>,
    pub size: Vec2,
}

A collection of text locked into place.

Fields

text: String

The full text, including any an all \n.

rows: Vec<Row>

Rows of text, from top to bottom. The number of chars in all rows sum up to text.chars().count(). Note that each paragraph (pieces of text separated with \n) can be split up into multiple rows.

size: Vec2

Implementations

impl Galley[src]

pub fn sanity_check(&self)[src]

impl Galley[src]

pub fn pos_from_pcursor(&self, pcursor: PCursor) -> Rect[src]

Returns a 0-width Rect.

pub fn pos_from_cursor(&self, cursor: &Cursor) -> Rect[src]

Returns a 0-width Rect.

pub fn cursor_from_pos(&self, pos: Vec2) -> Cursor[src]

Cursor at the given position within the galley

impl Galley[src]

pub fn end(&self) -> Cursor[src]

Cursor to one-past last character.

pub fn end_rcursor(&self) -> RCursor[src]

impl Galley[src]

pub fn from_ccursor(&self, ccursor: CCursor) -> Cursor[src]

pub fn from_rcursor(&self, rcursor: RCursor) -> Cursor[src]

pub fn from_pcursor(&self, pcursor: PCursor) -> Cursor[src]

impl Galley[src]

pub fn cursor_left_one_character(&self, cursor: &Cursor) -> Cursor[src]

pub fn cursor_right_one_character(&self, cursor: &Cursor) -> Cursor[src]

pub fn cursor_up_one_row(&self, cursor: &Cursor) -> Cursor[src]

pub fn cursor_down_one_row(&self, cursor: &Cursor) -> Cursor[src]

pub fn cursor_begin_of_row(&self, cursor: &Cursor) -> Cursor[src]

pub fn cursor_end_of_row(&self, cursor: &Cursor) -> Cursor[src]

Trait Implementations

impl Clone for Galley[src]

impl Debug for Galley[src]

impl Default for Galley[src]

Auto Trait Implementations

impl RefUnwindSafe for Galley

impl Send for Galley

impl Sync for Galley

impl Unpin for Galley

impl UnwindSafe for Galley

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