Class-variables represents constants for the class. The are commonly used to represent default values for the visual appearance of graphical classes: thickness, fonts, colours, etc.
Class variables are normally declared using class_variable/4.
If a class defines both a variable object and a class_variable object, the value of the class-variable is used as default (initial) value for the instance variable.
Defaults for class-variables may be defined externally using the Defaults file, which resides in the XPCE home directory.
See also:
<-class_variable_value
->load_defaults
<-type.->value
to verify the type, while get-access is handled by class_variable<-value
to check the Defaults file, or use class_variable<-default.
The initial value is the constant @not_obtained.
->load_defaults). Type
declares the type. If the class-variable acts as a default-variable for
an instance-variable, using @default
will copy the type of the instance-variable. Summary is used for
documentation. When absent, the documentation from the corresponding
instance variable is used, or the documentation from a class-variable
defined in one of the super-classes.
Class-variables are normally defined using class_variable/4 in the definition of a user-defined class.
|function<-type
is used to verify the type.->load_defaults.<-class_variable_value.