Struct epaint::Galley [−][src]
pub struct Galley { pub text_style: TextStyle, pub text: String, pub rows: Vec<Row>, pub size: Vec2, }
A collection of text locked into place.
Fields
text_style: TextStyle
The crate::TextStyle
(font) used.
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]
impl Galley
[src]pub fn pos_from_pcursor(&self, pcursor: PCursor) -> Rect
[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]
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]
pub fn cursor_from_pos(&self, pos: Vec2) -> Cursor
[src]Cursor at the given position within the galley
impl Galley
[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]
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 StructuralPartialEq 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more