Struct direct_gui::controls::Label
[−]
[src]
pub struct Label { /* fields omitted */ }
A text label widget using a font resource to render the text.
Methods
impl Label
[src]
fn new(font_ref: FontRef) -> Self
[src]
Create a new label for rendering of static text.
fn pos(&self) -> (i32, i32)
[src]
Get the position.
fn with_pos(self, x: i32, y: i32) -> Self
[src]
Map a position.
fn set_pos(&mut self, x: i32, y: i32)
[src]
Change the position.
fn text(&self) -> &String
[src]
Get the text.
fn with_text(self, text: &str) -> Self
[src]
Map the label text.
fn set_text(&mut self, text: &str)
[src]
Update the text of the label.
Trait Implementations
impl Control for Label
[src]
fn update(&mut self, _args: &ControlState, _res: &Resources)
[src]
Update the control.
fn draw(&self, buffer: &mut Vec<u32>, buffer_width: usize, res: &Resources)
[src]
Draw the control on the output buffer.
fn control_type(&self) -> ControlType
[src]
Retrieve what type of control this is.
fn as_any(&self) -> &Any
[src]
For downcasting.
fn as_any_mut(&mut self) -> &mut Any
[src]
For downcasting.