Terminology, Windowing systems programming – Crunch CRiSP File Editor 6 User Manual

Page 52

Advertising
background image

Page 52

functionality because this can help to increase performance whilst keeping the macro interface fairly simple.

One of the design goals of the macro facilities is that macros should be as portable as possible, i.e. the
intricacies and idiosyncrasies of particular GUI toolkits are hidden. This means it is easier to program the
macros, but at the risk of losing absolute functionality. Some aspects of the GUI objects expose the
underlying toolkits but only in a manner which is portable. (For instance, the push-pins in the OPENLook
interface specification are accessible to the macro programmer whether CRiSP is running under an
OPENLook compliant toolkit or not).

One of the main aims of the macro interface is to put as little policy and look and feel into the source code of
CRiSP. This means that the user interface and any stylistic issues can be modified by changing the supplied
macros. This means that CRiSP is more reliable since small minor changes are not needed to change trivial
aspects of the user interface. It also means that many of the look and feel issues can be modified across the
platforms on which CRiSP is supported simply by changing the macros.

Terminology

It is necessary to define some terms which are used in reference to the GUI objects which can be created.

attribute

A particular object has one or more values. These values can range from the value of a user
interface component to an intrinsic property of that object. For example, a list box has a value
corresponding to the currently selected item, but has multiple attributes which control its size, and
cursor positioning.

dialog box

A dialog box is a container for the objects contained within it.

object

The term object is used to refer to a displayable graphical item (more commonly referred to as a
widget in X11 parlance, or a child control in Microsoft Windows). CRiSP GUI objects do not
necessarily map identically to widgets in the underlying implementation. The CRiSP GUI objects
are designed to be high level enough to allow the invoking macros to get the job done very simply,
yet providing the power and hooks for more advanced usage. objects refer generally to things such
as scrollbars, menus and dialog boxes. Do not confuse the use of the term object with object
oriented programming concepts. The term object is used to describe an abstract or indeterminate
data type.

Windowing Systems Programming

The CRiSP dialog box and object support is something that has grown during the course of numerous
versions of CRiSP. The original aspirations of the dialog box mechanism was to allow the creation of familiar
dialog boxes for the user interface as CRiSP evolved from a purely character based piece of software to a
GUI based product.

The initial idea was to allow generic but rigid dialog boxes to be supported. The very first incarnations was to
support the following:

1. Open File dialog.

2. Save File dialog.

3. Search & Translate dialog.

4. Font selection dialog.

5. Color configuration dialog.

The very first implementations of these were rigid and hard coded within the CRiSP software. It became very
obvious shortly thereafter that serious platform specific concerns would be necessary, for example a File
Open dialog box which did not support multiple drive selection on a Windows platform would be little more
than useless. Also it was clear that the various controls available in a dialog box would need to be tweaked
or customised depending on a large number of factors. This rigid structure paved the way for something
more generic.

The primary idea of the dialog box system is to provide user interface components which can be used to
enhance and customize the CRiSP software, yet achieve a native look & feel.

GUI software development is one of the most challenging aspects of software production and over the

Advertising