]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/brush.cpp
Applied patch [ 743471 ] wxSplitter::Unsplit fix
[wxWidgets.git] / src / cocoa / brush.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: brush.cpp
3 // Purpose: wxBrush
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "brush.h"
14 #endif
15
16 #include "wx/setup.h"
17 #include "wx/utils.h"
18 #include "wx/brush.h"
19
20 #if !USE_SHARED_LIBRARIES
21 IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
22 #endif
23
24 #if 0 // WTF
25 wxBrushRefData::wxBrushRefData()
26 {
27 m_style = wxSOLID;
28 // TODO: null data
29 }
30
31 wxBrushRefData::wxBrushRefData(const wxBrushRefData& data)
32 {
33 m_style = data.m_style;
34 m_stipple = data.m_stipple;
35 m_colour = data.m_colour;
36 /* TODO: null data
37 m_hBrush = 0;
38 */
39 }
40
41 wxBrushRefData::~wxBrushRefData()
42 {
43 // TODO: delete data
44 }
45 #endif
46
47 // Brushes
48 wxBrush::wxBrush()
49 {
50 if ( wxTheBrushList )
51 wxTheBrushList->AddBrush(this);
52 }
53
54 wxBrush::~wxBrush()
55 {
56 if ( wxTheBrushList )
57 wxTheBrushList->RemoveBrush(this);
58 }
59
60 wxBrush::wxBrush(const wxColour& col, int Style)
61 {
62 if ( wxTheBrushList )
63 wxTheBrushList->AddBrush(this);
64 }
65
66 wxBrush::wxBrush(const wxBitmap& stipple)
67 {
68 if ( wxTheBrushList )
69 wxTheBrushList->AddBrush(this);
70 }
71
72 void wxBrush::Unshare()
73 {
74 }
75
76 void wxBrush::SetColour(const wxColour& col)
77 {
78 Unshare();
79 RealizeResource();
80 }
81
82 void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
83 {
84 Unshare();
85
86
87 RealizeResource();
88 }
89
90 void wxBrush::SetStyle(int Style)
91 {
92 Unshare();
93
94
95 RealizeResource();
96 }
97
98 void wxBrush::SetStipple(const wxBitmap& Stipple)
99 {
100 Unshare();
101
102
103 RealizeResource();
104 }
105
106 bool wxBrush::RealizeResource()
107 {
108 // TODO: create the brush
109 return FALSE;
110 }
111
112 int wxBrush::GetStyle() const
113 {
114 return 0;
115 }
116
117 wxColour& wxBrush::GetColour() const
118 {
119 return *wxWHITE;
120 }
121
122 // vi:sts=4:sw=5:et