brush.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/dfb/brush.h
  3. // Purpose: wxBrush class declaration
  4. // Author: Vaclav Slavik
  5. // Created: 2006-08-04
  6. // Copyright: (c) 2006 REA Elektronik GmbH
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_DFB_BRUSH_H_
  10. #define _WX_DFB_BRUSH_H_
  11. #include "wx/defs.h"
  12. #include "wx/object.h"
  13. #include "wx/string.h"
  14. #include "wx/gdiobj.h"
  15. #include "wx/bitmap.h"
  16. //-----------------------------------------------------------------------------
  17. // classes
  18. //-----------------------------------------------------------------------------
  19. class WXDLLIMPEXP_FWD_CORE wxBitmap;
  20. class WXDLLIMPEXP_FWD_CORE wxBrush;
  21. //-----------------------------------------------------------------------------
  22. // wxBrush
  23. //-----------------------------------------------------------------------------
  24. class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
  25. {
  26. public:
  27. wxBrush() {}
  28. wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
  29. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  30. wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
  31. #endif
  32. wxBrush(const wxBitmap &stippleBitmap);
  33. bool operator==(const wxBrush& brush) const;
  34. bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
  35. wxBrushStyle GetStyle() const;
  36. wxColour GetColour() const;
  37. wxBitmap *GetStipple() const;
  38. void SetColour(const wxColour& col);
  39. void SetColour(unsigned char r, unsigned char g, unsigned char b);
  40. void SetStyle(wxBrushStyle style);
  41. void SetStipple(const wxBitmap& stipple);
  42. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  43. wxDEPRECATED_FUTURE( void SetStyle(int style) )
  44. { SetStyle((wxBrushStyle)style); }
  45. #endif
  46. protected:
  47. virtual wxGDIRefData *CreateGDIRefData() const;
  48. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  49. DECLARE_DYNAMIC_CLASS(wxBrush)
  50. };
  51. #endif // _WX_DFB_BRUSH_H_