]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/brush.h
A little different fix for how to delay the call to __wxCleanup
[wxWidgets.git] / include / wx / gtk / brush.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: brush.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKBRUSHH__
12#define __GTKBRUSHH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/string.h"
21#include "wx/gdiobj.h"
22#include "wx/bitmap.h"
23
24//-----------------------------------------------------------------------------
25// classes
26//-----------------------------------------------------------------------------
27
28class wxBrush;
29
30//-----------------------------------------------------------------------------
31// wxBrush
32//-----------------------------------------------------------------------------
33
34class wxBrush: public wxGDIObject
35{
36public:
37 wxBrush() { }
38
39 wxBrush( const wxColour &colour, int style );
40 wxBrush( const wxBitmap &stippleBitmap );
41 ~wxBrush();
42
43 wxBrush( const wxBrush &brush ) { Ref(brush); }
44 wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
45
46 bool Ok() const { return m_refData != NULL; }
47
48 bool operator == ( const wxBrush& brush ) const;
49 bool operator != (const wxBrush& brush) const { return !(*this == brush); }
50
51 int GetStyle() const;
52 wxColour &GetColour() const;
53 wxBitmap *GetStipple() const;
54
55 void SetColour( const wxColour& col );
56 void SetColour( unsigned char r, unsigned char g, unsigned char b );
57 void SetStyle( int style );
58 void SetStipple( const wxBitmap& stipple );
59
60private:
61 // ref counting code
62 virtual wxObjectRefData *CreateRefData() const;
63 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
64
65 DECLARE_DYNAMIC_CLASS(wxBrush)
66};
67
68#endif // __GTKBRUSHH__