DisplayBuilderExt

Trait DisplayBuilderExt 

Source
pub trait DisplayBuilderExt {
Show 20 methods // Required methods fn with_buffer<B: Into<Option<TextBuffer>>>(self, buffer: B) -> Self; fn with_text_font(self, font: Font) -> Self; fn with_text_color(self, color: Color) -> Self; fn with_text_size(self, sz: i32) -> Self; fn with_highlight_data<B: Into<Option<TextBuffer>>>( self, style_buffer: B, entries: Vec<StyleTableEntry>, ) -> Self; fn with_highlight_data_ext<B: Into<Option<TextBuffer>>>( self, style_buffer: B, entries: Vec<StyleTableEntryExt>, ) -> Self; fn with_cursor_style(self, style: Cursor) -> Self; fn with_cursor_color(self, color: Color) -> Self; fn with_scrollbar_size(self, size: i32) -> Self; fn with_scrollbar_align(self, align: Align) -> Self; fn with_linenumber_width(self, w: i32) -> Self; fn with_linenumber_font(self, font: Font) -> Self; fn with_linenumber_size(self, size: i32) -> Self; fn with_linenumber_fgcolor(self, color: Color) -> Self; fn with_linenumber_bgcolor(self, color: Color) -> Self; fn with_linenumber_align(self, align: Align) -> Self; fn with_wrap_mode(self, wrap: WrapMode, wrap_margin: i32) -> Self; fn with_grammar_underline_color(self, color: Color) -> Self; fn with_spelling_underline_color(self, color: Color) -> Self; fn with_secondary_selection_color(self, color: Color) -> Self;
}
Expand description

Adds builder pattern friendly versions of several setter functions

Required Methods§

Source

fn with_buffer<B: Into<Option<TextBuffer>>>(self, buffer: B) -> Self

Sets the associated TextBuffer

Source

fn with_text_font(self, font: Font) -> Self

Sets the text font

Source

fn with_text_color(self, color: Color) -> Self

Sets the text color

Source

fn with_text_size(self, sz: i32) -> Self

Sets the text size

Source

fn with_highlight_data<B: Into<Option<TextBuffer>>>( self, style_buffer: B, entries: Vec<StyleTableEntry>, ) -> Self

Sets the style of the text widget

Source

fn with_highlight_data_ext<B: Into<Option<TextBuffer>>>( self, style_buffer: B, entries: Vec<StyleTableEntryExt>, ) -> Self

Sets the style of the text widget

Source

fn with_cursor_style(self, style: Cursor) -> Self

Sets the cursor style

Source

fn with_cursor_color(self, color: Color) -> Self

Sets the cursor color

Source

fn with_scrollbar_size(self, size: i32) -> Self

Sets the scrollbar size in pixels

Source

fn with_scrollbar_align(self, align: Align) -> Self

Sets the scrollbar alignment

Source

fn with_linenumber_width(self, w: i32) -> Self

Sets the linenumber width

Source

fn with_linenumber_font(self, font: Font) -> Self

Sets the linenumber font

Source

fn with_linenumber_size(self, size: i32) -> Self

Sets the linenumber size

Source

fn with_linenumber_fgcolor(self, color: Color) -> Self

Sets the linenumber foreground color

Source

fn with_linenumber_bgcolor(self, color: Color) -> Self

Sets the linenumber background color

Source

fn with_linenumber_align(self, align: Align) -> Self

Sets the linenumber alignment

Source

fn with_wrap_mode(self, wrap: WrapMode, wrap_margin: i32) -> Self

Sets the wrap mode of the Display widget. If the wrap mode is AtColumn, wrap margin is the column. If the wrap mode is AtPixel, wrap margin is the pixel. For more info

Source

fn with_grammar_underline_color(self, color: Color) -> Self

Set the grammar underline color

Source

fn with_spelling_underline_color(self, color: Color) -> Self

Set the spelling underline color

Source

fn with_secondary_selection_color(self, color: Color) -> Self

Set the secondary selection color

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<D> DisplayBuilderExt for D
where D: DisplayExt,