]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/brush.h
A few tweaks and cleanups
[wxWidgets.git] / include / wx / mac / brush.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: brush.h
3// Purpose: wxBrush class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BRUSH_H_
13#define _WX_BRUSH_H_
14
15#ifdef __GNUG__
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 ) ;
0dbd6262
SC
40 wxBrush(const wxColour& col, int style);
41 wxBrush(const wxBitmap& stipple);
42 inline wxBrush(const wxBrush& brush) { Ref(brush); }
43 ~wxBrush();
44
45 virtual void SetColour(const wxColour& col) ;
46 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
47 virtual void SetStyle(int style) ;
48 virtual void SetStipple(const wxBitmap& stipple) ;
5273bf2f
SC
49 virtual void SetMacTheme(short macThemeBrush) ;
50 virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
0dbd6262
SC
51
52 inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; }
53 inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; }
54 inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; }
55
5273bf2f 56 wxMacBrushKind MacGetBrushKind() const ;
5b36f53b 57
5273bf2f
SC
58 unsigned long GetMacThemeBackground(WXRECTPTR extent) const ;
59 short GetMacTheme() const ;
60 wxColour& GetColour() const ;
61 int GetStyle() const ;
62 wxBitmap *GetStipple() const ;
0dbd6262
SC
63
64 virtual bool Ok() const { return (m_refData != NULL) ; }
65
66// Implementation
67
68 // Useful helper: create the brush resource
69 bool RealizeResource();
70
71 // When setting properties, we must make sure we're not changing
72 // another object
73 void Unshare();
74};
75
76#endif
77 // _WX_BRUSH_H_