XEROX SMENU EDITOR 2 4 1 SMENU EDITOR 1 4 Unsupported To be used with the file SMENU Super menus are much more flexible than regular menus, however this extra flexibility can translate into more work for the programmer. For example each item must be given a region, so that the smenu knows where to put the items. One problem that arises is that the person creating the smenu may not be able to visualize the actual results of the smenu declaration. Another problem arises when the programmer wishes to change something in the smenu, perhaps the shape of an individual item. For these reasons, and many others, I have developed an SMENU EDITOR. Load the SMENU EDITOR from the file SUPERMENUEDIT.DCOM. The smenu editor is invoked by the function: (EDITSMENU SMENU NEWIMAGEFLG ) [Function] This function saves the current WHENHELDFN, WHENUNHELDFN, WHENSELECTEDFN, and USERDATA from SMENU, these fields are replaced by various editor functions. The functionality SMENU is thus temporarily disabled. The prompt window is attached to The top of the editor window, and PROMPTWINDOW, is saved so that the old promptwindow can be restored. There is also a check of the USERDATA to see if this smenu is already being edited. The editor will not allow nested edits of the same smenu. The editor functions are connected to the items in SMENU, when the mouse is held down over one of the items, a pop-up menu will allow the selection of any of the editor functions. Editor choices: "ADD NEW ITEM" This function will allow the user to interactively create a new item for the smenu. The user will be prompted for all five possible item elements. If there is a question about what to input, entering "?" will cause a help string to be printed for that element. ÿÿïfÿ The LABEL can be either a string, (which will be converted to a list of atoms), something that evaluates to a list of atoms, or something that evaluates to a bitmap. This is the only element that is evaluated. ÿÿïfÿ The Function Is the function to eval on selection of this item, for example, in response to the prompt FUNCTION: (PROMPTPRINT "Just selected this item") is valid. ÿÿïfÿ The Help String is a string that is to be printed in the prompt window for this item. If the user does not input a string, makstring is called to convert it to one. ÿÿïfÿ The Region is the region for the new item. The values can be entered with or without surrounding parenthesis, but should not be quoted. Also the user may hit return, in which case a region may be swept out within the window of the smenu. ÿÿïfÿ The Font is either an expression that evaluates to a font descriptor, FITFONT, or if the user just hits , NIL (i.e. the smenu font will be used for this item). The new item will immediately be drawn, and added to the front of the ITEMS list of the smenu. "DELETE ITEM" This item will delete the selected item from the smenu. The user is asked to confirm the deletion. If it is confirmed, the item is removed from the ITEMS list, and erased from the window. The last deleted item is, however, saved on the USERDATA of the smenu, so that the last deleted item can be restored. "UNDELETE ITEM" This function will restore the last item deleted from the smenu, unless there is nothing there to restore, in which case the user will be informed of this fact, and nothing further is done. If the item is restored, it also redisplayed immediatly in the edit window. "MOVE REGION" This function allows the user to move any item freely about the smenu. The item is erased from its current location, and redrawn at the new location specified by the user. In case of intersecting regions, the function is able to restore everything in the items left behind except the border which may be partially erased with the old image. This is not serious, and can be corrected by REDRAWing the smenu. "SHAPE REGION" This selection allows the user to reshape any item that contains text, (bitmaps cannot be reshaped from the editor). The user may move the region at the same time, however as in MOVE REGION, you are required to stay within the current smenu. If the FONT for the item is FITFONT, the size of the text will also be readjusted. "REDRAW SMENU" clears the window for the smenu editor and redisplays all of the items in SMENU. "RESHAPE SMENU" Will allow the user to sweep out a new region for the smenu.The new region is not allowed to be any smaller than the size needed to fit the items in their current regions, but can be made as large as one likes. "INSPECT SMENU" Will call the inspector on SMENU. This allows the programmer to change other fields such as SMENUBORDERSIZE etc. The inspector can also be used to DEdit particular fields of SMENU. "EXIT SMENU EDITOR" This selection will re-enable the SMENU, restore the prompt, and close the editor window. The smenu will now function correctly, and is ready to be used.(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È (È(È (ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD(MODERN MODERN MODERN MODERNLOGOMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  K8-1Ë쬭 9 ±VRÛÁª Uzº