3.4 Using the guienv Library

The Lidskjalv libraries consists of a number of BETA fragments, where the fragment guienv describes the basic patterns of the library.

The fragments control, fields, scrolllist, figureitems etc. contain additional facilities to those defined in guienv. This chapter and the next chapters gives a thorough description of each of these fragments. Along with the descriptions, examples are given to illustrate the intended use.

The guienv fragment consists of a single pattern guienv where the attributes of a graphical application are described. Patterns like window and menu are described inside guienv.

By specializing guienv, the user can develop a Lidskjalv application using the predefined patterns and objects in guienv.

A Lidskjalv application is invoked by executing an instance of the guienv specialization. Any Lidskjalv application must therefore have the following outline:

ORIGIN '~beta/guienv/guienv'
--- program: descriptor ---
guienv
  (# ... 
  do ... 
  #)

In order to reduce the complexity of simple applications, more advanced facilities of Lidskjalv are located in separate fragments. To utilize these facilities, the above outline of a typical Lidskjalv application must be augmented by specifying the additional facilities used. This is done by including the fragment containing the facility. The facilities are located in separate fragments, such as control, fields, scrolllist and figureitems. These fragments can be included as follows:

ORIGIN '~beta/guienv/guienv';
INCLUDE '~beta/guienv/control'
--- program: descriptor ---
guienv
  (# ... 
  do ...
  #)

where, in this case control, is the name of the desired fragment. If more than one additional facility is needed, the INCLUDE line is simply repeated with the names of the other fragments.

The basic pattern in guienv is interfaceObject, which is the common superpattern for all patterns describing interaction with the user.

When guienv executes inner, a global event handler is started. This event handler loops until the attribute terminate is executed. When an event occurs, the global event handler distributes the event to the interfaceObject in question. It could be a menu or the active window.


Lidskjalv: User Interface Framework - Reference Manual
© 1994-2004 Mjølner Informatics
[Modified: Monday October 23rd 2000 at 9:41]