Struct dotrix_egui::epaint::Galley [−]
pub struct Galley {
pub text_style: TextStyle,
pub text: String,
pub rows: Vec<Row, Global>,
pub size: Vec2,
}
Expand description
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, Global>
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
impl Galley
pub fn sanity_check(&self)
impl Galley
impl Galley
pub fn pos_from_pcursor(&self, pcursor: PCursor) -> Rect
pub fn pos_from_pcursor(&self, pcursor: PCursor) -> Rect
Returns a 0-width Rect.
pub fn pos_from_cursor(&self, cursor: &Cursor) -> Rect
pub fn pos_from_cursor(&self, cursor: &Cursor) -> Rect
Returns a 0-width Rect.
pub fn cursor_from_pos(&self, pos: Vec2) -> Cursor
pub fn cursor_from_pos(&self, pos: Vec2) -> Cursor
Cursor at the given position within the galley
impl Galley
impl Galley
pub fn end_rcursor(&self) -> RCursor
impl Galley
impl Galley
pub fn from_ccursor(&self, ccursor: CCursor) -> Cursor
pub fn from_rcursor(&self, rcursor: RCursor) -> Cursor
pub fn from_pcursor(&self, pcursor: PCursor) -> Cursor
impl Galley
impl Galley
pub fn cursor_left_one_character(&self, cursor: &Cursor) -> Cursor
pub fn cursor_right_one_character(&self, cursor: &Cursor) -> Cursor
pub fn cursor_up_one_row(&self, cursor: &Cursor) -> Cursor
pub fn cursor_down_one_row(&self, cursor: &Cursor) -> Cursor
pub fn cursor_begin_of_row(&self, cursor: &Cursor) -> Cursor
pub fn cursor_end_of_row(&self, cursor: &Cursor) -> Cursor
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Galley
impl UnwindSafe for Galley
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more