]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/brush.h
Wrappers for *ToText
[wxWidgets.git] / include / wx / cocoa / brush.h
CommitLineData
a24aff65 1/////////////////////////////////////////////////////////////////////////////
f162a338 2// Name: include/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
65571936 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// ========================================================================
a24aff65
DE
24class WXDLLEXPORT wxBrush: public wxGDIObject
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
DE
33 wxBrush(const wxBitmap& stipple);
34 wxBrush(const wxBrush& brush)
35 : wxGDIObject()
36 { Ref(brush); }
37 ~wxBrush();
a24aff65 38
f162a338
DE
39// ------------------------------------------------------------------------
40// Implementation
41// ------------------------------------------------------------------------
42 virtual void SetColour(const wxColour& col) ;
43 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
44 virtual void SetStyle(int style) ;
45 virtual void SetStipple(const wxBitmap& stipple) ;
a24aff65 46
f162a338
DE
47 // assignment
48 wxBrush& operator = (const wxBrush& brush)
49 { if (*this == brush) return (*this); Ref(brush); return *this; }
a24aff65 50
f162a338
DE
51 // comparison
52 bool operator == (const wxBrush& brush)
53 { return m_refData == brush.m_refData; }
54 bool operator != (const wxBrush& brush)
55 { return m_refData != brush.m_refData; }
a24aff65 56
f162a338
DE
57 // accessors
58 wxColour GetColour() const;
59 int GetStyle() const;
60 wxBitmap *GetStipple() const;
a24aff65 61
f162a338
DE
62 virtual bool Ok() const
63 { return (m_refData != NULL); }
a24aff65 64
f162a338
DE
65 // wxObjectRefData
66 wxObjectRefData *CreateRefData() const;
67 wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
a24aff65 68
f162a338
DE
69 // wxCocoa
70 WX_NSColor GetNSColor();
a24aff65
DE
71};
72
f162a338 73#endif // __WX_COCOA_BRUSH_H__