dcmemory.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/dcmemory.h
  3. // Purpose: wxMemoryDC class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_DCMEMORY_H_
  11. #define _WX_DCMEMORY_H_
  12. #include "wx/osx/dcclient.h"
  13. class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPaintDCImpl
  14. {
  15. public:
  16. wxMemoryDCImpl( wxMemoryDC *owner );
  17. wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
  18. wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
  19. virtual ~wxMemoryDCImpl();
  20. virtual void DoGetSize( int *width, int *height ) const;
  21. virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
  22. { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
  23. virtual void DoSelect(const wxBitmap& bitmap);
  24. virtual const wxBitmap& GetSelectedBitmap() const
  25. { return m_selected; }
  26. virtual wxBitmap& GetSelectedBitmap()
  27. { return m_selected; }
  28. private:
  29. void Init();
  30. wxBitmap m_selected;
  31. DECLARE_CLASS(wxMemoryDCImpl)
  32. wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
  33. };
  34. #endif
  35. // _WX_DCMEMORY_H_