pub struct GuiContext<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> { /* private fields */ }Implementations§
Source§impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> GuiContext<'a, NODES, EVENTS, DIRTY>
pub fn new(viewport: Rect) -> Self
pub const fn viewport(&self) -> Rect
pub fn set_viewport(&mut self, viewport: Rect) -> Result<(), GuiError>
pub fn clear_widgets(&mut self) -> Result<(), GuiError>
pub const fn long_press_threshold_ms(&self) -> u32
pub fn set_long_press_threshold_ms(&mut self, threshold_ms: u32)
pub fn set_press_repeat_timing(&mut self, delay_ms: u32, interval_ms: u32)
pub fn set_double_select_window_ms(&mut self, window_ms: u32)
pub fn set_double_pointer_window_ms(&mut self, window_ms: u32)
pub fn set_widget_press_timing( &mut self, id: WidgetId, timing: PressTiming, ) -> Result<(), GuiError>
pub fn clear_widget_press_timing( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn widget_press_timing( &self, id: WidgetId, ) -> Result<Option<PressTiming>, GuiError>
pub fn set_widget_key_input_policy( &mut self, id: WidgetId, policy: WidgetKeyInputPolicy, ) -> Result<(), GuiError>
pub fn clear_widget_key_input_policy( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn widget_key_input_policy( &self, id: WidgetId, ) -> Result<Option<WidgetKeyInputPolicy>, GuiError>
pub fn set_widget_key_bindings( &mut self, id: WidgetId, bindings: WidgetKeyBindings, ) -> Result<(), GuiError>
pub fn clear_widget_key_bindings( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn widget_key_bindings( &self, id: WidgetId, ) -> Result<Option<WidgetKeyBindings>, GuiError>
pub fn set_scroll_physics( &mut self, velocity_threshold: f32, velocity_decay: f32, drag_velocity_blend: f32, )
pub fn set_state_transition_duration_ms(&mut self, duration_ms: u32)
pub fn active_state_transitions(&self) -> usize
pub fn set_textarea_cursor_blink_timing(&mut self, period_ms: u32)
pub fn widgets(&self) -> &[WidgetNode<'a>]
pub fn dirty_regions(&self) -> &[Rect]
pub fn present_regions(&self) -> impl Iterator<Item = PresentRegion> + '_
pub fn bounding_present_region(&self) -> Option<PresentRegion>
pub fn clear_dirty(&mut self)
pub const fn theme(&self) -> Theme
pub fn set_theme(&mut self, theme: Theme) -> Result<(), GuiError>
pub fn set_style_class<S>(
&mut self,
class: StyleClassId,
style: S,
) -> Result<(), GuiError>where
S: Into<WidgetStyle>,
pub fn clear_style_class(&mut self, class: StyleClassId) -> Result<(), GuiError>
pub fn set_style_class_state( &mut self, class: StyleClassId, state: VisualState, style: Style, ) -> Result<(), GuiError>
pub fn set_widget_style_class( &mut self, id: WidgetId, class: Option<StyleClassId>, ) -> Result<(), GuiError>
pub fn apply_widget_style_transition( &mut self, id: WidgetId, from: VisualState, to: VisualState, t: f32, ) -> Result<(), GuiError>
pub const fn render_quality(&self) -> RenderQuality
pub fn set_render_quality( &mut self, quality: RenderQuality, ) -> Result<(), GuiError>
pub const fn focus(&self) -> Option<WidgetId>
pub fn set_focus(&mut self, focus: Option<WidgetId>) -> Result<(), GuiError>
pub fn add_panel<S>(
&mut self,
rect: Rect,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_panel(&mut self, rect: Rect) -> Result<WidgetId, GuiError>
pub fn add_label<S>(
&mut self,
rect: Rect,
text: &'a str,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_label( &mut self, rect: Rect, text: &'a str, ) -> Result<WidgetId, GuiError>
pub fn add_progress_bar<S>(
&mut self,
rect: Rect,
value: f32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_progress_bar( &mut self, rect: Rect, value: f32, ) -> Result<WidgetId, GuiError>
pub fn add_toggle<S>(
&mut self,
rect: Rect,
label: &'a str,
on: bool,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_toggle( &mut self, rect: Rect, label: &'a str, on: bool, ) -> Result<WidgetId, GuiError>
pub fn add_checkbox<S>(
&mut self,
rect: Rect,
label: &'a str,
checked: bool,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_checkbox( &mut self, rect: Rect, label: &'a str, checked: bool, ) -> Result<WidgetId, GuiError>
pub fn add_slider<S>(
&mut self,
rect: Rect,
value: f32,
min: f32,
max: f32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_slider( &mut self, rect: Rect, value: f32, min: f32, max: f32, ) -> Result<WidgetId, GuiError>
pub fn add_value_label<S>(
&mut self,
rect: Rect,
label: &'a str,
value: i32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_value_label( &mut self, rect: Rect, label: &'a str, value: i32, ) -> Result<WidgetId, GuiError>
pub fn add_list<S>(
&mut self,
rect: Rect,
items: &'a [&'a str],
selected: usize,
visible_rows: usize,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_feed_timeline<S>(
&mut self,
rect: Rect,
items: &'a [&'a str],
selected: usize,
visible_rows: usize,
expanded: bool,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_list( &mut self, rect: Rect, items: &'a [&'a str], selected: usize, visible_rows: usize, ) -> Result<WidgetId, GuiError>
pub fn add_scroll_view<S>(
&mut self,
rect: Rect,
offset_y: i32,
content_h: u32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_scroll_view( &mut self, rect: Rect, offset_y: i32, content_h: u32, ) -> Result<WidgetId, GuiError>
pub fn add_tabs<S>(
&mut self,
rect: Rect,
labels: &'a [&'a str],
selected: usize,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_tabs( &mut self, rect: Rect, labels: &'a [&'a str], selected: usize, ) -> Result<WidgetId, GuiError>
pub fn add_dialog<S>(
&mut self,
rect: Rect,
title: &'a str,
body: &'a str,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_dialog( &mut self, rect: Rect, title: &'a str, body: &'a str, ) -> Result<WidgetId, GuiError>
pub fn add_toast<S>(
&mut self,
rect: Rect,
text: &'a str,
ttl_ms: u32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_toast( &mut self, rect: Rect, text: &'a str, ttl_ms: u32, ) -> Result<WidgetId, GuiError>
pub fn add_meter<S>(
&mut self,
rect: Rect,
value: f32,
min: f32,
max: f32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_themed_meter( &mut self, rect: Rect, value: f32, min: f32, max: f32, ) -> Result<WidgetId, GuiError>
pub fn add_arc_gauge<S>(
&mut self,
rect: Rect,
value: f32,
min: f32,
max: f32,
start_deg: i32,
end_deg: i32,
thickness: u8,
antialias: bool,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_gauge<S>(
&mut self,
rect: Rect,
value: f32,
min: f32,
max: f32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_gauge_needle<S>(
&mut self,
rect: Rect,
value: f32,
min: f32,
max: f32,
start_deg: i32,
end_deg: i32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_chart<S>(
&mut self,
rect: Rect,
values: &'a [f32],
min: f32,
max: f32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn set_chart_style( &mut self, id: WidgetId, thickness: u8, fill_under: bool, markers: bool, ) -> Result<(), GuiError>
pub fn set_chart_decoration( &mut self, id: WidgetId, mode: ChartMode, show_grid: bool, show_axes: bool, show_labels: bool, ) -> Result<(), GuiError>
pub fn add_spinner<S>(
&mut self,
rect: Rect,
phase: f32,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_dropdown<S>(
&mut self,
rect: Rect,
items: &'a [&'a str],
selected: usize,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_roller<S>(
&mut self,
rect: Rect,
items: &'a [&'a str],
selected: usize,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_table<S>(
&mut self,
rect: Rect,
rows: &'a [&'a [&'a str]],
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn set_table_style( &mut self, id: WidgetId, separators: bool, cell_padding: u8, align: TextAlign, ) -> Result<(), GuiError>
pub fn add_textarea<S>(
&mut self,
rect: Rect,
text: &'a str,
placeholder: &'a str,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_keyboard<S>(
&mut self,
rect: Rect,
keys: &'a [char],
cols: u8,
target: Option<WidgetId>,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_keyboard_with_alt<S>(
&mut self,
rect: Rect,
keys: &'a [char],
alt_keys: Option<&'a [char]>,
cols: u8,
target: Option<WidgetId>,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_image<S>(
&mut self,
rect: Rect,
image: ImageRef<'a>,
fit: ImageFit,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_peek_reveal<S>(
&mut self,
rect: Rect,
icon: ImageRef<'a>,
title: &'a str,
subtitle: &'a str,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_glance_tile<S>(
&mut self,
rect: Rect,
icon: char,
title: &'a str,
subtitle: &'a str,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_card_deck<S>(
&mut self,
rect: Rect,
titles: &'a [&'a str],
selected: usize,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_reel<S>(
&mut self,
rect: Rect,
player: ReelPlayer<'a>,
fit: ImageFit,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_state_surface<S>(
&mut self,
rect: Rect,
state: SurfaceState,
title: &'a str,
message: &'a str,
action: Option<&'a str>,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_notification_action_sheet<S>(
&mut self,
rect: Rect,
level: NotificationLevel,
title: &'a str,
body: &'a str,
actions: &'a [&'a str],
selected: usize,
open: bool,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_border<S>(
&mut self,
rect: Rect,
style: S,
) -> Result<WidgetId, GuiError>where
S: Into<WidgetStyle>,
pub fn add_spacer(&mut self, rect: Rect) -> Result<WidgetId, GuiError>
pub fn set_progress(&mut self, id: WidgetId, value: f32) -> Result<(), GuiError>
pub fn set_glance_highlighted( &mut self, id: WidgetId, highlighted: bool, ) -> Result<(), GuiError>
pub fn set_card_deck_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn tick_reel(&mut self, id: WidgetId, dt_ms: u32) -> Result<(), GuiError>
pub fn set_state_surface_state( &mut self, id: WidgetId, state: SurfaceState, ) -> Result<(), GuiError>
pub fn set_state_surface_message( &mut self, id: WidgetId, message: &'a str, ) -> Result<(), GuiError>
pub fn set_state_surface_action( &mut self, id: WidgetId, action: Option<&'a str>, ) -> Result<(), GuiError>
pub fn set_state_surface_busy_phase( &mut self, id: WidgetId, phase: f32, ) -> Result<(), GuiError>
pub fn tick_state_surface( &mut self, id: WidgetId, dt_ms: u32, cycles_per_sec: f32, ) -> Result<(), GuiError>
pub fn set_heads_up_ttl( &mut self, id: WidgetId, ttl_ms: u32, ) -> Result<(), GuiError>
pub fn tick_heads_up( &mut self, id: WidgetId, dt_ms: u32, ) -> Result<(), GuiError>
pub fn set_notification_sheet_open( &mut self, id: WidgetId, open: bool, ) -> Result<(), GuiError>
pub fn set_notification_sheet_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn list_selected(&self, id: WidgetId) -> Option<usize>
pub fn set_list_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn feed_selected(&self, id: WidgetId) -> Option<usize>
pub fn set_feed_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn set_feed_expanded( &mut self, id: WidgetId, expanded: bool, ) -> Result<(), GuiError>
pub fn set_toggle(&mut self, id: WidgetId, on: bool) -> Result<(), GuiError>
pub fn toggle_value(&self, id: WidgetId) -> Option<bool>
pub fn set_checked( &mut self, id: WidgetId, checked: bool, ) -> Result<(), GuiError>
pub fn checked_value(&self, id: WidgetId) -> Option<bool>
pub fn set_slider_value( &mut self, id: WidgetId, value: f32, ) -> Result<(), GuiError>
pub fn slider_value(&self, id: WidgetId) -> Option<f32>
pub fn set_value_label( &mut self, id: WidgetId, value: i32, ) -> Result<(), GuiError>
pub fn set_scroll_offset( &mut self, id: WidgetId, offset_y: i32, ) -> Result<(), GuiError>
pub fn scroll_offset(&self, id: WidgetId) -> Option<i32>
pub fn set_tab_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn tab_selected(&self, id: WidgetId) -> Option<usize>
pub fn set_toast_ttl( &mut self, id: WidgetId, ttl_ms: u32, ) -> Result<(), GuiError>
pub fn tick_toast(&mut self, id: WidgetId, dt_ms: u32) -> Result<(), GuiError>
pub fn set_meter_value( &mut self, id: WidgetId, value: f32, ) -> Result<(), GuiError>
pub fn set_spinner_phase( &mut self, id: WidgetId, phase: f32, ) -> Result<(), GuiError>
pub fn tick_spinner( &mut self, id: WidgetId, dt_ms: u32, cycles_per_sec: f32, ) -> Result<(), GuiError>
pub fn set_dropdown_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn dropdown_selected(&self, id: WidgetId) -> Option<usize>
pub fn set_dropdown_open( &mut self, id: WidgetId, open: bool, ) -> Result<(), GuiError>
pub fn dropdown_open(&self, id: WidgetId) -> Option<bool>
pub fn set_roller_selected( &mut self, id: WidgetId, selected: usize, ) -> Result<(), GuiError>
pub fn roller_selected(&self, id: WidgetId) -> Option<usize>
pub fn set_textarea_text( &mut self, id: WidgetId, text: &'a str, ) -> Result<(), GuiError>
pub fn textarea_text(&self, id: WidgetId) -> Option<&str>
pub fn set_textarea_cursor( &mut self, id: WidgetId, cursor: usize, ) -> Result<(), GuiError>
pub fn move_textarea_cursor( &mut self, id: WidgetId, delta: i8, ) -> Result<(), GuiError>
pub fn move_textarea_cursor_select( &mut self, id: WidgetId, delta: i8, ) -> Result<(), GuiError>
pub fn move_textarea_cursor_word( &mut self, id: WidgetId, delta: i8, ) -> Result<(), GuiError>
pub fn move_textarea_cursor_word_select( &mut self, id: WidgetId, delta: i8, ) -> Result<(), GuiError>
pub fn set_textarea_cursor_home(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn set_textarea_cursor_end(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn set_textarea_cursor_line_home( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn set_textarea_cursor_line_home_select( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn set_textarea_cursor_line_end( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn set_textarea_cursor_line_end_select( &mut self, id: WidgetId, ) -> Result<(), GuiError>
pub fn textarea_cursor(&self, id: WidgetId) -> Option<usize>
pub fn set_textarea_selection( &mut self, id: WidgetId, start: usize, end: usize, ) -> Result<(), GuiError>
pub fn clear_textarea_selection(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn textarea_selection(&self, id: WidgetId) -> Option<(usize, usize)>
pub fn textarea_cursor_visible(&self, id: WidgetId) -> Option<bool>
pub fn set_textarea_capabilities( &mut self, id: WidgetId, read_only: bool, single_line: bool, accept_newline: bool, ) -> Result<(), GuiError>
pub fn textarea_insert_char( &mut self, id: WidgetId, ch: char, ) -> Result<(), GuiError>
pub fn textarea_backspace(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn textarea_delete_forward(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn keyboard_selected_key(&self, id: WidgetId) -> Option<char>
pub fn keyboard_layout(&self, id: WidgetId) -> Option<KeyboardLayout>
pub fn set_keyboard_layout( &mut self, id: WidgetId, layout: KeyboardLayout, ) -> Result<(), GuiError>
pub fn set_keyboard_target( &mut self, id: WidgetId, target: Option<WidgetId>, ) -> Result<(), GuiError>
pub fn set_gauge_value( &mut self, id: WidgetId, value: f32, ) -> Result<(), GuiError>
pub fn set_gauge_ticks( &mut self, id: WidgetId, major_ticks: u8, minor_ticks: u8, show_value: bool, ) -> Result<(), GuiError>
pub fn set_widget_rect( &mut self, id: WidgetId, rect: Rect, ) -> Result<(), GuiError>
pub fn set_widget_x(&mut self, id: WidgetId, x: i32) -> Result<(), GuiError>
pub fn set_widget_y(&mut self, id: WidgetId, y: i32) -> Result<(), GuiError>
pub fn set_widget_width(&mut self, id: WidgetId, w: u32) -> Result<(), GuiError>
pub fn set_widget_height( &mut self, id: WidgetId, h: u32, ) -> Result<(), GuiError>
pub fn set_widget_opacity( &mut self, id: WidgetId, opacity: u8, ) -> Result<(), GuiError>
pub fn set_widget_corner_radius( &mut self, id: WidgetId, radius: u8, ) -> Result<(), GuiError>
pub fn set_widget_accent( &mut self, id: WidgetId, accent: Rgb565, ) -> Result<(), GuiError>
pub fn set_widget_parent( &mut self, id: WidgetId, parent: Option<WidgetId>, ) -> Result<(), GuiError>
pub fn add_child( &mut self, parent: WidgetId, child: WidgetId, ) -> Result<(), GuiError>
pub fn children_of( &self, parent: WidgetId, ) -> impl Iterator<Item = &WidgetNode<'a>> + '_
pub fn absolute_rect(&self, id: WidgetId) -> Option<Rect>
pub fn set_flag( &mut self, id: WidgetId, flag: WidgetFlags, enabled: bool, ) -> Result<(), GuiError>
pub fn has_flag( &self, id: WidgetId, flag: WidgetFlags, ) -> Result<bool, GuiError>
pub fn insert_flag( &mut self, id: WidgetId, flag: WidgetFlags, ) -> Result<(), GuiError>
pub fn remove_flag( &mut self, id: WidgetId, flag: WidgetFlags, ) -> Result<(), GuiError>
pub fn set_disabled( &mut self, id: WidgetId, disabled: bool, ) -> Result<(), GuiError>
pub fn set_clickable( &mut self, id: WidgetId, clickable: bool, ) -> Result<(), GuiError>
pub fn set_scrollable( &mut self, id: WidgetId, scrollable: bool, ) -> Result<(), GuiError>
pub fn set_visible( &mut self, id: WidgetId, visible: bool, ) -> Result<(), GuiError>
pub fn set_enabled( &mut self, id: WidgetId, enabled: bool, ) -> Result<(), GuiError>
pub fn event_path<const M: usize>( &self, target: WidgetId, out: &mut Vec<EventContext, M>, ) -> Result<usize, GuiError>
pub fn widget_event_path<const M: usize>( &self, target: WidgetId, kind: WidgetEventKind, out: &mut Vec<WidgetEvent, M>, ) -> Result<usize, GuiError>
pub fn dispatch_widget_event<const M: usize, F>( &self, target: WidgetId, kind: WidgetEventKind, scratch: &mut Vec<WidgetEvent, M>, handler: F, ) -> Result<(), GuiError>
pub fn mark_subtree_dirty(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn set_focus_group( &mut self, id: WidgetId, group: FocusGroupId, ) -> Result<(), GuiError>
pub fn set_active_focus_group(&mut self, group: Option<FocusGroupId>)
pub fn apply_layout( &mut self, layout: LinearLayout, area: Rect, ids: &[WidgetId], ) -> Result<usize, GuiError>
pub fn apply_layout_flex( &mut self, layout: LinearLayout, area: Rect, ids: &[WidgetId], items: &[LayoutItem], enable_grow: bool, enable_shrink: bool, ) -> Result<usize, GuiError>
pub fn apply_layout_intrinsic( &mut self, layout: LinearLayout, area: Rect, ids: &[WidgetId], ) -> Result<usize, GuiError>
pub fn apply_layout_intrinsic_with_cross( &mut self, layout: LinearLayout, area: Rect, ids: &[WidgetId], preserve_cross: bool, ) -> Result<usize, GuiError>
pub fn render<D>(&self, target: &mut D) -> Result<(), D::Error>where
D: DrawTarget<Color = Rgb565>,
pub fn render_dirty<D>(&self, target: &mut D) -> Result<(), D::Error>where
D: DrawTarget<Color = Rgb565>,
pub fn render_with_offset<D>(
&self,
target: &mut D,
offset_x: i32,
offset_y: i32,
) -> Result<(), D::Error>where
D: DrawTarget<Color = Rgb565>,
pub fn render_with_offset_and_opacity<D>(
&self,
target: &mut D,
offset_x: i32,
offset_y: i32,
opacity: u8,
) -> Result<(), D::Error>where
D: DrawTarget<Color = Rgb565>,
pub fn render_with_offset_opacity_and_clip<D>(
&self,
target: &mut D,
offset_x: i32,
offset_y: i32,
opacity: u8,
clip: Rect,
) -> Result<(), D::Error>where
D: DrawTarget<Color = Rgb565>,
pub fn handle_input(&mut self, event: InputEvent) -> Result<(), GuiError>
pub fn tick_input(&mut self, dt_ms: u32) -> Result<(), GuiError>
pub fn pop_event(&mut self) -> Option<UiEvent>
pub fn set_event_filter( &mut self, id: WidgetId, filter: UiEventFilter, ) -> Result<(), GuiError>
pub fn event_filter(&self, id: WidgetId) -> Result<UiEventFilter, GuiError>
pub fn clear_event_filter(&mut self, id: WidgetId) -> Result<(), GuiError>
pub fn set_dispatch_policy( &mut self, id: WidgetId, policy: WidgetDispatchPolicy, ) -> Result<(), GuiError>
pub fn dispatch_policy( &self, id: WidgetId, ) -> Result<Option<WidgetDispatchPolicy>, GuiError>
pub fn clear_dispatch_policy(&mut self, id: WidgetId) -> Result<(), GuiError>
Auto Trait Implementations§
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> Freeze for GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> RefUnwindSafe for GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> Send for GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> Sync for GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> Unpin for GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> UnsafeUnpin for GuiContext<'a, NODES, EVENTS, DIRTY>
impl<'a, const NODES: usize, const EVENTS: usize, const DIRTY: usize> UnwindSafe for GuiContext<'a, NODES, EVENTS, DIRTY>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.