Skip to main content

Widget

Trait Widget 

Source
pub trait Widget {
    // Provided methods
    fn render_widget_bounds(&self, _bounds: Rect, _style: &Style) { ... }
    fn handle_widget_event(
        &mut self,
        _event: &UiEvent,
        _ctx: &mut EventContext,
    ) -> EventPolicy { ... }
    fn get_property(&self, _key: PropertyKey) -> Option<PropertyValue<'_>> { ... }
    fn set_property<'a>(
        &mut self,
        _key: PropertyKey,
        _val: PropertyValue<'a>,
    ) -> Result<(), PropertyError> { ... }
}

Provided Methods§

Source

fn render_widget_bounds(&self, _bounds: Rect, _style: &Style)

Source

fn handle_widget_event( &mut self, _event: &UiEvent, _ctx: &mut EventContext, ) -> EventPolicy

Source

fn get_property(&self, _key: PropertyKey) -> Option<PropertyValue<'_>>

Source

fn set_property<'a>( &mut self, _key: PropertyKey, _val: PropertyValue<'a>, ) -> Result<(), PropertyError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Widget for ContentIndicatorWidget

Source§

impl Widget for CrumbsIndicatorWidget

Source§

impl Widget for PanelWidget

Source§

impl Widget for ProgressBarWidget

Source§

impl Widget for ScaleWidget

Source§

impl Widget for SliderWidget

Source§

impl Widget for SpacerWidget

Source§

impl Widget for SpinboxWidget

Source§

impl Widget for TimelineNodeWidget

Source§

impl<'a, const MAX_ACTIONS: usize> Widget for NotificationSheetWidget<'a, MAX_ACTIONS>

Source§

impl<'a, const MAX_CELLS: usize> Widget for SelectionWidget<'a, MAX_CELLS>

Source§

impl<'a, const MAX_ITEMS: usize> Widget for ActionMenuWidget<'a, MAX_ITEMS>

Source§

impl<'a, const MAX_SPANS: usize> Widget for RichTextNodeWidget<'a, MAX_SPANS>

Source§

impl<'a> Widget for ActionBarWidget<'a>

Source§

impl<'a> Widget for ButtonWidget<'a>

Source§

impl<'a> Widget for CheckboxWidget<'a>

Source§

impl<'a> Widget for GlanceTileWidget<'a>

Source§

impl<'a> Widget for LabelWidget<'a>

Source§

impl<'a> Widget for ListWidget<'a>

Source§

impl<'a> Widget for PeekBannerWidget<'a>

Source§

impl<'a> Widget for TableWidget<'a>

Source§

impl<'a> Widget for ToggleWidget<'a>