]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_stockobjs.i
Little tweaks to match CVS changes
[wxWidgets.git] / wxPython / src / _stockobjs.i
CommitLineData
d14a1e28
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: _stockobjs.i
3// Purpose: SWIG interface defining "stock" GDI objects
4//
5// Author: Robin Dunn
6//
7// Created: 13-Sept-2003
8// RCS-ID: $Id$
9// Copyright: (c) 2003 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17%newgroup
18
19
2b9048c5
RD
20// See also wxPy_ReinitStockObjects in helpers.cpp
21%immutable;
22
23wxFont* const wxNORMAL_FONT;
24wxFont* const wxSMALL_FONT;
25wxFont* const wxITALIC_FONT;
26wxFont* const wxSWISS_FONT;
27
28wxPen* const wxRED_PEN;
29wxPen* const wxCYAN_PEN;
30wxPen* const wxGREEN_PEN;
31wxPen* const wxBLACK_PEN;
32wxPen* const wxWHITE_PEN;
33wxPen* const wxTRANSPARENT_PEN;
34wxPen* const wxBLACK_DASHED_PEN;
35wxPen* const wxGREY_PEN;
36wxPen* const wxMEDIUM_GREY_PEN;
37wxPen* const wxLIGHT_GREY_PEN;
38
39wxBrush* const wxBLUE_BRUSH;
40wxBrush* const wxGREEN_BRUSH;
41wxBrush* const wxWHITE_BRUSH;
42wxBrush* const wxBLACK_BRUSH;
43wxBrush* const wxTRANSPARENT_BRUSH;
44wxBrush* const wxCYAN_BRUSH;
45wxBrush* const wxRED_BRUSH;
46wxBrush* const wxGREY_BRUSH;
47wxBrush* const wxMEDIUM_GREY_BRUSH;
48wxBrush* const wxLIGHT_GREY_BRUSH;
49
50wxColour* const wxBLACK;
51wxColour* const wxWHITE;
52wxColour* const wxRED;
53wxColour* const wxBLUE;
54wxColour* const wxGREEN;
55wxColour* const wxCYAN;
56wxColour* const wxLIGHT_GREY;
57
58wxCursor* const wxSTANDARD_CURSOR;
59wxCursor* const wxHOURGLASS_CURSOR;
60wxCursor* const wxCROSS_CURSOR;
61
62
63const wxBitmap wxNullBitmap;
64const wxIcon wxNullIcon;
65const wxCursor wxNullCursor;
66const wxPen wxNullPen;
67const wxBrush wxNullBrush;
68const wxPalette wxNullPalette;
69const wxFont wxNullFont;
70const wxColour wxNullColour;
71
72%mutable;
73
74
75//---------------------------------------------------------------------------
76
d14a1e28
RD
77class wxPenList : public wxObject {
78public:
79
80 void AddPen(wxPen* pen);
81 wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
82 void RemovePen(wxPen* pen);
83
84 int GetCount();
85};
86
87
88//---------------------------------------------------------------------------
89
90class wxBrushList : public wxObject {
91public:
92
93 void AddBrush(wxBrush *brush);
94 wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
95 void RemoveBrush(wxBrush *brush);
96
97 int GetCount();
98};
99
100//---------------------------------------------------------------------------
101
ab1f7d2a
RD
102MustHaveApp(wxColourDatabase);
103
d14a1e28
RD
104class wxColourDatabase : public wxObject {
105public:
106 wxColourDatabase();
107 ~wxColourDatabase();
108
109 // find colour by name or name for the given colour
110 wxColour Find(const wxString& name) const;
111 wxString FindName(const wxColour& colour) const;
112 %pythoncode { FindColour = Find }
113
114 // add a new colour to the database
115 void AddColour(const wxString& name, const wxColour& colour);
116
117 %extend {
118 void Append(const wxString& name, int red, int green, int blue) {
119 self->AddColour(name, wxColour(red, green, blue));
120 }
121 }
122};
123
124//---------------------------------------------------------------------------
125
126class wxFontList : public wxObject {
127public:
128
129 void AddFont(wxFont* font);
130 wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
a72f4631 131 bool underline = false, const wxString& facename = wxPyEmptyString,
d14a1e28
RD
132 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
133 void RemoveFont(wxFont *font);
134
135 int GetCount();
136};
137
138//---------------------------------------------------------------------------
139%newgroup
140
141
142
143// See also wxPy_ReinitStockObjects in helpers.cpp
144%immutable;
145
d14a1e28
RD
146wxFontList* const wxTheFontList;
147wxPenList* const wxThePenList;
148wxBrushList* const wxTheBrushList;
149wxColourDatabase* const wxTheColourDatabase;
150
151%mutable;
152
153
154//---------------------------------------------------------------------------
155
2b9048c5
RD
156%pythoncode { NullColor = NullColour }
157
158
159
160