home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xapp.h < prev    next >
C/C++ Source or Header  |  1998-04-05  |  2KB  |  59 lines

  1. #ifndef __OOL_XAPPLICATION_H__
  2. #define __OOL_XAPPLICATION_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XApplication                          */
  8. /*                       derived from: XProcess                              */
  9. /*                        last update: 10/97                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xprocess.h"
  15. #include "XString.h"
  16.  
  17. class XResourceLibrary;
  18. class XExitHandler;
  19.  
  20. class _export_ XApplication: public XProcess
  21. {
  22.       friend class XFrameWindow;
  23.       friend class XUserWindow;
  24.       friend class XModelessDialog;
  25.       friend class XModalDialog;
  26.       friend class XDialog;
  27.       friend class XDummyApplication;
  28.    private:
  29.       XResourceLibrary * resLib;
  30.       int argCount;
  31.       XString ** argValues;
  32.       BOOL ex;
  33.       HAB hab;
  34.       HMQ queue;
  35.       QMSG messagequeue;
  36. //public:
  37.       SHORT windows;
  38.       XWindow ** frames;
  39.       void AddWindow( const XWindow * );
  40.       void RemoveWindow( const XWindow*);
  41.       void Clean( void );
  42.    protected:
  43.       XApplication();
  44.       ~XApplication();
  45.    public:
  46.       static XApplication * GetApplication();
  47.       static void SetExitHandler( XExitHandler *);
  48.       HAB GetAnchorBlock() { return hab; }
  49.       USHORT GetArgumentCount() { return argCount; }
  50.       BOOL GetArgumentValue( USHORT index, XString * buffer);
  51.       XResourceLibrary * GetResourceLibrary(void) const { return resLib; }
  52.       void Terminate( void );
  53.       void SetArguments( int argc, void ** argv);
  54.       void SetResourceLibrary( const XResourceLibrary *);
  55.       void Start( void );
  56. };
  57.  
  58. #endif
  59.