home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / source / winobj / winmenu.hpp < prev    next >
C/C++ Source or Header  |  1991-01-09  |  1KB  |  36 lines

  1. // Copyright 1991 (c),   Lake View Software
  2. //                       4321 Harborough Rd.
  3. //                       Columbus, OH 43220
  4. #include "winobj.hpp"
  5.  
  6. struct Selection
  7. {
  8.     char *str;      // selectoin string
  9.     int y,x;        // position
  10.     int ret_val;    // return value
  11.     char *message;  //
  12.     Selection *Next,*Prev;
  13. };
  14.  
  15. class WinMenu:public WinObj
  16. {
  17.     protected:
  18.         Selection *First,*Last,*Current;
  19.         int selections;
  20.         int bar_attr;
  21.         int m_line;
  22.         int m_attr;
  23.         WinObj *m_win;
  24.     public:
  25.         WinMenu();
  26.         ~WinMenu();
  27.         int prompt(int y,int x,int ret_val,char *str,char *message=0);
  28.         int read(int start_pos);                 // get menu
  29.         int read() {return read(-1);};          // get menu
  30.         void reset();                       // reset the menu system
  31.         void close(){reset();};
  32.         int set_barattr(int attr);     // returns old value
  33.         int message_line (int new_line_no); // returns old value
  34.         int message_attr (int new_attr);  // returns old value
  35. };
  36.