Trait Renderer
pub trait Renderer: Renderer {
type Paragraph: Paragraph + 'static;
type Editor: Editor + 'static;
const ICON_FONT: Font;
const CHECKMARK_ICON: char;
const ARROW_DOWN_ICON: char;
const SCROLL_UP_ICON: char;
const SCROLL_DOWN_ICON: char;
const SCROLL_LEFT_ICON: char;
const SCROLL_RIGHT_ICON: char;
const ICED_LOGO: char;
// Required methods
fn fill_paragraph(
&mut self,
text: &Self::Paragraph,
position: Point,
color: Color,
clip_bounds: Rectangle,
);
fn fill_editor(
&mut self,
editor: &Self::Editor,
position: Point,
color: Color,
clip_bounds: Rectangle,
);
fn fill_text(
&mut self,
text: Text,
position: Point,
color: Color,
clip_bounds: Rectangle,
);
// Provided methods
fn font(&self) -> Font { ... }
fn text_size(&self) -> Pixels { ... }
fn line_height(&self) -> LineHeight { ... }
}Available on crate feature
advanced only.Expand description
A renderer capable of measuring and drawing Text.
Required Associated Constants§
const CHECKMARK_ICON: char
const CHECKMARK_ICON: char
The char representing a ✔ icon in the ICON_FONT.
const ARROW_DOWN_ICON: char
const ARROW_DOWN_ICON: char
The char representing a ▼ icon in the built-in ICON_FONT.
const SCROLL_UP_ICON: char
const SCROLL_UP_ICON: char
The char representing a ^ icon in the built-in ICON_FONT.
const SCROLL_DOWN_ICON: char
const SCROLL_DOWN_ICON: char
The char representing a v icon in the built-in ICON_FONT.
const SCROLL_LEFT_ICON: char
const SCROLL_LEFT_ICON: char
The char representing a < icon in the built-in ICON_FONT.
const SCROLL_RIGHT_ICON: char
const SCROLL_RIGHT_ICON: char
The char representing a > icon in the built-in ICON_FONT.
const ICED_LOGO: char
const ICED_LOGO: char
The ‘char’ representing the iced logo in the built-in ‘ICON_FONT’.
Required Associated Types§
Required Methods§
fn fill_paragraph(
&mut self,
text: &Self::Paragraph,
position: Point,
color: Color,
clip_bounds: Rectangle,
)
fn fill_paragraph( &mut self, text: &Self::Paragraph, position: Point, color: Color, clip_bounds: Rectangle, )
fn fill_editor(
&mut self,
editor: &Self::Editor,
position: Point,
color: Color,
clip_bounds: Rectangle,
)
fn fill_editor( &mut self, editor: &Self::Editor, position: Point, color: Color, clip_bounds: Rectangle, )
Provided Methods§
fn line_height(&self) -> LineHeight
fn line_height(&self) -> LineHeight
Returns the default line height of Text.
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.