iced_aw/core/
renderer.rs

1//! Helper struct for drawing
2
3use iced_core::{Layout, Point, Rectangle};
4
5/// Collection of all necessary data to draw a widget.
6#[derive(Debug)]
7pub struct DrawEnvironment<'a, Defaults, Style, Focus> {
8    /// The defaults of the renderer.
9    pub defaults: &'a Defaults,
10    /// The layout of the widget.
11    pub layout: Layout<'a>,
12    /// The position of the cursor.
13    pub cursor_position: Point,
14    /// The style of the widget.
15    pub style_sheet: &'a Style,
16    /// The viewport of the renderer.
17    pub viewport: Option<&'a Rectangle>,
18    /// The focus to an input element on the widget.
19    pub focus: Focus,
20}