#========================================================================== # D I S P L A Y O P S # # These operations set up the necessary global variables to create the # display screen. Displaymainpanel is meant for the master roster display # panel, whereas Displaypanel sets up the screen of rosters and operations. #========================================================================== displaypanel IS OP rostername rosterval windowlist{ NONLOCAL goto selectby cando mainwindow ; clearscreen; roster_index := rostername EACHRIGHT = EACH first menulist; menus := first . roster_index sublist menulist; goto selectby cando := rest menus; mainwindow := nialtochar rosterval; init_windows windowlist; writefixedpart rostername; display_windows windowlist; windowlist } displaymainpanel IS OP windowlist{ clearscreen; writefixedpart "MASTER ; windowlist } #========================================================================== # Main sets up the master roster display panel and enters into a loop # that handles user selections within the display panels. Main calls # movecursor which handles cursor movements and other keystrokes and # returns a code indicating whether a selection or exit was made. If # an exit was made, exitquery is called, otherwise, one of the four # menu modules is called, depending on the current active window. # # updatecursor "m returns the cursor to the top of the screen # current_wlist returns the windows and rosters # #========================================================================== exitquery IS EXTERNAL OPERATION master IS EXTERNAL VARIABLE main IS OP Rosters path { NONLOCAL Current_wlist Current_panel; Current_panel := master; Current_wlist := displaymainpanel Mainpanel; updatecursor "m; Returncode := "go; WHILE Returncode ~= "exit DO Returncode := Movecursor; CASE Returncode FROM "select : Current_offset := (cursor_row This_window); CASE window_textname This_window FROM "mainmenu : mainmenu_module Rosters Current_offset; END "goto : goto_module Current_offset; END "selectby : selectby_module path Current_offset; END "cando : cando_module rosters path Current_offset; END ENDCASE; END "exit : loaddefs "rvexit; IF not exitquery path THEN erase "exitquery; Returncode := "go; ENDIF; END ENDCASE ; ENDWHILE ; setwindow Null ; setwidth 79 ; }