#========================================================================= # Operations which aid in displaying text either in the comments field # or in the roster display window. #========================================================================= cursor_row IS EXTERNAL VARIABLE #========================================================================= # Sets the comment window and writes the comment in. Requires a # carriage return to continue. #========================================================================= comments IS OP comment { setwindow (comorigin)(statusrow comwidth) (topscreen)(topscreen); answer := trimblanks readscreen (string comment); puttext (topscreen)(origin)(comwidth reshape ' '); answer } #========================================================================= # Operation to change the roster data and data structure to a list of # strings for display in editwindow. Using the global variable # "cursor_row" to determine the head display, this operation can create # the strings equivalent to doing a report or a fullreport on the roster. # Nialtochar also makes use of the displayers to display the units of the # roster in their intended form. #========================================================================= nialtochar IS OP R { divider := cursor_row - 1; IF cursor_row = 7 THEN harray := null; headarray := head R; FOR next WITH headarray DO harray := harray link solitary post next; ENDFOR; ELSEIF cursor_row = 3 THEN harray := EACH solitary labels R; ENDIF; IF tallynotes R = 0 THEN rows picture harray ELSE carray := null; fnarray := makenotes body R; FOR note WITH fnarray DO newnote := null; FOR index WITH grid note DO IF (index pick note) = ?noexpr THEN newnote := newnote link solitary null; ELSE newnote := newnote link solitary ((index pick displayers R) apply (index pick note)); ENDIF; ENDFOR; carray := carray append newnote; ENDFOR; strings := rows picture . mix ((solitary harray) link carray); addrs := tell tally strings except (divider pick strings findall strings except divider); addrs choose strings ENDIF } #========================================================================= # Sets the roster display window, calls Nialtochar to change the current # roster to strings, and displays the roster in report or fullreport # form depending on the value of "cursor_row" (3 or 7). Then # returns to the last menu accessed. Used when an operation changes # the look of the roster display. #========================================================================= calculatedisplay IS OP R { NONLOCAL rosterstrings cursor_row; setwindow ((rostrow rostcol)(rostheight rostwidth) link rosterscreen link (phrase 'CURRENT ROSTER')); rosterstrings := nialtochar R; result := editwindow (rosterstrings)(origin)(cursor_row 0)("view_mode "quit); result @@ 4 := `n } #========================================================================= # Sets the roster display window and puts the rosterstrings that were # last calculated into the window. Leaves the cursor in the roster # display window in view mode. Used by nextwindow when moving from the # menus to the roster display window. #========================================================================= replacedisplay IS { setwindow ((rostrow rostcol)(rostheight rostwidth) link rosterscreen link (phrase 'CURRENT ROSTER')); editwindow (rosterstrings)(origin)(cursor_row 0)("view_mode) } #========================================================================= # Sets the roster display window and puts the rosterstrings that were # last calculated into the window. Returns to the last menu accessed. # Used when an operation completes without changing the roster display. #========================================================================= replace&exit IS { setwindow ((rostrow rostcol)(rostheight rostwidth) link rosterscreen link (phrase 'CURRENT ROSTER')); result := editwindow (rosterstrings)(origin)(cursor_row 0)("view_mode "quit); result @@ 4 := `n }