Struct conrod::TextBox
[−]
[src]
pub struct TextBox<'a, F> { // some fields omitted }
A widget for displaying and mutating a given one-line text String
. It's reaction is
triggered upon pressing of the Enter
/Return
key.
Methods
impl<'a, F> TextBox<'a, F>
fn new(text: &'a mut String) -> TextBox<'a, F>
Construct a TextBox widget.
fn font_size(self, font_size: FontSize) -> TextBox<'a, F>
Set the font size of the text.
fn react(self, reaction: F) -> TextBox<'a, F>
Set the reaction for the TextBox. It will be triggered upon pressing of the
Enter
/Return
key.
fn set<C>(self, ui_id: UiId, ui: &mut Ui<C>) where C: CharacterCache, F: FnMut(&mut String)
After building the TextBox, use this method to set its current state into the given Ui
.
It will use this state for rendering the next time ui.draw(graphics)
is called.