home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / include / xbitmap.h < prev    next >
Text File  |  1997-03-05  |  2KB  |  52 lines

  1. #ifndef __OOL_XBITMAP_H__
  2. #define __OOL_XBITMAP_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
  6. /*===========================================================================*/
  7. /*                              class: XBitmap                               */
  8. /*                       derived from: XGraphicObject                        */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xgraphob.h"
  15. #include "XPoint.h"
  16. #include "XRes.h"
  17. #include "XWindow.h"
  18. #include "xsize.h"
  19.  
  20. class _export_  XBitmap: public XGraphicObject
  21. {
  22.       friend class XBitmapShadow;
  23.       friend class XClipBoard;
  24.       friend class XItemDrawEvent;
  25.       friend class XUserButton;
  26.       friend class XContainerObject;
  27.         friend class userbtnhandler;
  28.         friend class userbtnmousehandler;
  29.    private:
  30.       XWindow * owner;
  31.       HBITMAP hbm;
  32.       HDC hdc;
  33.       HPS hps;
  34.       LONG SetData( const BITMAPINFOHEADER2 *, const LONG );
  35.       BOOL HitTest( const LONG x, const LONG y);
  36.       LONG cx, cy, mode, width, height;
  37.    public:
  38.       XBitmap( const XGraphicDevice*, const XPoint * p = NULL, const LONG mode = ROP_SRCCOPY);
  39.       XBitmap( const XWindow *);
  40.       ~XBitmap();
  41.       void Copy( const XGraphicDevice *, const XPoint * );
  42.       void Draw( const XRect * );
  43.       ULONG GetHandle( void ) const { return hbm; }
  44.       LONG Load( const XResource * r);
  45.       LONG Load( const char *);
  46.       void GetDimensions( XSize *);
  47.         void SetOutputSize( const XRect *r) { width = r->GetWidth(); height = r->GetHeight(); }
  48.         XBitmap operator =(const XBitmap& da);
  49. };
  50.  
  51. #endif
  52.