]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/x11/brush.h | |
3 | // Purpose: wxBrush class | |
4 | // Author: Julian Smart, Robert Roebling | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart, Robert Roebling | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_BRUSH_H_ | |
13 | #define _WX_BRUSH_H_ | |
14 | ||
15 | #include "wx/gdiobj.h" | |
16 | ||
17 | //----------------------------------------------------------------------------- | |
18 | // classes | |
19 | //----------------------------------------------------------------------------- | |
20 | ||
21 | class WXDLLIMPEXP_CORE wxBrush; | |
22 | class WXDLLIMPEXP_CORE wxColour; | |
23 | class WXDLLIMPEXP_CORE wxBitmap; | |
24 | ||
25 | //----------------------------------------------------------------------------- | |
26 | // wxBrush | |
27 | //----------------------------------------------------------------------------- | |
28 | ||
29 | class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase | |
30 | { | |
31 | public: | |
32 | wxBrush() { } | |
33 | ||
34 | wxBrush( const wxColour &colour, int style = wxSOLID ); | |
35 | wxBrush( const wxBitmap &stippleBitmap ); | |
36 | ~wxBrush(); | |
37 | ||
38 | wxBrush( const wxBrush &brush ) { Ref(brush); } | |
39 | wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } | |
40 | ||
41 | bool Ok() const { return m_refData != NULL; } | |
42 | ||
43 | bool operator == ( const wxBrush& brush ) const; | |
44 | bool operator != (const wxBrush& brush) const { return !(*this == brush); } | |
45 | ||
46 | virtual int GetStyle() const; | |
47 | wxColour &GetColour() const; | |
48 | wxBitmap *GetStipple() const; | |
49 | ||
50 | void SetColour( const wxColour& col ); | |
51 | void SetColour( unsigned char r, unsigned char g, unsigned char b ); | |
52 | void SetStyle( int style ); | |
53 | void SetStipple( const wxBitmap& stipple ); | |
54 | ||
55 | private: | |
56 | // ref counting code | |
57 | virtual wxObjectRefData *CreateRefData() const; | |
58 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
59 | ||
60 | DECLARE_DYNAMIC_CLASS(wxBrush) | |
61 | }; | |
62 | ||
63 | #endif | |
64 | // _WX_BRUSH_H_ |