brush.h 1.9 KB

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