]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/brush.h
wx(Choice/List/Note)book controls send CHANG(ED/ING) events in SetSelection.
[wxWidgets.git] / include / wx / x11 / brush.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "brush.h"
17 #endif
18
19 #include "wx/gdiobj.h"
20
21 //-----------------------------------------------------------------------------
22 // classes
23 //-----------------------------------------------------------------------------
24
25 class wxBrush;
26 class wxColour;
27 class wxBitmap;
28
29 //-----------------------------------------------------------------------------
30 // wxBrush
31 //-----------------------------------------------------------------------------
32
33 class wxBrush: public wxGDIObject
34 {
35 public:
36 wxBrush() { }
37
38 wxBrush( const wxColour &colour, int style = wxSOLID );
39 wxBrush( const wxBitmap &stippleBitmap );
40 ~wxBrush();
41
42 wxBrush( const wxBrush &brush ) { Ref(brush); }
43 wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
44
45 bool Ok() const { return m_refData != NULL; }
46
47 bool operator == ( const wxBrush& brush ) const;
48 bool operator != (const wxBrush& brush) const { return !(*this == brush); }
49
50 int GetStyle() const;
51 wxColour &GetColour() const;
52 wxBitmap *GetStipple() const;
53
54 void SetColour( const wxColour& col );
55 void SetColour( unsigned char r, unsigned char g, unsigned char b );
56 void SetStyle( int style );
57 void SetStipple( const wxBitmap& stipple );
58
59 private:
60 // ref counting code
61 virtual wxObjectRefData *CreateRefData() const;
62 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
63
64 DECLARE_DYNAMIC_CLASS(wxBrush)
65 };
66
67 #endif
68 // _WX_BRUSH_H_