class MiniGL::Component
This class is an abstract ancestor for all form components (Button
, ToggleButton
, TextField
, DropDownList
and ProgressBar
).
Attributes
Determines whether the control is enabled, i.e., will process user input.
The height of the component
A container for any parameters to be passed to the code blocks called in response to events of the control (click of a button, change of the text in a text field, etc.). More detail can be found in the constructor for each specific component class.
The text of the component
Determines whether the control is visible, i.e., will be drawn in the screen and process user input, if enabled.
The width of the component
The horizontal coordinate of the component
The vertical coordinate of the component
Public Instance Methods
Sets the position of the component. Parameters:
- x
-
The new x coordinate.
- y
-
The new y coordinate.
# File lib/minigl/forms.rb, line 76 def set_position(x, y) @x = x; @y = y end