Struct native_windows_gui::TextInputT
[−]
[src]
pub struct TextInputT<S1: Clone + Into<String>, S2: Clone + Into<String>, ID: Hash + Clone> { pub text: S1, pub position: (i32, i32), pub size: (u32, u32), pub visible: bool, pub disabled: bool, pub readonly: bool, pub password: bool, pub placeholder: Option<S2>, pub limit: u32, pub parent: ID, pub font: Option<ID>, }
A template that creates a single line textinput control
Events:
Event::Destroyed, Event::Focus, Event::Char, Event::KeyDown, Event::KeyUp, Event::MouseDown, Event::MouseUp, Event::ValueChanged, Event::Moved, Event::Resized, Event::Raw
Members:
• text
: The text of the textinput
• position
: The start position of the textinput
• size
: The start size of the textinput
• visible
: If the textinput should be visible to the user
• disabled
: If the user can or can't click on the textinput
• readonly
: If the user can copty the text but can't edit the textinput content
• password
: If the textinput should hide its content
• placeholder
: Some text that is displayed when the actual value is empty
• limit
: The maximum number of characters that the control can hold
• parent
: The textinput parent
• font
: The textinput font. If None, use the system default
Fields
text: S1
position: (i32, i32)
size: (u32, u32)
visible: bool
disabled: bool
readonly: bool
password: bool
placeholder: Option<S2>
limit: u32
parent: ID
font: Option<ID>
Trait Implementations
impl<S1: Clone + Clone + Into<String>, S2: Clone + Clone + Into<String>, ID: Clone + Hash + Clone> Clone for TextInputT<S1, S2, ID>
[src]
fn clone(&self) -> TextInputT<S1, S2, ID>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<S1: Clone + Into<String>, S2: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for TextInputT<S1, S2, ID>
[src]
fn type_id(&self) -> TypeId
Should return the TypeId of the generated control. For example a WindowT
struct returns the TypeId of a Window
struct.
fn events(&self) -> Vec<Event>
Should return the events supported by the control.
fn build(&self, ui: &Ui<ID>) -> Result<Box<Control>, Error>
Should instance the control and return it as a Box. If an error is raised, it will be returned by ui.commit
.