[−][src]Trait kas::prelude::Widget
Widget trait
Widgets must implement a family of traits, of which this trait is the final member:
WidgetCore
— base functionality (this trait is always derived)WidgetChildren
— enumerates children and provides methods derived from thisLayout
— handles sizing and positioning of self and childrenWidgetConfig
— the last unparametrised trait allows customisation of some aspects of widget behaviourevent::Handler
— parametrised widgets over aMsg
type and handles eventsevent::SendEvent
— routes events to children and handles responsesWidget
— the final trait
Widgets must use the derive(Widget)
macro to implement at least
WidgetCore
and Widget
; these two traits must not be implemented
manually or users may face unexpected breaking changes.
This macro can optionally implement all above traits, and by default will
implement all except for Layout
. This opt-out derive behaviour means
that adding additional traits into the family is not a breaking change.
To refer to a widget via dyn trait, use &dyn WidgetConfig
(or, if the
message type is known, one may use &dyn Widget<Msg = M>
).
To refer to a widget in generic functions, use <W: Widget>
or
<M, W: Widget<Msg = M>>
.
Trait Implementations
Implementations on Foreign Types
impl<M: 'static> Widget for Box<dyn Widget<Msg = M>>
[src]
impl<M: 'static> Widget for Box<dyn Menu<Msg = M>>
[src]
Loading content...
Implementors
impl Widget for AccelLabel
[src]
impl Widget for DragHandle
[src]
impl Widget for Filler
[src]
impl Widget for Label
[src]
impl Widget for MessageBox
[src]
impl<D: Directional> Widget for ScrollBar<D>
[src]
impl<D: Directional, W: Widget> Widget for List<D, W>
[src]
impl<D: Directional, W: Widget> Widget for Splitter<D, W>
[src]
impl<D: Directional, W: Menu> Widget for MenuBar<D, W>
[src]
impl<D: Directional, W: Menu> Widget for SubMenu<D, W>
[src]
impl<G: 'static> Widget for EditBox<G> where
G: EditGuard,
[src]
G: EditGuard,
impl<M: 'static> Widget for CheckBox<M> where
M: From<VoidMsg>,
[src]
M: From<VoidMsg>,
impl<M: 'static> Widget for CheckBoxBare<M>
[src]
impl<M: 'static> Widget for MenuToggle<M> where
M: From<VoidMsg>,
[src]
M: From<VoidMsg>,
impl<M: 'static> Widget for RadioBox<M> where
M: From<VoidMsg>,
[src]
M: From<VoidMsg>,
impl<M: 'static> Widget for RadioBoxBare<M>
[src]
impl<M: Clone + Debug + 'static> Widget for ComboBox<M>
[src]
impl<M: Clone + Debug + 'static> Widget for MenuEntry<M>
[src]
impl<M: Clone + Debug + 'static> Widget for TextButton<M>
[src]
impl<M: Debug + 'static> Widget for Separator<M>
[src]
impl<T: SliderType, D: Directional> Widget for Slider<T, D>
[src]
impl<W: Widget + 'static> Widget for Window<W> where
W: Widget<Msg = VoidMsg>,
[src]
W: Widget<Msg = VoidMsg>,