pub trait Renderer: Renderer {
type Font: Copy + PartialEq;
type Paragraph: Paragraph<Font = Self::Font> + 'static;
type Editor: Editor<Font = Self::Font> + 'static;
const ICON_FONT: Self::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 default_font(&self) -> Self::Font;
fn default_size(&self) -> Pixels;
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, Self::Font>,
position: Point,
color: Color,
clip_bounds: Rectangle,
);
}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 default_font(&self) -> Self::Font
fn default_font(&self) -> Self::Font
Returns the default Self::Font.
Sourcefn default_size(&self) -> Pixels
fn default_size(&self) -> Pixels
Returns the default size of Text.
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, )
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.