Definitions in workspaces are displayed with nip2's class browser. Each row is displayed in four main parts: a button for the row name, a line of text, a set of sub-rows for the members of the row's class, and a graphic display representing the row's value. See Figure 6.4.
The text part of the right-hand-side of each row is always displayed, but the sub-rows are only displayed if the row represents a class, and the graphic is only displayed if the class is an instance of one of the classes in Table 6.5. You can subclass these if you want to use the graphic display in your own widgets.
There are three separate ways to set the value for a row. You can edit the line of program text, you can edit one of the members, or you can manipulate the graphic representation (dragging a slider, or moving a region). These can be contradictory, so nip2 resolves conflicts by always applying changes in the order text, then graphic, then member.
When it applies a graphic change, nip2 rebuilds the class using a class member called class-name_edit, or if that is not defined, the class's constructor member. For example, the Colour class can be defined as:
Colour colour_space value = class {} A1 = Colour "sRGB" [255,0,0];
There are two ways to change A1. You can open A1 and change colour_space to "Lab", or you can double-click on the swatch and drag the disc. When you click OK on the colour edit dialog, nip2 searches for a member called Colour_edit, fails to find it, and so picks the Colour member instead (the default constructor generated by nip2). It then replaces the value of A1 with
[needs finishing]