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;
// 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,
);
}
Available on crate feature
advanced
only.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
.
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.