pub struct TextLayout { /* private fields */ }Implementations§
Source§impl TextLayout
impl TextLayout
pub fn text(text: impl Into<String>) -> Self
pub fn rich(fragments: Vec<RichTextSpan>) -> Self
pub fn is_ready(&self) -> bool
pub fn draw_node(&self) -> TextNode
pub fn measure(&self) -> TextMetrics
pub fn measured_width(&self) -> f32
pub fn measured_height(&self) -> f32
pub fn on_ready( &self, callback: impl Fn(TextLayoutReadyEventArgs) + 'static, ) -> &Self
pub fn set_text(&self, value: impl Into<String>) -> &Self
pub fn width(&self, value: f32, unit: Unit) -> &Self
pub fn height(&self, value: f32, unit: Unit) -> &Self
pub fn font_stack(&self, stack: FontStack, size: f32) -> &Self
pub fn font_family(&self, family: FontFamily) -> &Self
pub fn font_weight(&self, weight: FontWeight) -> &Self
pub fn font_style(&self, style: FontStyle) -> &Self
pub fn font_size(&self, size: f32) -> &Self
pub fn line_height(&self, line_height: f32) -> &Self
pub fn text_color(&self, color: u32) -> &Self
pub fn text_align(&self, align: TextAlign) -> &Self
pub fn text_vertical_align(&self, align: TextVerticalAlign) -> &Self
pub fn text_limits(&self, max_chars: i32, max_lines: i32) -> &Self
pub fn max_lines(&self, max_lines: i32) -> &Self
pub fn wrapping(&self, wrap: bool) -> &Self
pub fn wrap(&self, wrap: bool) -> &Self
pub fn text_overflow(&self, overflow: TextOverflow) -> &Self
pub fn overflow(&self, overflow: TextOverflow) -> &Self
pub fn text_overflow_fade(&self, horizontal: bool, vertical: bool) -> &Self
Trait Implementations§
Source§impl Clone for TextLayout
impl Clone for TextLayout
Source§fn clone(&self) -> TextLayout
fn clone(&self) -> TextLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TextLayout
impl !Send for TextLayout
impl !Sync for TextLayout
impl !UnwindSafe for TextLayout
impl Freeze for TextLayout
impl Unpin for TextLayout
impl UnsafeUnpin for TextLayout
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