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