8. Input
Input in Sil normally causes some action to take place. Objects may be moved, added, or deleted. It is important to remember than all of the commands involving objects work across window boundaries. An object in one window may be copied to another, moved to another, or used to define a macro in another. Conversely, if you set default parameters for Sil (such as the current font, or the grid spacing), those parameters are set for your current window only. Thus, for example, you may have two windows open: one of which is magnified and accepting strings in Helvetica10 - the other of which is not magnified and is accepting strings in italic Helvetica7.
8.1 Mouse Input
Sil users call clicking the left button mark, clicking the middle button draw, and clicking the right button select. Actions occur when the button is depressed, not when it is released.
Clicking the mouse buttons, sometimes while holding down the control and/or shift keys, have the following meanings:
mark: Move the mark to the current cursor position. (There is only one mark for all Sil windows.)
shift-mark: Move the origin to the current position. (There is only one origin for all Sil windows.)
control-mark: Move the mark to the current cursor position, then move all selected objects so that their origin is at the mark, selects the objects which were moved, and deselects any previously selected objects. This command is equivalent to mark-^X (see Keyboard Input, below).
control/shift-mark: Same as control-mark except that any attached lines are not stretched (see Keyboard Input, below).
draw: Draw a line between the mark and the current cursor position. The line will be horizontal if the difference between the y-coordinates is less than that of the x-coordinates, otherwise it will be vertical. The mark is moved to the end of the new line closest to the cursor, the line becomes selected, any previously selected objects are deselected, and the origin is moved to the upper left corner of the new line.
control-draw: Moves the mark to the current cursor position, then copies all selected objects such that their origin is at the mark. It then selects all copied items, and deselects any previously selected objects. This command is equivalent to mark-^C (see Keyboard Input, below).
shift-draw: Deletes just the item pointed to, not the selected items.
control/shift-draw: Undeletes and selects the set of objects last deleted with shift-draw or ^D (see Keyboard Input, below).
select: The object at which the cursor is pointing is selected, any previously selected objects are deselected, and the origin is moved to the upper left corner of the selected object. When objects overlap, the object with the smallest bounding box is selected. If there are no objects of any type under the cursor, nothing is selected, and the origin is moved to the cursor.
control-select: Same as select, except that previously selected objects are not deselected.
shift-select: Selects all objects which lie fully within the rectangular area bounded by the current cursor position and the mark. The origin is moved to the upper left corner of the selected area, and all previously selected objects are deselected.
control/shift-select: Deselects the item pointed to while leaving the origin at its current location.
8.2 Keyboard Input
In general, control characters initiate Sil commands in the current Sil window, and non-control characters are are added to the current Sil window as text.
8.2.1 Adding strings
Strings in the current font and face are added to the picture at the mark. Strings are terminated by typing carriage return or ESC, or by depressing any mouse button. Remember that each string is a separate object.
While inputting a string, before it is terminated (or when using the BS command, described below), you can use the following characters to edit it:
BS: Backspace one character.
^A: Backspace one character.
^W: Backspace one word.
^Q: Backspace the entire string, but continue accepting characters in the old strings font and face.
DEL: Backspace the entire string, and any further characters accepted will be in the default font and face.
8.2.2 Executing commands
While single control characters initiate Sil commands, sometimes the full command involves the input of some additional characters or file names. In these cases the message window will prompt you for further input. In a couple of instances, special meaning is attributed if the Control and Shift keys are held down simultaneously when the control key is typed. The notation used for this will be ^shA ('control shift A'). The commands are:
^A: Alternate fonts. Toggles font used for display between normal display fonts and printing fonts. Gives the effect of a "look Hardcopy" command.
^B: Draws a rectangular box. The mark and the origin define opposite corners of the box. The box is selected, previously selected objects are deselected, and the origin is moved to the upper left corner of the box. Sil will complain if you try to draw a box across window boundaries.
^shB: Draws a rectangular background box. The mark and the origin define the corners of the area. This command is useful in creating colored drawings.
^
C: Copies all selected items and positions them away from the original items by the offset of the mark from the origin. The copy is selected, and previously selected items are deselected. The origin is moved to the mark.
Sil will complain if you try to copy objects that use macro definitions that are undefined in the destination window. Also, if you copy an object from one window to another and the macro definitions are different in the two windows, the appearance of the object will be different in the two windows.
^D: Deletes all selected items from the picture. Objects are not immediately lost, but are marked as deleted 'level 1' and no longer displayed. All objects already marked deleted have their level incremented by 1. When objects exceed level 5 they are discarded.
^E: Expands the rectangular area defined by the two preceding marks so that it fills the screen (as nearly as possible). The magnification factor (2-9) is shown in the status line. A second ^E returns to normal magnification.
^
Fn: Sets the current font, face, or color according to the following table
n=0-9: Font = n.
n=b/i set font face to bold or italic respectively
n=B/I set font face to not bold or not italic respectively
n=D,R,O,Y,L,G,T,C,A,V,U,M,P,S,N,W
set color to DarkBrown, Red, Orange, Yellow, Lime, Green, Turquoise, Cyan, Aqua, Violet, Ultaviolet, Magenta, Pink, Smoke, Neutral (black), or White respectively.
All new items are created according to these parameters as appropriate.
^Gn: Sets the current grid to 2**n (n=0-9).
^Hc: Expands the macro c and puts its upper left corner at the mark. Macros within the macro c will not be expanded if the MX flag is true. The ^N command complements this flag (i.e. makes it false, displaying "F").
^I: Input. When ^I is done, the message "Input File: " is displayed, and the user is expected to enter a filename. If any previous input or output has been done, the previous filename is displayed. If it is the desired file, a carriage return or ESC confirms it. If not, simply type the new filename or edit the existing filename with ^Q, BS, or DEL (to abort input). All objects in the named file will be added to the picture relative to absolute [0, 0] of the Sil coordinate system.
^shI: Input Relative. When ^shI is done, the same function as a ^I is performed with one important exception: input files are positioned relative to the mark at the time ^shI is performed, instead of relative to absolute [0, 0].
^J: "Jam" new text font, face, or color into all selected items. This allows the user to change all selected items to a new font, face, or color. Font and Face apply only to fonts 0, 1, 2, or 3.
^K: This command ("kill") clears the screen so you may start on a new drawing without leaving Sil. You will be asked to confirm with a carriage return if you made any changes since your last Output command.
^
Lc: Defines the macro c (in font 4) to be the collection of currently selected items (if there are no selections, or if c is a control character, the command is aborted). The reference point for the macro is its upper left corner, except that macro definitions are forced to fall on a grid of 4 screen units.
First, the definition is checked to ensure that none of the objects are the macro c itself. Such a definition would destroy Sil when an attempt was made to display the macro - the message "Bad Macro Definition" is output and the command is aborted. If all is well, you may be asked to confirm with a CR. If confirmation is given, the macro is defined.
^M (CR): The mark is moved down by an amount determined by the ^Y command.
^N: Complement the MX flag, which controls the depth of macro expansion.
^O Output: A filename is requested as for ^I, and the macro definitions and picture are written on the file in large format. If you supply no extension ".lsil" will be assumed.
^P: Put All: A filename is requested as for ^O, and the macro definitions and picture are written on the file in Alto Sil format. Objects outside the maximum boundaries of Alto Sil pictures will be thrown away. If you supply no extension ".sil" will be assumed.
^shP Put: A filename is requested as for ^O, and the macro definitions and picture are written on the file in Alto Sil format. Objects outside the normal boundaries of Alto Sil pictures will be thrown away. If you supply no extension ".sil" will be assumed.
^Q: This command displays the message "Use viewer Destroy button to Quit" in the Cedar message window.
^R: This command requests confirmation and then deletes all macro definitions. It is used to edit macro libraries.
^S: Show Cursor: all the screen bitmap that will fit into a cursor is copied from the screen, with upper left corner defined by the origin's position. There must be at least one selected object for ^S to affect the cursor. Subsequent copy and move commands may use this new cursor for accurately positioning selected objects. Any command other than move or copy will restore the cursor to the normal arrow. Stretching is turned off when ^S is in effect.
^T: Turns on (or off) an array of single point "ticks", which may be used as a positioning aid. The ticks are on a sixteen screen unit grid.
^shT: Turns on (or off) an array of picture frames which define the disjoint areas that will appear on separate pages when hardcopy is requested. These frames assume an 8.5 inch by 11.0 inch page size. Pictures which are not bounded by these frames will be printed on multiple pages with 0.25 inch overlaps on all edges.
^U: Undeletes and selects the set of objects last deleted with ^D or shift-draw, after deselecting any previously selected objects. This works for up to five levels, at which point there are no more objects to undelete.
^Vn: View has two distinct modes as follows:
For n= 4-9, a line of text enumerating the macros currently defined in that font will be shown in the message window. For n= 0-3, b,i,B,I, or color, all items with match the indicated parameter are selected (thus making it easy to jam a new parameter).
^shVn: only has meaning for n= 0-3, b,i,B,I, or color. In this case, items left selected are a subset of those selected before the command is issued. As an example, ^V0 ^shVR will select only those items which are font 0 and Red.
^Wn: Sets the line width (n=1 to 9).
^
X Move (translate): All selected objects are moved so that the origin is at the mark, then the positions of the origin and the mark are interchanged (so that another ^X puts things back the way they were).
As a feature, if the selected objects are thought of as defining a rectangular window, and if they are moved in X or Y only (not diagonally), the endpoints of any lines which cross the window boundary are moved (by shortening or lengthening the line) so that the endpoints have the same relation to the selected objects as in the original view. If the line would be shortened to zero or a negative length, or if it is fully in the window but not selected, it is not modified. This feature is handy for moving rows of components in a logic diagram or adjusting the boundaries of a form. This feature is turned off by ^shX.
Sil will complain if you try to move objects that use macro definitions that are undefined in the destination window. Also, if you move an object from one window to another and the macro definitions are different in the two windows, the appearance of the object will be different in the two windows.
^Y: This command toggles the ylock flag. At the time ylock is set (changed from "F" to "T" by the ^Y command), the difference between the Y coordinates of the mark and the origin is saved as yinc. When subsequent carriage returns are typed, the mark is moved by a distance determined by the height of the last object put into the picture (if ylock is false) or by the distance yinc (if ylock is true). Note that this is a signed difference, so that setting ylock can cause the mark to move up instead of down.
^
Zn: This command asks for a device and filename in order to produce a device-specific hard copy file (an Interpress or Press file). Sil determines the device according the following table
n=R: device is Raven/300.
n=H device is Hornet = Raven/384
n=M device is plateMaker
n=U device is Puffin
n=C device is ColorVersatec
n=D device is Dover => Press file.
It is most likely that you will want to choose a Hornet for your device, as that is how CSL Ravens are configured. After you have produced the file you can send it to a Press printer by using Tsetter, or run a conversion package to translate an Interpress file into a PD file and then send it to a PD printer.
BS: This command (the BackSpace key) allows you to modify an existing text string. You must have exactly one item selected on the screen that is in fonts 0 through 9. This item will then be "opened up" the first time you hit the BS key. You then modify the contents of the item by appending characters, backspacing characters (the BS key or ^A with its normal meaning), backspacing words (^W), or by clearing the line (^Q) and starting again. Leaving this mode with the DEL key will return the original string. Besides the obvious advantages for editing the end of the string, you can use this command to replace an item with a new one having the same font, face, and color.
^← This command causes the BiScrollers transformations to be reset and the viewer to be centered at the mark. It is like a ResetAndCenter except that the centering is done over the mark instead of the geometric center of the drawing. See the Fit transformation, above.
Shift-Shift-Swat This command is not unique to Sil; it is the Emergency SaveAllEdits command in the Viewers package. If your Cedar world dies with unsaved viewers, including Sil viewers, invoking Shift-Shift-Swat (also known as Shift-Shift-Spare3) will make a heroic effort to save all edited viewers. If you execute an emergency save before a normal save of a Sil viewer, the saved file(s) will appear in the root directory with a name like "SilNoNameX.LSil", where X is a unique number.