brush.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/brush.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef __GTKBRUSHH__
  9. #define __GTKBRUSHH__
  10. #include "wx/defs.h"
  11. #include "wx/object.h"
  12. #include "wx/string.h"
  13. #include "wx/gdiobj.h"
  14. #include "wx/bitmap.h"
  15. //-----------------------------------------------------------------------------
  16. // classes
  17. //-----------------------------------------------------------------------------
  18. class WXDLLIMPEXP_FWD_CORE wxBrush;
  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. private:
  46. virtual wxGDIRefData *CreateGDIRefData() const;
  47. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  48. DECLARE_DYNAMIC_CLASS(wxBrush)
  49. };
  50. #endif // __GTKBRUSHH__