Struct orbtk::widgets::Label
[−]
[src]
pub struct Label { pub rect: Cell<Rect>, pub selector: CloneCell<Selector>, pub border: Cell<bool>, pub border_radius: Cell<u32>, pub text: CloneCell<String>, pub text_offset: Cell<Point>, // some fields omitted }
Fields
rect: Cell<Rect>
selector: CloneCell<Selector>
border: Cell<bool>
border_radius: Cell<u32>
text: CloneCell<String>
text_offset: Cell<Point>
Methods
impl Label
[src]
Trait Implementations
impl Click for Label
[src]
fn emit_click(&self, point: Point)
[src]
fn on_click<T: Fn(&Self, Point) + 'static>(&self, func: T) -> &Self
[src]
impl Place for Label
[src]
fn position(&self, x: i32, y: i32) -> &Self
[src]
fn size(&self, width: u32, height: u32) -> &Self
[src]
fn placement(
&self,
vertical_placement: VerticalPlacement,
horizontal_placement: HorizontalPlacement
) -> &Self
[src]
&self,
vertical_placement: VerticalPlacement,
horizontal_placement: HorizontalPlacement
) -> &Self
impl Text for Label
[src]
fn text<S: Into<String>>(&self, text: S) -> &Self
[src]
fn text_offset(&self, x: i32, y: i32) -> &Self
[src]
impl Style for Label
[src]
fn selector(&self) -> &CloneCell<Selector>
[src]
fn with_class<S: Into<String>>(&self, class: S) -> &Self
[src]
fn without_class<S: Into<String>>(&self, class: S) -> &Self
[src]
fn with_pseudo_class<S: Into<String>>(&self, pseudo_class: S) -> &Self
[src]
fn without_pseudo_class<S: Into<String>>(&self, pseudo_class: S) -> &Self
[src]
impl Widget for Label
[src]
fn name(&self) -> &str
[src]
Return the name of the widget.
fn rect(&self) -> &Cell<Rect>
[src]
Borrow the render rect of the widget.
fn local_position(&self) -> &Cell<Point>
[src]
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>
[src]
Borrow the vertical placement of the widget.
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
Borrow the horizontal placement of the widget.
fn margin(&self) -> &Cell<Thickness>
[src]
Borrow the margin of the widget.
fn event(&self, event: Event, focused: bool, redraw: &mut bool) -> bool
[src]
Handle the incoming events by bubbling from child to parent. Must have overwritten to create a custom bubbling event handling. Read more
fn children(&self) -> &RefCell<Vec<Arc<Widget>>>
[src]
Borrow the children of the widget.
fn draw(&self, _renderer: &mut Renderer, _focused: bool, _theme: &Theme)
[src]
Used to draw the widget by render code.
fn preview_event(
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_handled: bool
) -> bool
[src]
&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. Read more
fn add(&self, widget: Arc<Widget>)
[src]
Add a child to the widget.
fn update(&self)
[src]
Used to update the state of the widget. Could be used to update the selector.
fn arrange(&self)
[src]
Arrange the children of the widget. Could be override to create a custom layout.