home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xbltwnd.h < prev    next >
Text File  |  1997-12-25  |  2KB  |  48 lines

  1. #if !defined( __XBLITTERWINDOW_HPP__ )
  2. #define __XBLITTERWINDOW_HPP__
  3.  
  4. #include <xheaders.h>
  5. #include "xfrmwnd.h"
  6. #include "xpal.h"
  7. #include "xblitter.h"
  8.  
  9.  
  10. class _export_ XBlitterWindow : public XFrameWindow
  11. {
  12.         friend MRESULT EXPENTRY NewWndProc( HWND, ULONG, MPARAM, MPARAM );
  13.  
  14.         private:
  15.                 PFNWP                   pOldWndProc;            // pointer to the old window proc
  16.  
  17.                 XBlitter*               pBlitter;               // pointer to the blitter object
  18.  
  19.                 inline void Activate( void )   const { pBlitter->pPalette->Enable(); }
  20.                 inline void Deactivate( void )  { pBlitter->pPalette->Disable(); }
  21.                 void Init(XBlitter* pBlitter);
  22.  
  23.         public:
  24.                 // ctor / dtor
  25.                          XBlitterWindow( const XResource * resource,
  26.                                          const char * title,
  27.                                                XBlitter* pBlitter,
  28.                                          const ULONG createstyle = defaultStyle,
  29.                                          const XRect& rec = XRect(),
  30.                                          const XFrameWindow * parent=NULL,
  31.                                          const BOOL buildFromResources = FALSE,
  32.                                          const BOOL animate = FALSE                 );
  33.                          XBlitterWindow( const ULONG,
  34.                                          const char * title,
  35.                                                XBlitter* pBlitter,
  36.                                          const ULONG createstyle = defaultStyle,
  37.                                          const XRect& rec = XRect(),
  38.                                          const XFrameWindow * parent=NULL,
  39.                                          const BOOL buildFromResources = FALSE,
  40.                                          const BOOL animate = FALSE                 );
  41.                 virtual ~XBlitterWindow()       {}
  42.  
  43.                 // get a pointer to the blitter object
  44.                 XBlitter* GetBlitter( void )    { return pBlitter; }
  45. };
  46.  
  47. #endif
  48.