Skip to main content

impl_styled_view

Macro impl_styled_view 

Source
macro_rules! impl_styled_view {
    ($widget:ty) => { ... };
}
Expand description

Generate View trait implementation for StyledView widgets.

This macro generates View trait methods that delegate to WidgetProps for id() and classes() methods.

§Example

struct MyWidget {
    props: WidgetProps,
}

impl View for MyWidget {
    fn render(&self, ctx: &mut RenderContext) {
        // ... rendering logic
    }
}

impl_styled_view!(MyWidget);