brush.h 2.0 KB

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