home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / cuaclip.zip / MAINMENU.PRG < prev    next >
Text File  |  1993-06-01  |  2KB  |  67 lines

  1. /*********************************************************************
  2.  
  3.     MainMenu.PRG - Main menu for the demo program.
  4.  
  5.     Author: Dave Rooney
  6.     Date  : Feb. 22, 1993
  7.  
  8. *********************************************************************/
  9.  
  10. #include "Demo.ch"
  11.  
  12.  
  13. FUNCTION MainMenu
  14.  
  15. LOCAL nChoice,    ; // User selection from menu
  16.         aMessages,  ; // Array storing message text
  17.         PromptList, ; // Array for the menu prompts
  18.         lExit         // Return flag
  19.  
  20. nChoice    := 0
  21. PromptList := {}
  22. lExit      := .F.
  23.  
  24. aMessages := { ;
  25.     "Browse sample source code used for this demo program", ;
  26.     "Browse the Clipper header file used for this demo program", ;
  27.     "Browse the RMake script file used for this demo program", ;
  28.     "Browse the linker script files used for this demo program", ;
  29.     "Sample of the different features of the GET system", ;
  30.     "Sample of using the event system to perform background processing", ;
  31.     "Sample of using the GET and Event systems together", ;
  32.     "Example of a simple STDBrowse", ;
  33.     "Example of a full-featured STDBrowse with a menu" }
  34.  
  35. @ 0,2 PROMPT "~Browse" ;
  36.     MESSAGE "Sample source code illustrating usage of the CUA-Clip Library" ;
  37.     PULLDOWN ;
  38.     {  { " ~Source code examples  ", aMessages[1], {|| BrowseFile( "*.PRG" ) } }, ;
  39.         { " ~Header file example   ", aMessages[2], {|| BrowseFile( "*.CH" ) } }, ;
  40.         { " ~RMake script example  ", aMessages[3], {|| BrowseFile( "*.RMK" ) } }, ;
  41.         { " ~Linker script examples", aMessages[4], {|| BrowseFile( "*.LNK" ) } }, ;
  42.         { " ~All files             ", "", {|| BrowseFile( "*.*" ) } } }
  43.  
  44. @ 0,COL() + 2 PROMPT "~Examples" ;
  45.     MESSAGE "Examples of the various features of the CUA-Clip Library" ;
  46.     PULLDOWN ;
  47.     {  { "GETs               ", aMessages[5], {|| GET_Examples(), .T. }, {|| .T. } }, ;
  48.         { "Event System       ", aMessages[6], {|| Event_Examples(), .T. }, {|| .T. } }, ;
  49.         { "GET & Event Systems", aMessages[7], {|| Combo_Examples(), .T. }, {|| .T. } }, ;
  50.         { "Simple STDBrowse   ", aMessages[8], {|| Browse_Examples(), .T. }, {|| .T. } }, ;
  51.         { "Cool STDBrowse     ", aMessages[9], {|| TheWholeThing(), .T. }, {|| .T. } } }
  52.  
  53. @ 0,COL() + 2 PROMPT "~Quit!" ;
  54.     ACTION !( lExit := .T. ) ;
  55.     MESSAGE "Exit and return to DOS"
  56.  
  57. DO WHILE !lExit
  58.     MENU TO nChoice SAVE USING LastMenu()
  59. ENDDO
  60.  
  61. RETURN lExit
  62. //
  63. // EOP: MainMenu
  64. //
  65.  
  66.  
  67.