pub trait Renderer: Renderer {
type Font: Copy + PartialEq;
type Paragraph: Paragraph<Font = Self::Font> + 'static;
type Editor: Editor<Font = Self::Font> + 'static;
type Raw;
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_raw(&mut self, raw: Self::Raw);
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 Types§
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 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, )
Object Safety§
This trait is not object safe.