]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/brush.h
Further performance optimizations
[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
b5dbe15d 19class WXDLLIMPEXP_FWD_CORE wxBrush;
a24aff65 20
f162a338
DE
21// ========================================================================
22// wxBrush
23// ========================================================================
53a2db12 24class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
a24aff65 25{
f162a338
DE
26 DECLARE_DYNAMIC_CLASS(wxBrush)
27// ------------------------------------------------------------------------
28// initialization
29// ------------------------------------------------------------------------
a24aff65 30public:
f162a338 31 wxBrush();
3e6858cd 32 wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
ac3688c0
FM
33#if FUTURE_WXWIN_COMPATIBILITY_3_0
34 wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
35#endif
f162a338 36 wxBrush(const wxBitmap& stipple);
d3c7fc99 37 virtual ~wxBrush();
a24aff65 38
f162a338
DE
39// ------------------------------------------------------------------------
40// Implementation
41// ------------------------------------------------------------------------
46562151 42 virtual void SetColour(const wxColour& col) ;
1a1498c0 43 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
3e6858cd 44 virtual void SetStyle(wxBrushStyle style) ;
46562151 45 virtual void SetStipple(const wxBitmap& stipple) ;
a24aff65 46
f162a338 47 // comparison
fbfb8bcc 48 bool operator == (const wxBrush& brush) const
f162a338 49 { return m_refData == brush.m_refData; }
fbfb8bcc 50 bool operator != (const wxBrush& brush) const
f162a338 51 { return m_refData != brush.m_refData; }
a24aff65 52
f162a338
DE
53 // accessors
54 wxColour GetColour() const;
3e6858cd 55 virtual wxBrushStyle GetStyle() const;
f162a338 56 wxBitmap *GetStipple() const;
a24aff65 57
f162a338
DE
58 // wxCocoa
59 WX_NSColor GetNSColor();
8f884a0d
VZ
60
61protected:
62 wxGDIRefData *CreateGDIRefData() const;
63 wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
a24aff65
DE
64};
65
f162a338 66#endif // __WX_COCOA_BRUSH_H__