From:	ADVAX::"FILESERV@Dayton.SAIC.COM"  5-APR-1991 07:05:36.05
To:	ARISIA::EVERHART
CC:	
Subj:	NEWS_V60-3_PATCH.21

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Fri, 5 Apr 91 07:03:09 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA24968 for ; Fri, 5 Apr 91 06:34:50 -0500
From: FILESERV-Mgr@Dayton.SAIC.COM
Received: from dayva.dayton.saic.com by mcnc.mcnc.org (5.59/MCNC/3-21-91)
	id AA02725; Thu, 4 Apr 91 18:27:11 -0500
	for ARISIA.dnet.ge.com!EVERHART
Message-Id: <9104042327.AA02725@mcnc.mcnc.org>
Received: by Dayton.SAIC.COM (MX V2.2-2) id 4822; Thu, 04 Apr 1991 18:26:05 EST
Date: Thu, 04 Apr 1991 18:26:05 EST
Reply-To: FILESERV@Dayton.SAIC.COM
Subject: NEWS_V60-3_PATCH.21
To: ARISIA::EVERHART
 
-+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
X        option_count < to_be_drawn->number_of_options ;/* been pressed */
X        option_count++ ) `7B
X    if ( to_be_drawn->option`5B option_count `5D.quick_key_value == terminat
Vor ) `7B `20
X      while (levels_down) `7B`20
X        --levels_down;
X        smg$begin_pasteboard_update( &pid );`20
X        `7D;
X      return( option_count ) ;
X      `7D;
X  `7D;
X  if ( terminator == KEY_RIGHT_ARROW ) current_option += 1;`20
X  if ( terminator == KEY_LEFT_ARROW ) current_option -= 1;`20
X
X  if ( terminator == KEY_DOWN_ARROW ) `7B`20
X    while (levels_down) `7B`20
X      --levels_down;
X      smg$begin_pasteboard_update( &pid );`20
X      `7D;
X    if ( news_context == 3 ) `7B /* level three is special case */
X      saved_option = current_option;
X      return( level_3_down );                        `20
X      `7D;
X    smg$begin_pasteboard_update( &pid );                         `20
X    do_parse("DOWN 1\0"); /* this command for levels 1 and 2 */
X    smg$end_pasteboard_update( &pid );                         `20
X    levels_down = 0;
X    if (!( smg$end_pasteboard_update( &pid ) == SMG$_BATWASOFF ) )`7B`20
X      ++levels_down;
X      while(  smg$end_pasteboard_update( &pid )== SMG$_BATSTIPRO ) levels_do
Vwn++;
X      `7D; /* restore batching level */
X    `7D;
X
X  if ( terminator == KEY_UP_ARROW ) `7B`20
X    while (levels_down) `7B`20
X      --levels_down;
X      smg$begin_pasteboard_update( &pid );`20
X      `7D;                        `20
X    if ( news_context == 3 ) `7B /* level three is special case */
X      saved_option = current_option;
X      return( level_3_up );
X      `7D;
X    smg$begin_pasteboard_update( &pid );`20
X    do_parse("UP 1\0"); /* this command for level 1 and 2 */
X    smg$end_pasteboard_update( &pid );`20
X    levels_down = 0;
X    if (!( smg$end_pasteboard_update( &pid ) == SMG$_BATWASOFF ) )`7B`20
X      ++levels_down;
X      while(  smg$end_pasteboard_update( &pid )== SMG$_BATSTIPRO ) levels_do
Vwn++;
X      `7D;
X    `7D;
X
X  if ( terminator == KEY_PAGE_DOWN ) `7B`20
X    while (levels_down) `7B`20
X      --levels_down;
X      smg$begin_pasteboard_update( &pid );`20
X      `7D;                        `20
X    if ( news_context == 3 ) `7B
X      saved_option = current_option;
X      return( level_3_page_down );
X      `7D;
X    smg$begin_pasteboard_update( &pid );                         `20
X    do_parse("DOWN 18\0");
X    smg$end_pasteboard_update( &pid );                         `20
X    levels_down = 0;
X    if (!( smg$end_pasteboard_update( &pid ) == SMG$_BATWASOFF ) )`7B`20
X      ++levels_down;
X      while(  smg$end_pasteboard_update( &pid )== SMG$_BATSTIPRO ) levels_do
Vwn++;
X      `7D;
X    `7D;
X
X  if ( terminator == KEY_HELP ) `7B`20
X    char help_command`5B250`5D;
X    clear_err_line();`20
X    smg$end_display_update( &trailer_vd );
X    strcpy( help_command , "HELP "); /* compose help command */
X    strcat( help_command , to_be_drawn->option`5B current_option `5D.resulta
Vnt_command );
X    while (levels_down) `7B
X      --levels_down;
X      smg$begin_pasteboard_update( &pid );`20
X      `7D;                        `20
X    smg$begin_pasteboard_update( &pid );/* restore batching level */
V             `20
X    do_parse( help_command ); /* execute help command */
X    smg$end_pasteboard_update( &pid );               `20
X    smg$put_chars( &trailer_vd , c$dsc("NEWS> "), c$rfi(1), c$rfi(1) );/*tid
Vy*/  `20
X    smg$erase_line( &trailer_vd , c$rfi(2) , c$rfi(1) );              /*scre
Ven*/
X    smg$repaste_virtual_display( &trailer_vd , &pid , c$rfi( devrow - 2 ) ,
V c$rfi(1) );
X    smg$repaste_virtual_display( &my_pb , &pid , c$rfi(devrow-1) , c$rfi(1)
V );
X    levels_down = 0;
X    if (!( smg$end_pasteboard_update( &pid ) == SMG$_BATWASOFF ) )`7B`20
X      ++levels_down;
X      while(  smg$end_pasteboard_update( &pid )== SMG$_BATSTIPRO ) levels_do
Vwn++;
X      `7D;/* turn off batching */
X    `7D;
X
X  if ( terminator == KEY_PAGE_UP ) `7B`20
X    while (levels_down) `7B
X    --levels_down;
X    smg$begin_pasteboard_update( &pid );`20
X    `7D
X    if ( news_context == 3 ) `7B
X      saved_option = current_option;
X      return( level_3_page_up );
X      `7D;
X  smg$begin_pasteboard_update( &pid );                         `20
X  do_parse("UP 18\0");
X  smg$end_pasteboard_update( &pid );`20
X  levels_down = 0;
X  if (!( smg$end_pasteboard_update( &pid ) == SMG$_BATWASOFF ) ) `7B
X    ++levels_down;
X    while(  smg$end_pasteboard_update( &pid )== SMG$_BATSTIPRO ) levels_down
V++;
X    `7D;
X  `7D;
X
X  if (terminator == KEY_ABORT ) `7B /* user wants to quit menu without makin
Vg a*/`20
X    while (levels_down) `7B         /* selection */
X      --levels_down;
X      smg$begin_pasteboard_update( &pid );`20
X      `7D;
X    return( escape_option ) ;
X    `7D;
X
X  if (terminator == KEY_RETURN ) `7B /* user has made choice */
X    while (levels_down) `7B
X      --levels_down;
X      smg$begin_pasteboard_update( &pid );`20
X      `7D;
X    return( current_option ) ;
X    `7D;
X
X
X  if (current_option < 0 )
X#ifdef menu_wrap
X     current_option = to_be_drawn->number_of_options - 1; /* loop around */
X#endif
X#ifdef menu_nowrap
X     current_option = 0; /* do not move bar past end */
X#endif
X
X  if (current_option >= to_be_drawn->number_of_options )
X#ifdef menu_nowrap
X     current_option = to_be_drawn->number_of_options - 1; /* stop at end */
X#endif
X#ifdef menu_wrap
X     current_option = 0;  /* loop around */
X#endif
X
X
X  `7D; /* for loop */
X`7D; /* function */
X`0C
X
X
X/* initialise_menu
X *
X * This function initialises the menus and displays a message announcing
X * their existence.
X *
X */
Xinitialise_menus()
X`7B
X
XSMG$CREATE_VIRTUAL_DISPLAY( c$rfi(menu_rows) , c$rfi(devcol) ,`20
X                            &my_pb , 0 , 0 , 0 );
Xsmg$put_chars( &trailer_vd , c$dsc(" Waikato Menus - Press F11 at NEWS> prom
Vpt"),
X              c$rfi(3),c$rfi(38) );
X`7D;
X`0C
X
X
X/* auto_restarting
X *
X * This function returns true if the menu will be automatically restarting
X * at level 3, false otherwise.
X *
X */
X
Xint auto_restarting()
X`7B
Xif ( auto_restart ) return( 1 );
Xelse return( 0 );
X`7D;
$ CALL UNPACK NEWSMENU.C;3 708521091
$ create 'f'
X#define menu_escape_pressed "--escape pressed--\0"
X#define escape_option -2
$ CALL UNPACK NEWSMENU.H;1 392369600
$ v=f$verify(v)
$ EXIT
