Trait kas_core::WidgetCore

source ·
pub trait WidgetCore: Debug {
    fn id_ref(&self) -> &WidgetId;
    fn rect(&self) -> Rect;
    fn widget_name(&self) -> &'static str;
    fn as_widget(&self) -> &dyn Widget;
    fn as_widget_mut(&mut self) -> &mut dyn Widget;
}
Expand description

Base functionality for Widgets

Implementing WidgetCore

Implementations of this trait are generated via macro. Directly implementing this trait is not supported. See Widget trait documentation.

Required Methods§

Get the widget’s identifier

Note that the default-constructed WidgetId is invalid: any operations on this value will cause a panic. Valid identifiers are assigned by Widget::pre_configure.

Get the widget’s region, relative to its parent.

Get the name of the widget struct

Erase type

Erase type

Implementations on Foreign Types§

Implementors§