]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/brush.h
first character of a command in a make rule must be TAB (not space or #): fixes build...
[wxWidgets.git] / include / wx / x11 / brush.h
CommitLineData
83df96d6
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: brush.h
3// Purpose: wxBrush class
74dc5eb6 4// Author: Julian Smart, Robert Roebling
83df96d6
JS
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
74dc5eb6 8// Copyright: (c) Julian Smart, Robert Roebling
ab9d0a8c 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BRUSH_H_
13#define _WX_BRUSH_H_
14
83df96d6 15#include "wx/gdiobj.h"
83df96d6 16
74dc5eb6
RR
17//-----------------------------------------------------------------------------
18// classes
19//-----------------------------------------------------------------------------
83df96d6 20
968eb2ef
MW
21class WXDLLIMPEXP_CORE wxBrush;
22class WXDLLIMPEXP_CORE wxColour;
23class WXDLLIMPEXP_CORE wxBitmap;
83df96d6 24
74dc5eb6
RR
25//-----------------------------------------------------------------------------
26// wxBrush
27//-----------------------------------------------------------------------------
83df96d6 28
968eb2ef 29class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
83df96d6 30{
83df96d6 31public:
74dc5eb6 32 wxBrush() { }
ab9d0a8c 33
5b36366c 34 wxBrush( const wxColour &colour, int style = wxSOLID );
74dc5eb6
RR
35 wxBrush( const wxBitmap &stippleBitmap );
36 ~wxBrush();
ab9d0a8c 37
74dc5eb6
RR
38 wxBrush( const wxBrush &brush ) { Ref(brush); }
39 wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
ab9d0a8c 40
74dc5eb6 41 bool Ok() const { return m_refData != NULL; }
ab9d0a8c 42
74dc5eb6
RR
43 bool operator == ( const wxBrush& brush ) const;
44 bool operator != (const wxBrush& brush) const { return !(*this == brush); }
45
cb9d5bd0 46 virtual int GetStyle() const;
74dc5eb6
RR
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
55private:
56 // ref counting code
57 virtual wxObjectRefData *CreateRefData() const;
58 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
ab9d0a8c 59
74dc5eb6 60 DECLARE_DYNAMIC_CLASS(wxBrush)
83df96d6
JS
61};
62
63#endif
64// _WX_BRUSH_H_