]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/classic/brush.h
take the address of the member in wxON_BLOCK_EXIT_OBJ macros
[wxWidgets.git] / include / wx / mac / classic / brush.h
CommitLineData
52479aef
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: brush.h
3// Purpose: wxBrush class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
52479aef
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BRUSH_H_
13#define _WX_BRUSH_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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
ab9d0a8c 25typedef enum
52479aef 26{
ab9d0a8c
WS
27 kwxMacBrushColour ,
28 kwxMacBrushTheme ,
29 kwxMacBrushThemeBackground
52479aef
SC
30} wxMacBrushKind ;
31
32// Brush
cb9d5bd0 33class WXDLLEXPORT wxBrush: public wxBrushBase
52479aef 34{
ab9d0a8c 35 DECLARE_DYNAMIC_CLASS(wxBrush)
52479aef
SC
36
37public:
ab9d0a8c
WS
38 wxBrush();
39 wxBrush(short macThemeBrush ) ;
40 wxBrush(const wxColour& col, int style = wxSOLID);
41 wxBrush(const wxBitmap& stipple);
42 wxBrush(const wxBrush& brush)
cb9d5bd0 43 : wxBrushBase()
ab9d0a8c
WS
44 { Ref(brush); }
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) ;
51 virtual void SetMacTheme(short macThemeBrush) ;
52 virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
53
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; }
60
61 wxMacBrushKind MacGetBrushKind() const ;
62
63 unsigned long GetMacThemeBackground(WXRECTPTR extent) const ;
64 short GetMacTheme() const ;
65 wxColour& GetColour() const ;
cb9d5bd0 66 virtual int GetStyle() const ;
ab9d0a8c
WS
67 wxBitmap *GetStipple() const ;
68
ab9d0a8c 69 virtual bool Ok() const { return (m_refData != NULL) ; }
52479aef
SC
70
71// Implementation
72
ab9d0a8c
WS
73 // Useful helper: create the brush resource
74 bool RealizeResource();
52479aef 75
ab9d0a8c
WS
76 // When setting properties, we must make sure we're not changing
77 // another object
78 void Unshare();
52479aef
SC
79};
80
81#endif
82 // _WX_BRUSH_H_