[−][src]Struct iced_graphics::Renderer
A backend-agnostic renderer that supports all the built-in widgets.
Implementations
impl<B: Backend> Renderer<B>
[src]
pub fn new(backend: B) -> Self
[src]
pub fn backend(&self) -> &B
[src]
pub fn backend_mut(&mut self) -> &mut B
[src]
Trait Implementations
impl<B: Debug + Backend> Debug for Renderer<B>
[src]
impl<B> Debugger for Renderer<B> where
B: Backend,
[src]
B: Backend,
fn explain<Message>(
&mut self,
defaults: &Defaults,
widget: &dyn Widget<Message, Self>,
layout: Layout<'_>,
cursor_position: Point,
color: Color
) -> Self::Output
[src]
&mut self,
defaults: &Defaults,
widget: &dyn Widget<Message, Self>,
layout: Layout<'_>,
cursor_position: Point,
color: Color
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Output = (Primitive, Interaction)
The type of output of the [Renderer
]. Read more
type Defaults = Defaults
The default styling attributes of the [Renderer
]. Read more
fn layout<'a, Message>(
&mut self,
element: &Element<'a, Message, Self>,
limits: &Limits
) -> Node
[src]
&mut self,
element: &Element<'a, Message, Self>,
limits: &Limits
) -> Node
fn overlay(
&mut self,
(base_primitive, base_cursor): (Primitive, Interaction),
(overlay_primitives, overlay_cursor): (Primitive, Interaction),
overlay_bounds: Rectangle
) -> (Primitive, Interaction)
[src]
&mut self,
(base_primitive, base_cursor): (Primitive, Interaction),
(overlay_primitives, overlay_cursor): (Primitive, Interaction),
overlay_bounds: Rectangle
) -> (Primitive, Interaction)
impl<B> Renderer for Renderer<B> where
B: Backend + Text,
[src]
B: Backend + Text,
type Style = Style
The [Menu
] style supported by this renderer. Read more
fn decorate(
&mut self,
bounds: Rectangle,
_cursor_position: Point,
style: &Style,
(primitives, mouse_cursor): Self::Output
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
_cursor_position: Point,
style: &Style,
(primitives, mouse_cursor): Self::Output
) -> Self::Output
fn draw<T: ToString>(
&mut self,
bounds: Rectangle,
cursor_position: Point,
options: &[T],
hovered_option: Option<usize>,
padding: u16,
text_size: u16,
font: Font,
style: &Style
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
cursor_position: Point,
options: &[T],
hovered_option: Option<usize>,
padding: u16,
text_size: u16,
font: Font,
style: &Style
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
const DEFAULT_HEIGHT: u16
[src]
fn draw(
&self,
bounds: Rectangle,
range: RangeInclusive<f32>,
value: f32,
style_sheet: &Self::Style
) -> Self::Output
[src]
&self,
bounds: Rectangle,
range: RangeInclusive<f32>,
value: f32,
style_sheet: &Self::Style
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
const DEFAULT_SIZE: u16
[src]
const DEFAULT_SPACING: u16
[src]
fn draw(
&mut self,
bounds: Rectangle,
is_selected: bool,
is_mouse_over: bool,
(label, _): Self::Output,
style_sheet: &Self::Style
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
is_selected: bool,
is_mouse_over: bool,
(label, _): Self::Output,
style_sheet: &Self::Style
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
const DEFAULT_HEIGHT: u16
[src]
fn draw(
&mut self,
bounds: Rectangle,
cursor_position: Point,
range: RangeInclusive<f32>,
value: f32,
is_dragging: bool,
style_sheet: &Self::Style
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
cursor_position: Point,
range: RangeInclusive<f32>,
value: f32,
is_dragging: bool,
style_sheet: &Self::Style
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend + Text,
[src]
B: Backend + Text,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
fn measure_value(&self, value: &str, size: u16, font: Font) -> f32
[src]
fn offset(
&self,
text_bounds: Rectangle,
font: Font,
size: u16,
value: &Value,
state: &State
) -> f32
[src]
&self,
text_bounds: Rectangle,
font: Font,
size: u16,
value: &Value,
state: &State
) -> f32
fn draw(
&mut self,
bounds: Rectangle,
text_bounds: Rectangle,
cursor_position: Point,
font: Font,
size: u16,
placeholder: &str,
value: &Value,
state: &State,
style_sheet: &Self::Style
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
text_bounds: Rectangle,
cursor_position: Point,
font: Font,
size: u16,
placeholder: &str,
value: &Value,
state: &State,
style_sheet: &Self::Style
) -> Self::Output
fn find_cursor_position(
&self,
text_bounds: Rectangle<f32>,
font: Self::Font,
size: Option<u16>,
value: &Value,
state: &State,
x: f32
) -> usize
[src]
&self,
text_bounds: Rectangle<f32>,
font: Self::Font,
size: Option<u16>,
value: &Value,
state: &State,
x: f32
) -> usize
impl<B> Renderer for Renderer<B> where
B: Backend + Image,
[src]
B: Backend + Image,
fn dimensions(&self, handle: &Handle) -> (u32, u32)
[src]
fn draw(&mut self, handle: Handle, layout: Layout<'_>) -> Self::Output
[src]
impl<B> Renderer for Renderer<B> where
B: Backend + Text,
[src]
B: Backend + Text,
type Style = Box<dyn StyleSheet>
The [PickList
] style supported by this renderer. Read more
const DEFAULT_PADDING: u16
[src]
fn menu_style(style: &Box<dyn StyleSheet>) -> Style
[src]
fn draw(
&mut self,
bounds: Rectangle,
cursor_position: Point,
selected: Option<String>,
padding: u16,
text_size: u16,
font: Font,
style: &Box<dyn StyleSheet>
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
cursor_position: Point,
selected: Option<String>,
padding: u16,
text_size: u16,
font: Font,
style: &Box<dyn StyleSheet>
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
fn draw(
&mut self,
bounds: Rectangle,
style_sheet: &Self::Style,
is_horizontal: bool
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
style_sheet: &Self::Style,
is_horizontal: bool
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
impl<B> Renderer for Renderer<B> where
B: Backend + Svg,
[src]
B: Backend + Svg,
fn dimensions(&self, handle: &Handle) -> (u32, u32)
[src]
fn draw(&mut self, handle: Handle, layout: Layout<'_>) -> Self::Output
[src]
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
fn draw<Message>(
&mut self,
defaults: &Defaults,
bounds: Rectangle,
cursor_position: Point,
style_sheet: &Self::Style,
content: &Element<'_, Message, Self>,
content_layout: Layout<'_>
) -> Self::Output
[src]
&mut self,
defaults: &Defaults,
bounds: Rectangle,
cursor_position: Point,
style_sheet: &Self::Style,
content: &Element<'_, Message, Self>,
content_layout: Layout<'_>
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
fn scrollbar(
&self,
bounds: Rectangle,
content_bounds: Rectangle,
offset: u32
) -> Option<Scrollbar>
[src]
&self,
bounds: Rectangle,
content_bounds: Rectangle,
offset: u32
) -> Option<Scrollbar>
fn draw(
&mut self,
state: &State,
bounds: Rectangle,
_content_bounds: Rectangle,
is_mouse_over: bool,
is_mouse_over_scrollbar: bool,
scrollbar: Option<Scrollbar>,
offset: u32,
style_sheet: &Self::Style,
(content, mouse_interaction): Self::Output
) -> Self::Output
[src]
&mut self,
state: &State,
bounds: Rectangle,
_content_bounds: Rectangle,
is_mouse_over: bool,
is_mouse_over_scrollbar: bool,
scrollbar: Option<Scrollbar>,
offset: u32,
style_sheet: &Self::Style,
(content, mouse_interaction): Self::Output
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
fn draw<Message>(
&mut self,
defaults: &Self::Defaults,
content: &[Element<'_, Message, Self>],
layout: Layout<'_>,
cursor_position: Point
) -> Self::Output
[src]
&mut self,
defaults: &Self::Defaults,
content: &[Element<'_, Message, Self>],
layout: Layout<'_>,
cursor_position: Point
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend + Text,
[src]
B: Backend + Text,
type Font = Font
The font type used for [Text
]. Read more
fn default_size(&self) -> u16
[src]
fn measure(
&self,
content: &str,
size: u16,
font: Font,
bounds: Size
) -> (f32, f32)
[src]
&self,
content: &str,
size: u16,
font: Font,
bounds: Size
) -> (f32, f32)
fn draw(
&mut self,
defaults: &Self::Defaults,
bounds: Rectangle,
content: &str,
size: u16,
font: Font,
color: Option<Color>,
horizontal_alignment: HorizontalAlignment,
vertical_alignment: VerticalAlignment
) -> Self::Output
[src]
&mut self,
defaults: &Self::Defaults,
bounds: Rectangle,
content: &str,
size: u16,
font: Font,
color: Option<Color>,
horizontal_alignment: HorizontalAlignment,
vertical_alignment: VerticalAlignment
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
const DEFAULT_PADDING: u16
[src]
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
fn draw<Message>(
&mut self,
_defaults: &Defaults,
bounds: Rectangle,
cursor_position: Point,
is_disabled: bool,
is_pressed: bool,
style: &Box<dyn StyleSheet>,
content: &Element<'_, Message, Self>,
content_layout: Layout<'_>
) -> Self::Output
[src]
&mut self,
_defaults: &Defaults,
bounds: Rectangle,
cursor_position: Point,
is_disabled: bool,
is_pressed: bool,
style: &Box<dyn StyleSheet>,
content: &Element<'_, Message, Self>,
content_layout: Layout<'_>
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend + Text,
[src]
B: Backend + Text,
type Style = Box<dyn StyleSheet>
The style supported by this renderer.
const DEFAULT_SIZE: u16
[src]
const DEFAULT_SPACING: u16
[src]
fn draw(
&mut self,
bounds: Rectangle,
is_checked: bool,
is_mouse_over: bool,
(label, _): Self::Output,
style_sheet: &Self::Style
) -> Self::Output
[src]
&mut self,
bounds: Rectangle,
is_checked: bool,
is_mouse_over: bool,
(label, _): Self::Output,
style_sheet: &Self::Style
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend,
[src]
B: Backend,
fn draw<Message>(
&mut self,
defaults: &Self::Defaults,
content: &[Element<'_, Message, Self>],
layout: Layout<'_>,
cursor_position: Point
) -> Self::Output
[src]
&mut self,
defaults: &Self::Defaults,
content: &[Element<'_, Message, Self>],
layout: Layout<'_>,
cursor_position: Point
) -> Self::Output
impl<B> Renderer for Renderer<B> where
B: Backend + Text,
[src]
B: Backend + Text,
fn draw<Message>(
&mut self,
defaults: &Self::Defaults,
content: &[(Pane, Content<'_, Message, Self>)],
dragging: Option<(Pane, Point)>,
resizing: Option<Axis>,
layout: Layout<'_>,
cursor_position: Point
) -> Self::Output
[src]
&mut self,
defaults: &Self::Defaults,
content: &[(Pane, Content<'_, Message, Self>)],
dragging: Option<(Pane, Point)>,
resizing: Option<Axis>,
layout: Layout<'_>,
cursor_position: Point
) -> Self::Output
fn draw_pane<Message>(
&mut self,
defaults: &Self::Defaults,
bounds: Rectangle,
style_sheet: &Self::Style,
title_bar: Option<(&TitleBar<'_, Message, Self>, Layout<'_>)>,
body: (&Element<'_, Message, Self>, Layout<'_>),
cursor_position: Point
) -> Self::Output
[src]
&mut self,
defaults: &Self::Defaults,
bounds: Rectangle,
style_sheet: &Self::Style,
title_bar: Option<(&TitleBar<'_, Message, Self>, Layout<'_>)>,
body: (&Element<'_, Message, Self>, Layout<'_>),
cursor_position: Point
) -> Self::Output
fn draw_title_bar<Message>(
&mut self,
defaults: &Self::Defaults,
bounds: Rectangle,
style_sheet: &Self::Style,
title: &str,
title_size: u16,
title_font: Self::Font,
title_bounds: Rectangle,
controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
cursor_position: Point
) -> Self::Output
[src]
&mut self,
defaults: &Self::Defaults,
bounds: Rectangle,
style_sheet: &Self::Style,
title: &str,
title_size: u16,
title_font: Self::Font,
title_bounds: Rectangle,
controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
cursor_position: Point
) -> Self::Output
impl<Message, P, B> Widget<Message, Renderer<B>> for Canvas<Message, P> where
P: Program<Message>,
B: Backend,
[src]
P: Program<Message>,
B: Backend,
fn width(&self) -> Length
[src]
fn height(&self) -> Length
[src]
fn layout(&self, _renderer: &Renderer<B>, limits: &Limits) -> Node
[src]
fn on_event(
&mut self,
event: Event,
layout: Layout<'_>,
cursor_position: Point,
messages: &mut Vec<Message>,
_renderer: &Renderer<B>,
_clipboard: Option<&dyn Clipboard>
)
[src]
&mut self,
event: Event,
layout: Layout<'_>,
cursor_position: Point,
messages: &mut Vec<Message>,
_renderer: &Renderer<B>,
_clipboard: Option<&dyn Clipboard>
)
fn draw(
&self,
_renderer: &mut Renderer<B>,
_defaults: &Defaults,
layout: Layout<'_>,
cursor_position: Point
) -> (Primitive, Interaction)
[src]
&self,
_renderer: &mut Renderer<B>,
_defaults: &Defaults,
layout: Layout<'_>,
cursor_position: Point
) -> (Primitive, Interaction)
fn hash_layout(&self, state: &mut Hasher)
[src]
fn overlay(
&mut self,
_layout: Layout<'_>
) -> Option<Element<'_, Message, Renderer>>
[src]
&mut self,
_layout: Layout<'_>
) -> Option<Element<'_, Message, Renderer>>
Auto Trait Implementations
impl<B> RefUnwindSafe for Renderer<B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<B> Send for Renderer<B> where
B: Send,
B: Send,
impl<B> Sync for Renderer<B> where
B: Sync,
B: Sync,
impl<B> Unpin for Renderer<B> where
B: Unpin,
B: Unpin,
impl<B> UnwindSafe for Renderer<B> where
B: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,