All controls
A rectangle containing an application-defined text label that indicates what the button does when the user selects it.
pub struct Button < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub text_align : ( HTextAlign , VTextAlign ),
}
Members
text : The button label
size : The button size in PX
position : The button position in its parent
parent : The button parent
text_align : The button label alignment
Events
Actions
A square box and an application-defined label that indicates a choice the user can make by selecting the button. Applications typically display check boxes to enable the user to choose one or more options that are not mutually exclusive.
pub struct CheckBox < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub tristate : bool ,
pub text_align : ( HTextAlign , VTextAlign ),
}
Members
text : The checkbox label
size : The checkbox size in PX
position : The checkbox position in its parent
parent : The checkbox parent
tristate : If the checkbox should have a third state
text_align : The checkbox label alignment
Events
Actions
A control consisting of a dropdown menu and a selection field similar to an edit control.
pub struct ComboBox < ID : Eq + Clone + Hash > {
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub collection : Vec < String > ,
pub sorted : bool
}
Members
text : The combobox label
size : The combobox size in PX
position : The combobox position in its parent
parent : The combobox parent
collection : The items in the combobox dropdown
sorted : If the dropdown values should be sorted
Events
Actions
A rectangular area with a border. Note: This control will be "enhanced" in future versions.
pub struct Frame < ID : Eq + Clone + Hash > {
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub border_style : FrameBorderStyle ,
pub border_color : FrameBorderColor
}
Members
text : The frame label
size : The frame size in PX
position : The frame position in its parent
parent : The frame parent
border_style : The style of the frame
border_color : The color of the frame
Events
Actions
A rectangle that surrounds a set of controls, such as check boxes or radio buttons, with an application-defined text label in its upper left corner.
pub struct GroupBox < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub text_align : HTextAlign ,
}
Members
text : The group box label
size : The group box size in PX
position : The group box position in its parent
parent : The group box parent
Events
Actions
A static text string
pub struct Label < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub text_align : HTextAlign ,
}
Members
text : The label text
size : The label size in PX
position : The label position in its parent
parent : The label parent
text_align : Text align of the label
Events
Actions
A round button and an application-defined label that indicates a choice the user can make by selecting the button. An application typically uses radio buttons in a group box to enable the user to choose one of a set of related but mutually exclusive options.
pub struct RadioButton < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub text_align : ( HTextAlign , VTextAlign ),
}
Members
text : The radio button label
size : The radio button size in PX
position : The radio button position in its parent
parent : The radio button parent
text_align : Text align of the radio button
Events
Actions
Designates a rectangular child window into which the user can type text from the keyboard. Multiline.
pub struct TextBox < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub readonly : bool
}
Members
text : The textbox default value
size : The text box size in PX
position : The text box position in its parent
parent : The text box parent
readonly : if the control should reject key events
Events
Actions
Designates a rectangular child window into which the user can type text from the keyboard. Single line.
pub struct TextInput < ID : Eq + Clone + Hash > {
pub text : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub parent : ID ,
pub placeholder : Option < String > ,
pub text_align : HTextAlign ,
pub password : bool ,
pub readonly : bool
}
Members
text : The text input default text
size : The text input size in PX
position : The text input position in its parent
parent : The textinput parent
placeholder : String of text to show when the value is blank
text_align : Text alignment
password : Hide the user input
readonly : if the control should reject key events
Events
Actions
A moveable and resizable rectangular area that contains children controls. Has a non-client area with a title and a few options
such as closing and minimizing.
pub struct Window {
pub caption : String ,
pub size : ( u32 , u32 ),
pub position : ( i32 , i32 ),
pub visible : bool ,
pub resizable : bool ,
pub exit_on_close : bool
}
Members
caption : The group box label
size : The group box in PX
position : The group box position in its parent
visible : If the window should be visible from the start
resize : If the user should be able to resize the window
exit_on_close : If the application should close with the window
Events
Actions