brush.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/brush.h
  3. // Purpose: wxBrush 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_BRUSH_H_
  11. #define _WX_BRUSH_H_
  12. #include "wx/gdicmn.h"
  13. #include "wx/gdiobj.h"
  14. #include "wx/bitmap.h"
  15. class WXDLLIMPEXP_FWD_CORE wxBrush;
  16. // Brush
  17. class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
  18. {
  19. public:
  20. wxBrush();
  21. wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
  22. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  23. wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
  24. #endif
  25. wxBrush(const wxBitmap& stipple);
  26. virtual ~wxBrush();
  27. virtual void SetColour(const wxColour& col) ;
  28. virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
  29. virtual void SetStyle(wxBrushStyle style) ;
  30. virtual void SetStipple(const wxBitmap& stipple) ;
  31. bool operator==(const wxBrush& brush) const;
  32. bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
  33. wxColour GetColour() const;
  34. wxBrushStyle GetStyle() const ;
  35. wxBitmap *GetStipple() const ;
  36. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  37. wxDEPRECATED_FUTURE( void SetStyle(int style) )
  38. { SetStyle((wxBrushStyle)style); }
  39. #endif
  40. protected:
  41. virtual wxGDIRefData *CreateGDIRefData() const;
  42. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  43. private:
  44. DECLARE_DYNAMIC_CLASS(wxBrush)
  45. };
  46. #endif // _WX_BRUSH_H_