NOTEPAD documentationD. Austin Henderson, Jr.Last revised: April 25, 1983NOTEPAD (and .DCOM, .BRAVO, .PRESS) is a package for creating NOTEPADwindows - windows in which one can do artwork at the bitmap level. The ideas in this packagecome pretty directly from other people's work, both inside and outside Xerox, including Markup,Draw and Smalltalk. Notepad as it stands is the product of about a man-week of work, usingstandard Interlisp-D as released and the EDITBITMAP package of bitmap manipulation functions.It provides a nearly unusable interface to some distinctly interesting functionality. Comments andsuggestions are welcomed.NOTEPAD (BITMAP COLORFLG)Creates a NOTEPAD window. If BITMAP is NIL, then you are prompted for region for thewindow. Otherwise, a region is defined from the size of BITMAP, and you are prompted to move itto a desired position. If COLORFLG is non-NIL, the NOTEPAD window will be used only forcontrol (for menu's, etc.), and all the painting will take place on the color screen.There are two menus: one in the title of the window, and one in the window proper. Both areinvoked by buttoning with either left or middle buttons.Title menuThis menu gives access to commands for manipulating the window as a whole:New NotepadCopy NotepadSave as a bitmap.Window menuThis menu has two columns of commands: those in the left column of the menu are forpainting/erasing material into/from the bitmap (if this menu is invoked with the left button,painting is implied; if with the middle button, erasing); those in the right column of the menu arefor changing the style in which the operations work. Painting/ErasingYou can paint/erase using trajectories, or using (or editing) single objects. The commands in the leftcolumn of the menu are divided into two sets which reflect rthis division.TrajectoriesSketch: follows the mouse to define a trajectory of points at which to sketch. bp _q ]( Xxpqpqpqpq" V\ T T R? P;" N hN| \NrqE L H|p E qP C&9 A.%2 ?AU ;!;x ;8;x N; 98 5xp 2qJ0 .* ,< 'p $aq/$ " "s,! ?$ A /p qfr 4f J fp  qHz =V2Line: prompts for endpoints (fix and rubberband) and uses the points on the line as a trajectory.Circle: prompts for center and a point on the circumference, and uses the points on the line as atrajectory.Ellipse: prompts for center, end of semi-major axis and end of semi-minor axis, and uses the pointson the line as a trajectory.Open curve: prompts for first point and one or more subsequent points. You indicate that you arefinished by depressing the left shift key on the last point defining the curve. A smooth curve isfitted through these points and used as a trajectory.Closed curve: Like open curve, except that the fitted curve is closed, starting at the last point given,and proceeding to the first and then subsequent points.Objects/editingText: prompts for text, and permits positioning it with the mouse.Area of the screen: Prompts for a (rectangular) region of the screen and places permits placing themwhere you want in the window.Shade rectangle: prompts for a region, and paints/erases it with the current shade (a shade of blackdoes complete paint and erase).Fill: Prompts for a region within which to fill, and a point within the area to be filled; fills the area(not necessarily a rectangle, but defined by being closed rectilinearly) with the current shade. Edit area: prompts for a region of the window and invokes the (Trillium) bitmap editor (standardInterlisp-D bitmap editor is the "hand-edit" choice on the submenu; others allow reflecting,rotating, shifting, inverting, putting on borders, etc.) on it. If the bitmap resulting from the edit isthe same size as the original, it replaces the original region; if not, you are promtped for a place toput it.StyleNotepad operations (see above) are carried out in a style. The style at any given moment is givenby a collection of characteristics. The current style can be saved (use the command SAVE.STYLE)under a name and restored (RESTORE.STYLE). Styles may be deleted (DELETE.STYLE) fromthe collection of saved styles. The style collection is currently part of notepad. Consequently,moving styles between loadups is not directly supported. (It is always possibole to save it on aseparate file. The styles are stored as the value of NOTEPAD.STYLES. It includes bitmaps, andmsut therefore be added as an UGLYVARS.)The characteristics in the style are:Brush: A bitmap which is either painted or erased at each point on or resulting from (seesymmetry) a trajectory (see the operations paint, line, circle, ellipse). DEFINE.BRUSH prompts forNfq ab= ^U^? \ XYLG W^ SS I QH P5 LGL V J7 FHp BBq> ? ?d ? 3?dR =v 9 y: H 8 4M4C" 22. ./DW -V6& +iJ ){_ ' #$p qD K 8  R X  G ( % { ;A ML =](3a region which will then become the brush. EDIT.BRUSH permits editing of the brush bitmap(using the same editor as the operation EDIT.AREA - see above).BRUSH=COOKIE.CUT.WITH.MASK also defines a brush (see mask, below).Use mask: An indication of whether of not to use the masking function (see mask, below) beforepainting/erasing. USE.MASK toggles this setting.Mask: A bitmap which is used to clear out an area before the brush is used. The mask is erased ifthe brush is painting, and visa-versa. DEFINE.MASK prompts for a region which will then becomethe mask. EDIT.MASK permits editing of the mask bitmap (using the same editor as the operationEDIT.AREA - see above). MASK=OUTLINE.OF.BRUSH defines the mask to be the same size asthe brush, with a pattern (of black) which is the filled-in outline of the brush.BRUSH=COOKIE.CUT.WITH.MASK allows you to move the mask over a section of the windowand define the brush as the points so covered.Use grid: An indication of whether of not to use the gridding function (see grid, below) whilepainting/erasing. USE.GRID toggles this setting.Grid: An origin and the point (1, 1) of a grid to be used to "attract" the points used in following atrajectory. DEFINE.GRID prompts for the origin and (1, 1) point of the grid.Use symmetry: An indication of what sort of symmetry function to use while painting/erasing.USE.SYMMETRY permits setting it as you choose. The choices are none, left/right, up/down, 4-fold (both left/right and up/down) and 8-fold (4-fold plus reflecting about the 45-degree diagonals).The brush/mask used when painting/erasing symmetrically can themselves be either identical to thebrush/mask in use or symmetrically reflected. USE.SYMMETRIC.BRUSH/MASK toggles thissetting.Point of symmetry: The point with respect to which the symmetry functions are defined.POINT.OF.SYMMETRY prompts for this point.Text font: The font in which text is printed. DEFINE.FONT permits choosing one of the fontsalready loaded or OTHER (in which case you can type in the font description (family size face)).Shade: The shade used for the rectangle and fill operations. EDIT.SHADE permits you to edit theshade (using the standard Interlisp-D shade editor).Nfq bQ `07 ^BB ZyZB X0 U9UpZ SU QC OM M|}8 K; I. FcFk(. D}0 @A -4 ?L ;T; 8 9P 7E 5a 3"1 2 .= B.. ,) ()4 E 'FO #}#B !4 !=Fl TIMESROMAN  TIMESROMAN  TIMESROMAN   j/y notepad.bRAVO AHenderson.PAApril 25, 1983 5:00 PM