]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/brush.h
Patch #826420, and also adapted to new SWIG
[wxWidgets.git] / include / wx / mac / brush.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: brush.h
3// Purpose: wxBrush class
a31a5f85 4// Author: Stefan Csomor
0dbd6262 5// Modified by:
a31a5f85 6// Created: 1998-01-01
0dbd6262 7// RCS-ID: $Id$
a31a5f85 8// Copyright: (c) Stefan Csomor
d921af51 9// Licence: wxWindows licence
0dbd6262
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BRUSH_H_
13#define _WX_BRUSH_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
0dbd6262
SC
16#pragma interface "brush.h"
17#endif
18
19#include "wx/gdicmn.h"
20#include "wx/gdiobj.h"
21#include "wx/bitmap.h"
22
23class WXDLLEXPORT wxBrush;
24
5b36f53b
SC
25typedef enum
26{
27 kwxMacBrushColour ,
28 kwxMacBrushTheme ,
29 kwxMacBrushThemeBackground
30} wxMacBrushKind ;
31
0dbd6262
SC
32// Brush
33class WXDLLEXPORT wxBrush: public wxGDIObject
34{
35 DECLARE_DYNAMIC_CLASS(wxBrush)
36
37public:
38 wxBrush();
5273bf2f 39 wxBrush(short macThemeBrush ) ;
5b36366c 40 wxBrush(const wxColour& col, int style = wxSOLID);
0dbd6262 41 wxBrush(const wxBitmap& stipple);
d84afea9
GD
42 wxBrush(const wxBrush& brush)
43 : wxGDIObject()
44 { Ref(brush); }
0dbd6262
SC
45 ~wxBrush();
46
47 virtual void SetColour(const wxColour& col) ;
48 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
49 virtual void SetStyle(int style) ;
50 virtual void SetStipple(const wxBitmap& stipple) ;
5273bf2f
SC
51 virtual void SetMacTheme(short macThemeBrush) ;
52 virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
0dbd6262 53
d84afea9
GD
54 wxBrush& operator = (const wxBrush& brush)
55 { if (*this == brush) return (*this); Ref(brush); return *this; }
56 bool operator == (const wxBrush& brush)
57 { return m_refData == brush.m_refData; }
58 bool operator != (const wxBrush& brush)
59 { return m_refData != brush.m_refData; }
0dbd6262 60
5273bf2f 61 wxMacBrushKind MacGetBrushKind() const ;
5b36f53b 62
5273bf2f
SC
63 unsigned long GetMacThemeBackground(WXRECTPTR extent) const ;
64 short GetMacTheme() const ;
65 wxColour& GetColour() const ;
66 int GetStyle() const ;
67 wxBitmap *GetStipple() const ;
0dbd6262
SC
68
69 virtual bool Ok() const { return (m_refData != NULL) ; }
70
71// Implementation
72
73 // Useful helper: create the brush resource
74 bool RealizeResource();
75
76 // When setting properties, we must make sure we're not changing
77 // another object
78 void Unshare();
79};
80
81#endif
82 // _WX_BRUSH_H_