pub struct TextData {
pub font: Option<FontId>,
pub text: String,
pub max_width: i32,
pub justify: u32,
pub wrap: bool,
pub shadow: bool,
pub ellipsis_width: i32,
pub layout: TextLayout,
}Expand description
The text of a text element or a label, with its font and the result of its layout.
Fields§
§font: Option<FontId>The font, or None when it could not be loaded.
text: StringThe text.
max_width: i32The width at which the text wraps, in pixels (0: no limit).
justify: u32The justification of the lines (left, centre or right).
wrap: boolWhether long lines wrap.
shadow: boolWhether the text has a shadow.
ellipsis_width: i32The width below which the text ends with an ellipsis (0: never).
layout: TextLayoutThe laid-out lines and glyphs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextData
impl RefUnwindSafe for TextData
impl Send for TextData
impl Sync for TextData
impl Unpin for TextData
impl UnsafeUnpin for TextData
impl UnwindSafe for TextData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more