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