1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/brush.h
3 // Purpose: wxBrush class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "brush.h"
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
21 #include "wx/bitmap.h"
23 class WXDLLEXPORT wxBrush
;
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLEXPORT wxBrush
: public wxBrushBase
33 wxBrush(const wxColour
& col
, int style
= wxSOLID
);
34 wxBrush(const wxBitmap
& stipple
);
35 wxBrush(const wxBrush
& brush
) { Ref(brush
); }
38 virtual void SetColour(const wxColour
& col
);
39 virtual void SetColour(unsigned char r
, unsigned char g
, unsigned char b
);
40 virtual void SetStyle(int style
);
41 virtual void SetStipple(const wxBitmap
& stipple
);
43 wxBrush
& operator=(const wxBrush
& brush
);
44 bool operator==(const wxBrush
& brush
) const;
45 bool operator!=(const wxBrush
& brush
) const { return !(*this == brush
); }
47 wxColour
GetColour() const;
48 virtual int GetStyle() const;
49 wxBitmap
*GetStipple() const;
51 bool Ok() const { return m_refData
!= NULL
; }
53 // return the HBRUSH for this brush
54 virtual WXHANDLE
GetResourceHandle() const;
57 virtual wxObjectRefData
*CreateRefData() const;
58 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
61 DECLARE_DYNAMIC_CLASS(wxBrush
)