Element
An element is a visual or interactive subject in an activity interface, it is defined in the following way:
type(attr1: value1, attr2: value2, ...) { Hello! }
where type
is the type of the element, while attrN
and valueN
are the name and value of the attribute respectively. Attributes vary for different types of elements, some of which are required and will be specified when the element is introduced.
The id
attribute of an element is an optional attribute common to all elements. When an element is defined, its id
attribute automatically corresponds to a Rect
variable that represents the extent to which the element is drawn.
The { Hello }
at the end is optional and represents the text content of the element. It is only valid for p
(paragraph elements).