i_slint_core::item_rendering

Trait RenderText

Source
pub trait RenderText {
    // Required methods
    fn target_size(self: Pin<&Self>) -> LogicalSize;
    fn text(self: Pin<&Self>) -> SharedString;
    fn font_request(self: Pin<&Self>, window: &WindowInner) -> FontRequest;
    fn color(self: Pin<&Self>) -> Brush;
    fn alignment(
        self: Pin<&Self>,
    ) -> (TextHorizontalAlignment, TextVerticalAlignment);
    fn wrap(self: Pin<&Self>) -> TextWrap;
    fn overflow(self: Pin<&Self>) -> TextOverflow;
    fn letter_spacing(self: Pin<&Self>) -> LogicalLength;
    fn stroke(self: Pin<&Self>) -> (Brush, LogicalLength, TextStrokeStyle);
}
Expand description

Trait for an item that represents an Text towards the renderer

Required Methods§

Source

fn target_size(self: Pin<&Self>) -> LogicalSize

Source

fn text(self: Pin<&Self>) -> SharedString

Source

fn font_request(self: Pin<&Self>, window: &WindowInner) -> FontRequest

Source

fn color(self: Pin<&Self>) -> Brush

Source

fn alignment( self: Pin<&Self>, ) -> (TextHorizontalAlignment, TextVerticalAlignment)

Source

fn wrap(self: Pin<&Self>) -> TextWrap

Source

fn overflow(self: Pin<&Self>) -> TextOverflow

Source

fn letter_spacing(self: Pin<&Self>) -> LogicalLength

Source

fn stroke(self: Pin<&Self>) -> (Brush, LogicalLength, TextStrokeStyle)

Implementors§