]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/brush.h
avoid warnings C4311/4312 when building with MSVC >= 7 (patch 1414052)
[wxWidgets.git] / include / wx / msw / brush.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
cafbad8f 2// Name: wx/msw/brush.h
2bda0e17
KB
3// Purpose: wxBrush class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_BRUSH_H_
13#define _WX_BRUSH_H_
2bda0e17 14
2bda0e17
KB
15#include "wx/gdicmn.h"
16#include "wx/gdiobj.h"
17#include "wx/bitmap.h"
18
19class WXDLLEXPORT wxBrush;
20
cafbad8f
VZ
21// ----------------------------------------------------------------------------
22// wxBrush
23// ----------------------------------------------------------------------------
24
cb9d5bd0 25class WXDLLEXPORT wxBrush : public wxBrushBase
2bda0e17 26{
2bda0e17 27public:
cafbad8f 28 wxBrush();
5b36366c 29 wxBrush(const wxColour& col, int style = wxSOLID);
cafbad8f 30 wxBrush(const wxBitmap& stipple);
cb9d5bd0 31 wxBrush(const wxBrush& brush) : wxBrushBase(brush) { Ref(brush); }
cafbad8f 32 virtual ~wxBrush();
2bda0e17 33
cafbad8f 34 virtual void SetColour(const wxColour& col);
1a1498c0 35 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
cafbad8f
VZ
36 virtual void SetStyle(int style);
37 virtual void SetStipple(const wxBitmap& stipple);
2bda0e17 38
cafbad8f
VZ
39 wxBrush& operator=(const wxBrush& brush);
40 bool operator==(const wxBrush& brush) const;
41 bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
2bda0e17 42
cafbad8f 43 wxColour GetColour() const;
cb9d5bd0 44 virtual int GetStyle() const;
cafbad8f 45 wxBitmap *GetStipple() const;
2bda0e17 46
cafbad8f 47 bool Ok() const { return m_refData != NULL; }
2bda0e17 48
2b5f62a0
VZ
49 // return the HBRUSH for this brush
50 virtual WXHANDLE GetResourceHandle() const;
2bda0e17 51
cafbad8f
VZ
52protected:
53 virtual wxObjectRefData *CreateRefData() const;
54 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
2bda0e17 55
cafbad8f
VZ
56private:
57 DECLARE_DYNAMIC_CLASS(wxBrush)
2bda0e17
KB
58};
59
60#endif
bbcdf8bc 61 // _WX_BRUSH_H_