The following code should be added after the closing window tag, and before the closing gui tag. So, whenever the main window is destroyed, the entire application will quit. There are a number of other actions that a handler can take. Every action besides the quit action takes at least the name of the widget to operate on. Some take another argument.
Tags exist which destroy, hide, show, activate, or deactivate a named widget.
All of these actions take only a required name attribute, which names the object of the action. Handlers can execute another action, which requires two arguments, and creates an instance of a widget prototype. The first is the name of the widgetProto , and the other is the name of the widget which is to be the parent of the newly created widget. If the widgetProto only contains a window, the createWindow action tag should be used. Since most of the handler actions are self explanitory, the tutorial will continue only by adding support for creation and destruction actions.