home *** CD-ROM | disk | FTP | other *** search
- #ifndef __wcompound_h
- #define __wcompound_h
-
- class wcompound {
- class window *subwin;
- int top, bottom, left, right;
- char top_r, bottom_r, left_r, right_r;
- char behind;
- public:
- wcompound();
- virtual ~wcompound();
- void setsub( class window * );
- void setposoffset( int, int );
- void setwidthoffset( int, int );
- void setsizerel( char, char, char, char );
- void setbehind( char );
- void compound_open( wimp_openstr * );
- void compound_hide();
-
- virtual wimp_w upper_get_handle()=0;
- virtual wimp_wstate *upper_get_state()=0;
- virtual void upper_hide()=0;
- virtual void upper_open( wimp_openstr * )=0;
- };
-
-
- #define make_class_compound( CLASS, UPPER ) \
- class CLASS:public wcompound, public UPPER { \
- void open( wimp_openstr *o ) { wcompound::compound_open( o ); }; \
- void hide() { wcompound::compound_hide(); }; \
- CLASS() {}; \
- CLASS( char *name, int temp=0, int atcaret=0 ) { create( name, temp, atcaret ); };\
- \
- wimp_w upper_get_handle() { return get_handle(); }; \
- wimp_wstate *upper_get_state() { return get_state(); }; \
- void upper_hide() { UPPER::hide(); }; \
- void upper_open( wimp_openstr *o ) { UPPER::open( o ); }; \
- }
-
-
- #endif