home *** CD-ROM | disk | FTP | other *** search
/ ftp.uni-stuttgart.de/pub/systems/acorn/ / Acorn.tar / Acorn / acornet / dev / c / gcc / g++lib.spk / h / wcompound < prev   
Text File  |  1993-08-04  |  1KB  |  41 lines

  1. #ifndef __wcompound_h
  2. #define __wcompound_h
  3.  
  4. class wcompound {
  5.   class window *subwin;
  6.   int top, bottom, left, right;
  7.   char top_r, bottom_r, left_r, right_r;
  8.   char behind;
  9. public:
  10.   wcompound();
  11.   virtual ~wcompound();
  12.   void setsub( class window * );
  13.   void setposoffset( int, int );
  14.   void setwidthoffset( int, int );
  15.   void setsizerel( char, char, char, char );
  16.   void setbehind( char );
  17.   void compound_open( wimp_openstr * );
  18.   void compound_hide();
  19.  
  20.   virtual wimp_w upper_get_handle()=0;
  21.   virtual wimp_wstate *upper_get_state()=0;
  22.   virtual void upper_hide()=0;
  23.   virtual void upper_open( wimp_openstr * )=0;
  24.   };
  25.  
  26.  
  27. #define make_class_compound( CLASS, UPPER ) \
  28.   class CLASS:public wcompound, public UPPER {                        \
  29.     void open( wimp_openstr *o ) { wcompound::compound_open( o ); };  \
  30.     void hide() { wcompound::compound_hide(); };                      \
  31.     CLASS() {}; \
  32.     CLASS( char *name, int temp=0, int atcaret=0 ) { create( name, temp, atcaret ); };\
  33.                                                                       \
  34.     wimp_w upper_get_handle() { return get_handle(); };        \
  35.     wimp_wstate *upper_get_state() { return get_state(); };    \
  36.     void upper_hide() { UPPER::hide(); };                             \
  37.     void upper_open( wimp_openstr *o ) { UPPER::open( o ); };         \
  38.     }
  39.  
  40.  
  41. #endif