envos QEdit 2 4 1 QEdit 1 4 By: Johannes A. G. M. Koomen (Koomen.wbst@Xerox or Koomen@CS.Rochester.edu) This document last edited on January 22, 1988 INTRODUCTION QEdit is a facility for editing queues, which are ordered lists containing arbitrary objects. QEdit provides facilities for reordering, editing and deleting current queue entries, and inserting new entries. A QEditor looks like this: K````````````````   "@ @ 8'GŇ `A"H""H@&H `1"O>DH@$O  "H H@$H  " $H@"$H p!'0G ?s?m߇mamZom9q````````|@`@ F-[`xI6i `O$I`DH$I`8G$I````````$bF` $I` $O` ,`4sG``````````` `>` $  ` <` ` 0"`````````````  `` $`>````````````` "` ` ` "``````````@``G`H"`F`A`N `>````````````8`````````````` Clicking the left mouse button over a queue entry makes it the current selection. You can then select a QEdit menu operation. QEdit returns with the original list if aborted, or a new list upon normal exit. Selecting an entry that is not entirely visible causes the display to scroll until it is. DETAILS (QEDIT QUEUE PROPS) [Function] Invokes a QEditor on QUEUE. Returns QUEUE if aborted, a new list otherwise. The PROPS argument is a property list which serves to customize the behavior of QEDIT for this particular invocation. Currently defined props are listed below. <% [QEdit command] Moves the current selection forward, i.e., switches the current selection and the queue entry just before it. %> [QEdit command] Moves the current selection backward, i.e., switches the current selection and the queue entry just after it. Insert [QEdit command] Inserts a new entry in front of the current selection, provided PROPS contained an INSERTFN. Edit [QEdit command] Edits the current selection, provided PROPS contained an EDITFN. Delete [QEdit command] Deletes the current selection, provided PROPS contained a DELETEFN. Abort [QEdit command] Aborts the current QEdit session, returning the original queue. Done [QEdit command] Ends the current QEdit session, returning a new list containing the current queue entries. TITLE [QEdit property] If supplied, its value becomes the title for the QEdit window. CONTEXT [QEdit property] The value of the CONTEXT property is passed to the functions below as an extra argument. It does not affect QEdit directly. The functions below can also obtain the current queue by calling the function QEDIT.CURRENT.QUEUE (see below). LABELFN [QEdit property] If supplied, its value is a function which, when invoked on a queue entry and the user context, returns a label to use for displaying the queue entry. If not supplied, QEdit displays the queue entry itself. LABELFONT [QEdit property] If supplied, its value is a font specification for displaying the queue entry. INSERTFN [QEdit property] If supplied, its value is a function which, when invoked on the user context, returns either NIL or a new element to be inserted in front of the current selection (at the front of the queue, if there is no current selection). If not supplied, no elements can be inserted into the queue. EDITFN [QEdit property] If supplied, its value is a function which, when invoked on a queue entry and the user context, returns either NIL or a (possibly new) entry to be used instead of the current selection. DELETEFN [QEdit property] If supplied, its value is a function which, when invoked on a queue entry and the user context, returns NIL if the entry should not be deleted. If not supplied, no elements can be deleted. Hint: the function TRUE always returns T. (QEDIT.CURRENT.QUEUE) [Function] Invoked from one of the above mentioned functions, returns the queue being edited in its current form. The INSERTFN might use this, for example, if duplicates are not allowed. (QEDIT.RESET) [Function] QEdit will reuse QEditors upon reinvocation. This function will throw away any known but currently inactive QEditors. Useful if you wish to change the default QEdit props. *QEDITPROPS* [QEdit variable] Any props not explicitly supplied in the call to the function QEDIT are taken from this free variable. Its initial value is (TITLE "Queue Editor" LABELFONT (HELVETICA 8)) Examples (QEDIT '(This is a test queue)) [Function] Brings up a QEditor as shown above. Queue elements can be rearranged, but not added to, edited or deleted. (QEDIT '(This is a test queue) '(INSERTFN READ DELETEFN TRUE)) [Function] Brings up a QEditor as shown above. Queue elements can be rearranged, inserted or deleted, but not edited.(LIST ((PAGE NIL (PAPERSIZE LETTER FOLIOINFO (ARABIC "" "") STARTINGPAGE# 223) (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 NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) 3T222 5 ,,8,8H PAGEHEADING RUNNINGHEAD CLASSICCLASSICCLASSIC HELVETICA MODERN MODERN MODERN MODERNMODERN    HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN O/  BMOBJ.GETFN3MODERN -    ( op@ & ( @[? P!    f/5 mA k+z