The basic idea of the Form Editor is to provide a canvas, an area of the screen in which drawings can be created, and a set of tools for placing paint on the canvas. All or part of the drawings can be saved on an external file and retrieved at later times. Figure 1 shows a canvas of the Form Editor on which some drawing has be done, and the menu of editing commands. The items in this menu are graphical images rather than text; as such, the menu is called an iconic menu.
Fig. 1 The Form Editor
Five tool functions comprise the basic graphical form vocabulary. These are:
Each of these tools can be modified in its use by four variables that modify its effect on the screen: form source, color tone, grid spacing and painting mode. The functions are represented in the iconic menu.
To choose any tool or variable in the Form Editor, either move the cursor over the icon representing the desired action and click the red button, or type a corresponding key on the keyboard. You can press the red button and move the cursor over the icons; the corresponding selection is highlighted by displaying a gray box within the icon. Releasing the red button chooses the current selection.
The Form Editor is in a standard system view so that the standard blue button menu is available. However, the size of the viewing area can not be changed. A full screen editor can be created as well.
Create a Form Editor by evaluating an expression of the form:
(Form extent: 400 @ 300 depth: Display depth) fillWhite; edit
or
FormEditor openFullScreenForm
To edit a part of the display screen, evaluate this expression:
Form fromUser edit
The message edit can be sent to any instance of Form. Note that the numbers you choose should not exceed the width and height of your display screen. Moreover, in determining the heigt of the entire viewing area, you should allow for at least 112 pixels for the height of the menu.
The menu accessed by pressing the yellow button while you are in a Form Editor has two commands: accept and cancel. As in text editing, the picture beeing created does not modify the original Form unless the accept command is choosen. If at some stage of drawing you wish to experiment with different changes to a Form and you do not want to save versions on an external file, you can choose the accept command to store the current version, make some changes, and then choose the cancel command to restore the image to the earlier accepted version.
The iconic menu appears at the bottom of the Font Editor. A labelled image of the menu is shown in Figure 2. The corresponding keys on the keyboard are shown in Figure 3. Notice that the keyboard arrangement lines up with the icon positions.
Fig. 2 The Iconic Menu
Fig. 3 The Keyboard
A description of each icon follows. You can try each one.
Form Source (Key A)
Used to select or specify a Form that is used as the "brush" for painting.
You are asked to designate a reactangular area of the screen. The image
within this area becomes the new brush.
Magnify (Key Z (Y on german keyboards))
Used for detailed editing of an area of the display screen. Your are asked to
designate the rectangular area within the canvas that is to be edited in
magnified form. The magnified form is edited in a special editor.
Single-Copy Tool (Key S)
When this tool is selected, the form source is copied onto the display
screen at the position of the cursor whenever the red button is pressed.
Repeat-Copy Tool (Key D)
When this tool is selected, the form source is copied onto the display
screen at the position of the cursor as long as the red button is pressed.
Line Tool (Key F)
Used to specify lines between two points. The form source is used as the
"pen" to connect the end points. Move the cursor to one of the end points
and press red button. Keep the button pressed and move the cursor to the
other end point. The line image "drags" along. Release the button to
specify the second end point. The line appears. (Note that when this
tool is used with gridding assistance, graphs of horizontal and vertical
lines can be easily created.)
Curve Tool (Key G)
Used to specify a curve deefined by three points (1, 2, 3).
The curve begins and ends at points 1 and 3, and is tangent to the
directed line segments formed by 1,2 and 2, 3. As in the line tool, the source
form is used to draw the curve.
Block Tool (Key H)
Used to fill rectangular areas on the display screen with color tone.
Designate the rectangular area. It fills with the current tone using the
current painting mode.
Color tones are set by choosing one of the five colors; each is shown in the menu as an icon that is a square of the tone:
White Tone (Key X)
Light Gray Tone (Key C)
Gray Tone (Key V)
Dark Gray Tone (Key B)
Black Tone (Key N)
The form source is copied to the display screen according to one of the four modes that can be set. These are:
Over Mode (Key J)
Under Mode (Key K)
Revere Mode (Key L)
Erase Mode (Key ;)
The painting area has a grid associated with it in both the x and < directions. You can set the size of the gridding. When gridding is not used, the brush can place paint anywhere in the canvas. The horizontal and vertival gridding can be used separately or together. When gridding is used, the paint is aligned on the grid boundaries. That is, the x (when horizontal gridding is used) or y (when vertical grtidding is used), or both x and y (if both horizontal and vertical gridding are used) positioning of the source shape upper left corner is forced to align with the grid boundaries. hree icons represent the gridding controls. They are:
Horizontal Grid (Key M)
A toggle for turning the horizontal grid on and off. When the grid is
on, the icon is highlighted.
Vertical Grid (Key ,)
A toggle for turning the vertical grid on and off. When the grid is
on, the icon is highlighted.
Set Gridding (Key .)
Specify the horizontal and vertical grids. The initial value of both
grids is 8 pixels. A prompter appears, first for the horizontal and
then for the vertical grid. Type the number, not to exceed the screen
width or height, followed by a carriage return key. Type only the
carriage return to keep the value shown in the prompter.
The image in the entire painting area is not saved on an external file. Rather, the current form source is saved. To save everything, select everything as the form source. When a Form is retrieved from an external file, it becomes the current form source.
Retrieve Form Source (Key ')
Change the form source to be the Form found on an external file.
A prompter appears. Type the file name followed by a carriage return key.
If no file name is given or if the name is not a well-formed file name,
a confirmer appears stating that the file name is illegal, or the file was
not found. >ou choose the menu item yes if you want to try
another file name; choose no if you want to cancel the retrieve
request. If the retrieval was unsuccessful, the form source does not
change.
Save Form Source (Key /)
Write a description of the current form source on an external file. A prompter
appears. Type the file name followed by a carriage return key. If no file name
is given, does nothing.