]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/brush.h
Generalized compilation fix for old compilers.
[wxWidgets.git] / include / wx / cocoa / brush.h
CommitLineData
a24aff65 1/////////////////////////////////////////////////////////////////////////////
46562151 2// Name: wx/cocoa/brush.h
a24aff65 3// Purpose: wxBrush class
f162a338 4// Author: David Elliott <dfe@cox.net>
a24aff65 5// Modified by:
f162a338 6// Created: 2003/07/03
a24aff65 7// RCS-ID: $Id$
f162a338 8// Copyright: (c) 2003 David Elliott
ab9d0a8c 9// Licence: wxWindows licence
a24aff65
DE
10/////////////////////////////////////////////////////////////////////////////
11
f162a338
DE
12#ifndef __WX_COCOA_BRUSH_H__
13#define __WX_COCOA_BRUSH_H__
a24aff65
DE
14
15#include "wx/gdicmn.h"
16#include "wx/gdiobj.h"
17#include "wx/bitmap.h"
18
19class WXDLLEXPORT wxBrush;
20
f162a338
DE
21// ========================================================================
22// wxBrush
23// ========================================================================
cb9d5bd0 24class WXDLLEXPORT wxBrush: public wxBrushBase
a24aff65 25{
f162a338
DE
26 DECLARE_DYNAMIC_CLASS(wxBrush)
27// ------------------------------------------------------------------------
28// initialization
29// ------------------------------------------------------------------------
a24aff65 30public:
f162a338 31 wxBrush();
cfbef359 32 wxBrush(const wxColour& col, int style = wxSOLID);
f162a338 33 wxBrush(const wxBitmap& stipple);
d3c7fc99 34 virtual ~wxBrush();
a24aff65 35
f162a338
DE
36// ------------------------------------------------------------------------
37// Implementation
38// ------------------------------------------------------------------------
46562151 39 virtual void SetColour(const wxColour& col) ;
1a1498c0 40 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
46562151
WS
41 virtual void SetStyle(int style) ;
42 virtual void SetStipple(const wxBitmap& stipple) ;
a24aff65 43
f162a338 44 // comparison
fbfb8bcc 45 bool operator == (const wxBrush& brush) const
f162a338 46 { return m_refData == brush.m_refData; }
fbfb8bcc 47 bool operator != (const wxBrush& brush) const
f162a338 48 { return m_refData != brush.m_refData; }
a24aff65 49
f162a338
DE
50 // accessors
51 wxColour GetColour() const;
cb9d5bd0 52 virtual int GetStyle() const;
f162a338 53 wxBitmap *GetStipple() const;
a24aff65 54
b7cacb43
VZ
55 virtual bool Ok() const { return IsOk(); }
56 virtual bool IsOk() const
f162a338 57 { return (m_refData != NULL); }
a24aff65 58
f162a338
DE
59 // wxObjectRefData
60 wxObjectRefData *CreateRefData() const;
61 wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
a24aff65 62
f162a338
DE
63 // wxCocoa
64 WX_NSColor GetNSColor();
a24aff65
DE
65};
66
f162a338 67#endif // __WX_COCOA_BRUSH_H__