[−][src]Trait orbtk::prelude::api::widget::Widget
The Widget
trait is used to define a new widget.
Required methods
fn create() -> Self
Creates a new widget.
fn build(self, ctx: &mut BuildContext) -> Entity
Builds the widget and returns the template of the widget.
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Self
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Self
Inerts a new event handler.
fn child(self, child: Entity) -> Self
Appends a child ot the widget.
Provided methods
Loading content...Implementors
impl Widget for FocusBehavior
fn create() -> FocusBehavior
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> FocusBehavior
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> FocusBehavior
fn child(self, child: Entity) -> FocusBehavior
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for MouseBehavior
fn create() -> MouseBehavior
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> MouseBehavior
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> MouseBehavior
fn child(self, child: Entity) -> MouseBehavior
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for SelectionBehavior
fn create() -> SelectionBehavior
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> SelectionBehavior
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> SelectionBehavior
fn child(self, child: Entity) -> SelectionBehavior
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Button
fn create() -> Button
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Button
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Button
fn child(self, child: Entity) -> Button
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Canvas
fn create() -> Canvas
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Canvas
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Canvas
fn child(self, child: Entity) -> Canvas
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for CheckBox
fn create() -> CheckBox
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> CheckBox
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> CheckBox
fn child(self, child: Entity) -> CheckBox
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Container
fn create() -> Container
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Container
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Container
fn child(self, child: Entity) -> Container
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Cursor
fn create() -> Cursor
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Cursor
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Cursor
fn child(self, child: Entity) -> Cursor
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for FontIconBlock
fn create() -> FontIconBlock
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> FontIconBlock
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> FontIconBlock
fn child(self, child: Entity) -> FontIconBlock
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Grid
fn create() -> Grid
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Grid
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Grid
fn child(self, child: Entity) -> Grid
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ImageWidget
fn create() -> ImageWidget
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ImageWidget
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ImageWidget
fn child(self, child: Entity) -> ImageWidget
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ItemsWidget
fn create() -> ItemsWidget
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ItemsWidget
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ItemsWidget
fn child(self, child: Entity) -> ItemsWidget
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ListView
fn create() -> ListView
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ListView
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ListView
fn child(self, child: Entity) -> ListView
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ListViewItem
fn create() -> ListViewItem
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ListViewItem
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ListViewItem
fn child(self, child: Entity) -> ListViewItem
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ScrollBar
fn create() -> ScrollBar
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ScrollBar
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ScrollBar
fn child(self, child: Entity) -> ScrollBar
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ScrollIndicator
fn create() -> ScrollIndicator
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ScrollIndicator
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ScrollIndicator
fn child(self, child: Entity) -> ScrollIndicator
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ScrollViewer
fn create() -> ScrollViewer
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ScrollViewer
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ScrollViewer
fn child(self, child: Entity) -> ScrollViewer
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Stack
fn create() -> Stack
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Stack
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Stack
fn child(self, child: Entity) -> Stack
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Switch
fn create() -> Switch
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Switch
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Switch
fn child(self, child: Entity) -> Switch
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for TextBlock
fn create() -> TextBlock
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> TextBlock
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> TextBlock
fn child(self, child: Entity) -> TextBlock
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for TextBox
fn create() -> TextBox
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> TextBox
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> TextBox
fn child(self, child: Entity) -> TextBox
fn state(&self) -> Option<Rc<dyn State + 'static>>
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for ToggleButton
fn create() -> ToggleButton
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ToggleButton
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> ToggleButton
fn child(self, child: Entity) -> ToggleButton
fn build(self, ctx: &mut BuildContext) -> Entity
impl Widget for Window
fn create() -> Window
fn insert_handler(
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Window
self,
handler: impl Into<Rc<dyn EventHandler + 'static>>
) -> Window