dcmemory.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/dcmemory.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK_DCMEMORY_H_
  9. #define _WX_GTK_DCMEMORY_H_
  10. #include "wx/dcmemory.h"
  11. #include "wx/gtk/dcclient.h"
  12. //-----------------------------------------------------------------------------
  13. // wxMemoryDCImpl
  14. //-----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
  16. {
  17. public:
  18. wxMemoryDCImpl( wxMemoryDC *owner );
  19. wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
  20. wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
  21. virtual ~wxMemoryDCImpl();
  22. // these get reimplemented for mono-bitmaps to behave
  23. // more like their Win32 couterparts. They now interpret
  24. // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
  25. // and everything else as drawing 1.
  26. virtual void SetPen( const wxPen &pen );
  27. virtual void SetBrush( const wxBrush &brush );
  28. virtual void SetBackground( const wxBrush &brush );
  29. virtual void SetTextForeground( const wxColour &col );
  30. virtual void SetTextBackground( const wxColour &col );
  31. // overridden from wxDCImpl
  32. virtual void DoGetSize( int *width, int *height ) const;
  33. virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
  34. virtual void* GetHandle() const;
  35. // overridden for wxMemoryDC Impl
  36. virtual void DoSelect(const wxBitmap& bitmap);
  37. virtual const wxBitmap& GetSelectedBitmap() const;
  38. virtual wxBitmap& GetSelectedBitmap();
  39. private:
  40. wxBitmap m_selected;
  41. void Init();
  42. DECLARE_ABSTRACT_CLASS(wxMemoryDCImpl)
  43. };
  44. #endif
  45. // _WX_GTK_DCMEMORY_H_