dcmemory.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/dcmemory.h
  3. // Purpose: wxMemoryDC class
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 09/09/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_DCMEMORY_H_
  11. #define _WX_DCMEMORY_H_
  12. #include "wx/dcmemory.h"
  13. #include "wx/os2/dc.h"
  14. class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPMDCImpl
  15. {
  16. public:
  17. wxMemoryDCImpl( wxMemoryDC *owner );
  18. wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
  19. wxMemoryDCImpl( wxMemoryDC *owner, wxDC* pDC); // Create compatible DC
  20. // override some base class virtuals
  21. virtual void DoGetSize(int* pWidth, int* pHeight) const;
  22. virtual void DoSelect(const wxBitmap& bitmap);
  23. virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const
  24. { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect);}
  25. protected:
  26. // create DC compatible with the given one or screen if dc == NULL
  27. bool CreateCompatible(wxDC* pDC);
  28. // initialize the newly created DC
  29. void Init(void);
  30. private:
  31. DECLARE_CLASS(wxMemoryDCImpl)
  32. wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
  33. }; // end of CLASS wxMemoryDCImpl
  34. #endif
  35. // _WX_DCMEMORY_H_