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<String>,
position: Point,
color: Color,
clip_bounds: Rectangle,
);
// Provided methods
fn font(&self) -> Font { ... }
fn text_size(&self) -> Pixels { ... }
fn line_height(&self) -> LineHeight { ... }
}Expand description
A renderer capable of measuring and drawing Text.
Required Associated Constants§
Sourceconst CHECKMARK_ICON: char
const CHECKMARK_ICON: char
The char representing a ✔ icon in the ICON_FONT.
Sourceconst ARROW_DOWN_ICON: char
const ARROW_DOWN_ICON: char
The char representing a ▼ icon in the built-in ICON_FONT.
Sourceconst SCROLL_UP_ICON: char
const SCROLL_UP_ICON: char
The char representing a ^ icon in the built-in ICON_FONT.
Sourceconst SCROLL_DOWN_ICON: char
const SCROLL_DOWN_ICON: char
The char representing a v icon in the built-in ICON_FONT.
Sourceconst SCROLL_LEFT_ICON: char
const SCROLL_LEFT_ICON: char
The char representing a < icon in the built-in ICON_FONT.
Sourceconst SCROLL_RIGHT_ICON: char
const SCROLL_RIGHT_ICON: char
The char representing a > icon in the built-in ICON_FONT.
Sourceconst ICED_LOGO: char
const ICED_LOGO: char
The ‘char’ representing the iced logo in the built-in ‘ICON_FONT’.
Required Associated Types§
Required Methods§
Sourcefn 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, )
Provided Methods§
Sourcefn 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.