]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/brush.cpp
Applied patch [ 735304 ] wxDisplay::ChangeMode - does not resize full-screen windows
[wxWidgets.git] / src / cocoa / brush.cpp
CommitLineData
a24aff65
DE
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
21IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
22#endif
23
24#if 0 // WTF
25wxBrushRefData::wxBrushRefData()
26{
27 m_style = wxSOLID;
28// TODO: null data
29}
30
31wxBrushRefData::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
41wxBrushRefData::~wxBrushRefData()
42{
43// TODO: delete data
44}
45#endif
46
47// Brushes
48wxBrush::wxBrush()
49{
50 if ( wxTheBrushList )
51 wxTheBrushList->AddBrush(this);
52}
53
54wxBrush::~wxBrush()
55{
56 if ( wxTheBrushList )
57 wxTheBrushList->RemoveBrush(this);
58}
59
60wxBrush::wxBrush(const wxColour& col, int Style)
61{
62 if ( wxTheBrushList )
63 wxTheBrushList->AddBrush(this);
64}
65
66wxBrush::wxBrush(const wxBitmap& stipple)
67{
68 if ( wxTheBrushList )
69 wxTheBrushList->AddBrush(this);
70}
71
72void wxBrush::Unshare()
73{
74}
75
76void wxBrush::SetColour(const wxColour& col)
77{
78 Unshare();
79 RealizeResource();
80}
81
82void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
83{
84 Unshare();
85
86
87 RealizeResource();
88}
89
90void wxBrush::SetStyle(int Style)
91{
92 Unshare();
93
94
95 RealizeResource();
96}
97
98void wxBrush::SetStipple(const wxBitmap& Stipple)
99{
100 Unshare();
101
102
103 RealizeResource();
104}
105
106bool wxBrush::RealizeResource()
107{
108// TODO: create the brush
109 return FALSE;
110}
111
112int wxBrush::GetStyle() const
113{
114return 0;
115}
116
117wxColour& wxBrush::GetColour() const
118{
119 return *wxWHITE;
120}
121
122// vi:sts=4:sw=5:et