brush.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/brush.h
  3. // Purpose: wxBrush class
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 10/13/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_BRUSH_H_
  11. #define _WX_BRUSH_H_
  12. #include "wx/bitmap.h"
  13. // Brush
  14. class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
  15. {
  16. public:
  17. wxBrush();
  18. wxBrush(const wxColour& rCol, wxBrushStyle nStyle = wxBRUSHSTYLE_SOLID);
  19. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  20. wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
  21. #endif
  22. wxBrush(const wxBitmap& rStipple);
  23. virtual ~wxBrush();
  24. bool operator == (const wxBrush& rBrush) const;
  25. inline bool operator != (const wxBrush& rBrush) const { return !(*this == rBrush); }
  26. virtual void SetColour(const wxColour& rColour);
  27. virtual void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBrush);
  28. virtual void SetPS(HPS hPS);
  29. virtual void SetStyle(wxBrushStyle nStyle);
  30. virtual void SetStipple(const wxBitmap& rStipple);
  31. wxColour GetColour(void) const;
  32. wxBrushStyle GetStyle(void) const;
  33. wxBitmap* GetStipple(void) const;
  34. int GetPS(void) const;
  35. #if FUTURE_WXWIN_COMPATIBILITY_3_0
  36. wxDEPRECATED_FUTURE( void SetStyle(int style) )
  37. { SetStyle((wxBrushStyle)style); }
  38. #endif
  39. //
  40. // Implementation
  41. //
  42. //
  43. // Useful helper: create the brush resource
  44. //
  45. bool RealizeResource(void);
  46. virtual WXHANDLE GetResourceHandle(void) const;
  47. bool FreeResource(bool bForce = false);
  48. bool IsFree(void) const;
  49. protected:
  50. virtual wxGDIRefData *CreateGDIRefData() const;
  51. virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
  52. private:
  53. DECLARE_DYNAMIC_CLASS(wxBrush)
  54. }; // end of CLASS wxBrush
  55. #endif
  56. // _WX_BRUSH_H_