When a new object is created, a set of options is provided by the application. Options which are not explicitly given are taken care of by the parent (the container object).
In the example shown above, the window provides default values for options like location and background color. If an application cannot use the default values provided by GS, new ones can be configured. For example, the following code creates a red button at location y=30.
The syntax for the default option is
The semantics for the default option can be expressed as follows: If an object of kind
Default values are inherited so that changed default values only affect new objects, not existing objects.
Default values only have meaning when creating child objects, since objects which cannot have children cannot have default options. An example is buttons.
The following example illustrates how default options can be used: