[−][src]Trait orbtk::widgets::Widget
Represents the base of all widgets.
Required methods
fn rect(&self) -> &Cell<Rect>
Borrow the render rect of the widget.
fn local_position(&self) -> &Cell<Point>
Borrow the local position of the widget. The local position describes position of the widget relative to it's parent.
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
Borrow the vertical placement of the widget.
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
Borrow the horizontal placement of the widget.
fn margin(&self) -> &Cell<Thickness>
Borrow the margin of the widget.
fn name(&self) -> &str
Return the name of the widget.
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
Borrow the children of the widget.
Provided methods
fn draw(&self, _renderer: &mut dyn Renderer, _focused: bool, _theme: &Theme)
Used to draw the widget by render code.
fn preview_event(
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_handled: bool
) -> bool
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_handled: bool
) -> bool
Handle the incoming events by tunneling from parent to child. Must have overwritten to create a custom tunneling event handling.
fn event(
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_caught: &mut bool
) -> bool
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_caught: &mut bool
) -> bool
Handle the incoming events by bubbling from child to parent. Must have overwritten to create a custom bubbling event handling.
fn add(&self, widget: Arc<dyn Widget>)
Add a child to the widget.
fn update(&self)
Used to update the state of the widget. Could be used to update the selector.
fn arrange(&self)
Arrange the children of the widget. Could be override to create a custom layout.
Implementors
impl Widget for Grid
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for StackLayout
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
fn arrange(&self)
[src]
impl Widget for Image
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, _theme: &Theme)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for Rectangle
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for TextWidget
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn event(
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_caught: &mut bool
) -> bool
[src]
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for Action
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
_focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
_focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for Button
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn update(&self)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for ComboBox
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn draw(&self, renderer: &mut dyn Renderer, focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
fn name(&self) -> &str
[src]
impl Widget for Entry
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
fn update(&self)
[src]
impl Widget for Label
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for List
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
fn arrange(&self)
[src]
impl Widget for Menu
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for ProgressBar
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for Separator
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn draw(&self, renderer: &mut dyn Renderer, _focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
_focused: bool,
_redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
_focused: bool,
_redraw: &mut bool,
caught: &mut bool
) -> bool
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
impl Widget for TextBox
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn draw(&self, renderer: &mut dyn Renderer, focused: bool, theme: &Theme)
[src]
fn event(
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool
[src]
&self,
event: Event,
focused: bool,
redraw: &mut bool,
caught: &mut bool
) -> bool