]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/classic/brush.h
first character of a command in a make rule must be TAB (not space or #): fixes build...
[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
52479aef
SC
15#include "wx/gdicmn.h"
16#include "wx/gdiobj.h"
17#include "wx/bitmap.h"
18
19class WXDLLEXPORT wxBrush;
20
ab9d0a8c 21typedef enum
52479aef 22{
ab9d0a8c
WS
23 kwxMacBrushColour ,
24 kwxMacBrushTheme ,
25 kwxMacBrushThemeBackground
52479aef
SC
26} wxMacBrushKind ;
27
28// Brush
cb9d5bd0 29class WXDLLEXPORT wxBrush: public wxBrushBase
52479aef 30{
ab9d0a8c 31 DECLARE_DYNAMIC_CLASS(wxBrush)
52479aef
SC
32
33public:
ab9d0a8c
WS
34 wxBrush();
35 wxBrush(short macThemeBrush ) ;
36 wxBrush(const wxColour& col, int style = wxSOLID);
37 wxBrush(const wxBitmap& stipple);
38 wxBrush(const wxBrush& brush)
cb9d5bd0 39 : wxBrushBase()
ab9d0a8c
WS
40 { Ref(brush); }
41 ~wxBrush();
42
43 virtual void SetColour(const wxColour& col) ;
44 virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
45 virtual void SetStyle(int style) ;
46 virtual void SetStipple(const wxBitmap& stipple) ;
47 virtual void SetMacTheme(short macThemeBrush) ;
48 virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
49
50 wxBrush& operator = (const wxBrush& brush)
51 { if (*this == brush) return (*this); Ref(brush); return *this; }
fbfb8bcc 52 bool operator == (const wxBrush& brush) const
ab9d0a8c 53 { return m_refData == brush.m_refData; }
fbfb8bcc 54 bool operator != (const wxBrush& brush) const
ab9d0a8c
WS
55 { return m_refData != brush.m_refData; }
56
57 wxMacBrushKind MacGetBrushKind() const ;
58
59 unsigned long GetMacThemeBackground(WXRECTPTR extent) const ;
60 short GetMacTheme() const ;
61 wxColour& GetColour() const ;
cb9d5bd0 62 virtual int GetStyle() const ;
ab9d0a8c
WS
63 wxBitmap *GetStipple() const ;
64
ab9d0a8c 65 virtual bool Ok() const { return (m_refData != NULL) ; }
52479aef
SC
66
67// Implementation
68
ab9d0a8c
WS
69 // Useful helper: create the brush resource
70 bool RealizeResource();
52479aef 71
ab9d0a8c
WS
72 // When setting properties, we must make sure we're not changing
73 // another object
74 void Unshare();
52479aef
SC
75};
76
77#endif
78 // _WX_BRUSH_H_