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