This is the base class for the components that a window is composed/aggregated of. More...
Public Member Functions | |
any | get (string var_name) |
Returns the value of an attribute (a member variable) of this class. More... | |
set (string var_name, any new_value) | |
Sets an attribute (a member variable) of this class to a new value. More... | |
string | GetExtraMessage (string var_name) |
Returns the result of VarBaseT::GetExtraMessage() for the given member variable. More... | |
interpolate (string var_name, number start_value, number end_value, number time) | |
Schedules a value for interpolation between a start and end value over a given period of time. More... | |
This is the base class for the components that a window is composed/aggregated of.
Components are the basic building blocks of a window: their composition defines the properties, the behaviour, and thus virtually every aspect of the window.
Components of this type are never instantiated directly, but always indirectly through one of the derived classes.
any get | ( | string | var_name | ) |
Returns the value of an attribute (a member variable) of this class.
The variables of this class are also referred to as "Public Attributes" or "Member Data", and include the variables of the concrete, derived component class as well as those of its base classes. (However, there is currently only one base class, ComponentBaseT, which adds methods such as get() and set(), but adds no additional variables to its derived classes.)
At this time, it is not yet possible to write script code like this:
but instead, we have to write it like this:
var_name | The name of the variable whose value is to be retrieved. |
string GetExtraMessage | ( | string | var_name | ) |
Returns the result of VarBaseT::GetExtraMessage()
for the given member variable.
This is currently only used with ComponentModelT components, in order to learn why loading a specific model may have failed:
interpolate | ( | string | var_name, |
number | start_value, | ||
number | end_value, | ||
number | time | ||
) |
Schedules a value for interpolation between a start and end value over a given period of time.
Only variables that are floating-point numbers and variables that are tuples whose elements are floating-point numbers can be interpolated. (These are the variables whose underlying C++ type is float
, double
, Vector2fT
or Vector3fT
.) For variables that are tuples, you must append one of the suffixes .x
, .y
, .z
to determine the first, second or third element for interpolation. Alternatively, the suffixes .r
, .g
, .b
are more naturally used with color tuples, and work exactly alike.
var_name | The name of the window attribute to interpolate. Also see set() for details. |
start_value | The start value. |
end_value | The end value. |
time | The time in milliseconds to interpolate the variable from start_value to end_value . |
set | ( | string | var_name, |
any | new_value | ||
) |
Sets an attribute (a member variable) of this class to a new value.
The variables of this class are also referred to as "Public Attributes" or "Member Data", and include the variables of the concrete, derived component class as well as those of its base classes. (However, there is currently only one base class, ComponentBaseT, which adds methods such as get() and set(), but adds no additional variables to its derived classes.)
At this time, it is not yet possible to write script code like this:
but instead, we have to write it like this:
var_name | The name of the variable whose value is to be set. |
new_value | The new value that is assigned to the variable. Note that this can be a tuple if the value itself is a tuple as shown in the example above. |