]>
Commit | Line | Data |
---|---|---|
7bf85405 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gdi.i | |
3 | // Purpose: SWIG interface file for wxDC, wxBrush, wxPen, wxFont, etc. | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 7/7/97 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 1998 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
03e9bead RD |
14 | %module gdi |
15 | ||
16 | %{ | |
7bf85405 | 17 | #include "helpers.h" |
7bf85405 | 18 | #include <wx/metafile.h> |
af309447 | 19 | #include <wx/imaglist.h> |
105e45b9 | 20 | #ifndef __WXMSW__ |
08127323 | 21 | #include <wx/dcps.h> |
105e45b9 | 22 | #endif |
7bf85405 RD |
23 | %} |
24 | ||
25 | //---------------------------------------------------------------------- | |
26 | ||
27 | %include typemaps.i | |
28 | %include my_typemaps.i | |
29 | ||
30 | // Import some definitions of other classes, etc. | |
31 | %import _defs.i | |
32 | %import misc.i | |
33 | ||
34 | //--------------------------------------------------------------------------- | |
35 | ||
36 | class wxBitmap { | |
37 | public: | |
38 | wxBitmap(const wxString& name, long type); | |
39 | ~wxBitmap(); | |
40 | ||
fb5e0af0 | 41 | #ifdef __WXMSW__ |
7bf85405 | 42 | void Create(int width, int height, int depth = -1); |
fb5e0af0 | 43 | #endif |
7bf85405 RD |
44 | int GetDepth(); |
45 | int GetHeight(); | |
46 | wxPalette* GetPalette(); | |
47 | wxMask* GetMask(); | |
48 | int GetWidth(); | |
49 | bool LoadFile(const wxString& name, long flags); | |
50 | bool Ok(); | |
51 | bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL); | |
52 | void SetDepth(int depth); | |
53 | void SetHeight(int height); | |
54 | void SetMask(wxMask* mask); | |
fb5e0af0 | 55 | #ifdef __WXMSW__ |
b8b8dda7 | 56 | void SetPalette(wxPalette& palette); |
fb5e0af0 | 57 | #endif |
7bf85405 RD |
58 | void SetWidth(int width); |
59 | }; | |
60 | ||
61 | %new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1); | |
62 | wxBitmap* wxNoRefBitmap(char* name, long flags); | |
9c039d08 | 63 | |
8bf5d46e RD |
64 | #ifdef __WXMSW__ |
65 | %new wxBitmap* wxBitmapFromData(char* data, long type, | |
66 | int width, int height, int depth = 1); | |
67 | #endif | |
68 | ||
7bf85405 RD |
69 | %{ // Alternate 'constructor' |
70 | wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) { | |
71 | return new wxBitmap(width, height, depth); | |
72 | } | |
73 | ||
cf694132 RD |
74 | // This one won't own the reference, so Python |
75 | // won't call the dtor, this is good for | |
76 | // toolbars and such where the parent will | |
77 | // manage the bitmap. | |
7bf85405 RD |
78 | wxBitmap* wxNoRefBitmap(char* name, long flags) { |
79 | return new wxBitmap(name, flags); | |
80 | } | |
8bf5d46e RD |
81 | |
82 | #ifdef __WXMSW__ | |
83 | wxBitmap* wxBitmapFromData(char* data, long type, | |
84 | int width, int height, int depth = 1) { | |
85 | return new wxBitmap((void*)data, type, width, height, depth); | |
86 | } | |
87 | #endif | |
7bf85405 RD |
88 | %} |
89 | ||
90 | //--------------------------------------------------------------------------- | |
91 | ||
92 | class wxMask { | |
93 | public: | |
94 | wxMask(const wxBitmap& bitmap); | |
95 | ~wxMask(); | |
96 | }; | |
97 | ||
98 | %new wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour); | |
99 | %{ | |
100 | wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) { | |
101 | return new wxMask(bitmap, colour); | |
102 | } | |
103 | %} | |
104 | ||
105 | ||
106 | //--------------------------------------------------------------------------- | |
107 | ||
108 | ||
109 | class wxIcon : public wxBitmap { | |
110 | public: | |
fb5e0af0 RD |
111 | wxIcon(const wxString& name, long flags, |
112 | int desiredWidth = -1, int desiredHeight = -1); | |
7bf85405 RD |
113 | ~wxIcon(); |
114 | ||
115 | int GetDepth(); | |
116 | int GetHeight(); | |
117 | int GetWidth(); | |
118 | bool LoadFile(const wxString& name, long flags); | |
119 | bool Ok(); | |
120 | void SetDepth(int depth); | |
121 | void SetHeight(int height); | |
7bf85405 RD |
122 | void SetWidth(int width); |
123 | }; | |
124 | ||
8bf5d46e | 125 | |
7bf85405 RD |
126 | //--------------------------------------------------------------------------- |
127 | ||
128 | class wxCursor : public wxBitmap { | |
129 | public: | |
fb5e0af0 | 130 | #ifdef __WXMSW__ |
7bf85405 | 131 | wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0); |
fb5e0af0 | 132 | #endif |
7bf85405 RD |
133 | ~wxCursor(); |
134 | bool Ok(); | |
135 | }; | |
136 | ||
9c039d08 | 137 | %name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id); |
7bf85405 | 138 | %{ // Alternate 'constructor' |
9c039d08 | 139 | wxCursor* wxPyStockCursor(int id) { |
7bf85405 RD |
140 | return new wxCursor(id); |
141 | } | |
142 | %} | |
143 | ||
144 | //---------------------------------------------------------------------- | |
145 | ||
146 | class wxFont { | |
147 | public: | |
148 | // I'll do it this way to use long-lived objects and not have to | |
149 | // worry about when python may delete the object. | |
150 | %addmethods { | |
151 | wxFont( int pointSize, int family, int style, int weight, | |
152 | int underline=FALSE, char* faceName = "") { | |
153 | ||
154 | return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, | |
155 | underline, faceName); | |
156 | } | |
157 | // NO Destructor. | |
158 | } | |
159 | ||
160 | ||
161 | wxString GetFaceName(); | |
162 | int GetFamily(); | |
08127323 | 163 | #ifdef __WXMSW__ |
7bf85405 | 164 | int GetFontId(); |
08127323 | 165 | #endif |
7bf85405 RD |
166 | int GetPointSize(); |
167 | int GetStyle(); | |
168 | bool GetUnderlined(); | |
169 | int GetWeight(); | |
170 | void SetFaceName(const wxString& faceName); | |
171 | void SetFamily(int family); | |
172 | void SetPointSize(int pointSize); | |
173 | void SetStyle(int style); | |
174 | void SetUnderlined(bool underlined); | |
175 | void SetWeight(int weight); | |
176 | }; | |
177 | ||
178 | //---------------------------------------------------------------------- | |
179 | ||
180 | class wxColour { | |
181 | public: | |
182 | wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0); | |
183 | ~wxColour(); | |
184 | unsigned char Red(); | |
185 | unsigned char Green(); | |
186 | unsigned char Blue(); | |
187 | bool Ok(); | |
188 | void Set(unsigned char red, unsigned char green, unsigned char blue); | |
189 | %addmethods { | |
190 | PyObject* Get() { | |
191 | PyObject* rv = PyTuple_New(3); | |
192 | PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red())); | |
193 | PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green())); | |
194 | PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue())); | |
195 | return rv; | |
196 | } | |
197 | } | |
198 | }; | |
199 | ||
200 | %new wxColour* wxNamedColour(const wxString& colorName); | |
201 | %{ // Alternate 'constructor' | |
202 | wxColour* wxNamedColour(const wxString& colorName) { | |
203 | return new wxColour(colorName); | |
204 | } | |
205 | %} | |
206 | ||
207 | ||
208 | //---------------------------------------------------------------------- | |
209 | ||
210 | typedef unsigned long wxDash; | |
211 | ||
212 | class wxPen { | |
213 | public: | |
214 | // I'll do it this way to use long-lived objects and not have to | |
215 | // worry about when python may delete the object. | |
216 | %addmethods { | |
217 | wxPen(wxColour* colour, int width=1, int style=wxSOLID) { | |
218 | return wxThePenList->FindOrCreatePen(*colour, width, style); | |
219 | } | |
220 | // NO Destructor. | |
221 | } | |
222 | ||
223 | int GetCap(); | |
224 | wxColour& GetColour(); | |
225 | ||
fb5e0af0 | 226 | int GetJoin(); |
7bf85405 RD |
227 | int GetStyle(); |
228 | int GetWidth(); | |
229 | bool Ok(); | |
230 | void SetCap(int cap_style); | |
231 | void SetColour(wxColour& colour); | |
aeeb6a44 RR |
232 | void SetJoin(int join_style); |
233 | void SetStyle(int style); | |
234 | void SetWidth(int width); | |
08127323 | 235 | |
fb5e0af0 | 236 | #ifdef __WXMSW__ |
aeeb6a44 RR |
237 | // **** This one needs to return a list of ints (wxDash) |
238 | int GetDashes(wxDash **dashes); | |
239 | wxBitmap* GetStipple(); | |
7bf85405 | 240 | void SetDashes(int LCOUNT, wxDash* LIST); |
b8b8dda7 | 241 | void SetStipple(wxBitmap& stipple); |
fb5e0af0 | 242 | #endif |
7bf85405 RD |
243 | }; |
244 | ||
245 | //---------------------------------------------------------------------- | |
246 | ||
247 | class wxBrush { | |
248 | public: | |
249 | // I'll do it this way to use long-lived objects and not have to | |
250 | // worry about when python may delete the object. | |
251 | %addmethods { | |
252 | wxBrush(wxColour* colour, int style=wxSOLID) { | |
253 | return wxTheBrushList->FindOrCreateBrush(*colour, style); | |
254 | } | |
255 | // NO Destructor. | |
256 | } | |
257 | ||
258 | wxColour& GetColour(); | |
259 | wxBitmap * GetStipple(); | |
260 | int GetStyle(); | |
261 | bool Ok(); | |
262 | void SetColour(wxColour &colour); | |
b8b8dda7 | 263 | void SetStipple(wxBitmap& bitmap); |
7bf85405 RD |
264 | void SetStyle(int style); |
265 | }; | |
266 | ||
267 | //---------------------------------------------------------------------- | |
268 | ||
269 | ||
270 | ||
271 | class wxDC { | |
272 | public: | |
fb5e0af0 | 273 | // wxDC(); **** abstract base class, can't instantiate. |
7bf85405 RD |
274 | ~wxDC(); |
275 | ||
276 | void BeginDrawing(); | |
efc5f224 RD |
277 | // %name(BlitXY) |
278 | bool Blit(long xdest, long ydest, | |
279 | long width, long height, | |
280 | wxDC *source, long xsrc, long ysrc, | |
281 | int logicalFunc = wxCOPY, int useMask = FALSE); | |
282 | // bool Blit(const wxPoint& destPt, const wxSize& sz, | |
283 | // wxDC *source, const wxPoint& srcPt, | |
284 | // int logicalFunc = wxCOPY, int useMask = FALSE); | |
285 | ||
7bf85405 RD |
286 | void Clear(); |
287 | void CrossHair(long x, long y); | |
288 | void DestroyClippingRegion(); | |
289 | long DeviceToLogicalX(long x); | |
290 | long DeviceToLogicalXRel(long x); | |
291 | long DeviceToLogicalY(long y); | |
292 | long DeviceToLogicalYRel(long y); | |
293 | void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc); | |
bb0054cd | 294 | void DrawCircle(long x, long y, long radius); |
7bf85405 RD |
295 | void DrawEllipse(long x, long y, long width, long height); |
296 | void DrawEllipticArc(long x, long y, long width, long height, long start, long end); | |
297 | void DrawIcon(const wxIcon& icon, long x, long y); | |
298 | void DrawLine(long x1, long y1, long x2, long y2); | |
299 | void DrawLines(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0); | |
300 | void DrawPolygon(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0, | |
301 | int fill_style=wxODDEVEN_RULE); | |
302 | void DrawPoint(long x, long y); | |
303 | void DrawRectangle(long x, long y, long width, long height); | |
304 | void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20); | |
305 | void DrawSpline(int LCOUNT, wxPoint* LIST); | |
306 | void DrawText(const wxString& text, long x, long y); | |
307 | void EndDoc(); | |
308 | void EndDrawing(); | |
309 | void EndPage(); | |
310 | void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE); | |
b8b8dda7 RD |
311 | wxBrush& GetBackground(); |
312 | wxBrush& GetBrush(); | |
7bf85405 RD |
313 | long GetCharHeight(); |
314 | long GetCharWidth(); | |
315 | void GetClippingBox(long *OUTPUT, long *OUTPUT, | |
316 | long *OUTPUT, long *OUTPUT); | |
b8b8dda7 | 317 | wxFont& GetFont(); |
7bf85405 RD |
318 | int GetLogicalFunction(); |
319 | int GetMapMode(); | |
320 | bool GetOptimization(); | |
b8b8dda7 | 321 | wxPen& GetPen(); |
fb5e0af0 RD |
322 | %addmethods { |
323 | %new wxColour* GetPixel(long x, long y) { | |
324 | wxColour* wc = new wxColour(); | |
325 | self->GetPixel(x, y, wc); | |
326 | return wc; | |
327 | } | |
328 | } | |
bb0054cd RD |
329 | %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT); |
330 | wxSize GetSize(); | |
7bf85405 | 331 | wxColour& GetTextBackground(); |
af309447 RD |
332 | void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT); |
333 | %name(GetFullTextExtent)void GetTextExtent(const wxString& string, | |
334 | long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT, | |
335 | const wxFont* font = NULL); | |
7bf85405 RD |
336 | wxColour& GetTextForeground(); |
337 | long LogicalToDeviceX(long x); | |
338 | long LogicalToDeviceXRel(long x); | |
339 | long LogicalToDeviceY(long y); | |
340 | long LogicalToDeviceYRel(long y); | |
341 | long MaxX(); | |
342 | long MaxY(); | |
343 | long MinX(); | |
344 | long MinY(); | |
345 | bool Ok(); | |
346 | void SetDeviceOrigin(long x, long y); | |
347 | void SetBackground(const wxBrush& brush); | |
348 | void SetBackgroundMode(int mode); | |
349 | void SetClippingRegion(long x, long y, long width, long height); | |
350 | void SetPalette(const wxPalette& colourMap); | |
351 | void SetBrush(const wxBrush& brush); | |
352 | void SetFont(const wxFont& font); | |
353 | void SetLogicalFunction(int function); | |
354 | void SetMapMode(int mode); | |
355 | void SetOptimization(bool optimize); | |
356 | void SetPen(const wxPen& pen); | |
357 | void SetTextBackground(const wxColour& colour); | |
358 | void SetTextForeground(const wxColour& colour); | |
359 | void SetUserScale(double x_scale, double y_scale); | |
360 | bool StartDoc(const wxString& message); | |
361 | void StartPage(); | |
362 | ||
363 | ||
efc5f224 RD |
364 | // Don't need this one anymore as wxWindows has one... |
365 | // %addmethods { | |
366 | // // This one is my own creation... | |
367 | // void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) { | |
368 | // wxMemoryDC* memDC = new wxMemoryDC; | |
369 | // memDC->SelectObject(bitmap); | |
370 | // #ifdef __WXMSW__ | |
371 | // if (swapPalette) | |
372 | // self->SetPalette(*bitmap.GetPalette()); | |
373 | // #endif | |
374 | // self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC, | |
375 | // 0, 0, self->GetLogicalFunction()); | |
376 | // memDC->SelectObject(wxNullBitmap); | |
377 | // delete memDC; | |
378 | // } | |
379 | // } | |
380 | ||
381 | void DrawBitmap(const wxBitmap& bitmap, long x, long y, | |
382 | int useMask = FALSE); | |
383 | ||
7bf85405 RD |
384 | }; |
385 | ||
386 | ||
387 | //---------------------------------------------------------------------- | |
388 | ||
389 | class wxMemoryDC : public wxDC { | |
390 | public: | |
391 | wxMemoryDC(); | |
392 | ||
393 | void SelectObject(const wxBitmap& bitmap); | |
394 | } | |
395 | ||
396 | %new wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC); | |
397 | %{ // Alternate 'constructor' | |
398 | wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) { | |
399 | return new wxMemoryDC(oldDC); | |
400 | } | |
401 | %} | |
402 | ||
403 | ||
404 | //--------------------------------------------------------------------------- | |
405 | ||
406 | class wxScreenDC : public wxDC { | |
407 | public: | |
408 | wxScreenDC(); | |
409 | ||
410 | bool StartDrawingOnTop(wxWindow* window); | |
411 | %name(StartDrawingOnTopRect) bool StartDrawingOnTop(wxRect* rect = NULL); | |
412 | bool EndDrawingOnTop(); | |
413 | }; | |
414 | ||
415 | //--------------------------------------------------------------------------- | |
416 | ||
417 | class wxClientDC : public wxDC { | |
418 | public: | |
419 | wxClientDC(wxWindow* win); | |
420 | }; | |
421 | ||
422 | //--------------------------------------------------------------------------- | |
423 | ||
424 | class wxPaintDC : public wxDC { | |
425 | public: | |
426 | wxPaintDC(wxWindow* win); | |
427 | }; | |
428 | ||
429 | //--------------------------------------------------------------------------- | |
430 | ||
b639c3c5 RD |
431 | class wxWindowDC : public wxDC { |
432 | public: | |
433 | wxWindowDC(wxWindow* win); | |
434 | }; | |
b639c3c5 RD |
435 | |
436 | //--------------------------------------------------------------------------- | |
437 | ||
be4d9c1f | 438 | #ifndef __WXMSW__ |
7bf85405 RD |
439 | class wxPostScriptDC : public wxDC { |
440 | public: | |
441 | wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL); | |
442 | }; | |
be4d9c1f | 443 | #endif |
7bf85405 RD |
444 | |
445 | //--------------------------------------------------------------------------- | |
446 | ||
fb5e0af0 | 447 | #ifdef __WXMSW__ |
7bf85405 RD |
448 | class wxPrinterDC : public wxDC { |
449 | public: | |
450 | wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, | |
451 | bool interactive = TRUE, int orientation = wxPORTRAIT); | |
452 | }; | |
fb5e0af0 | 453 | #endif |
7bf85405 RD |
454 | |
455 | //--------------------------------------------------------------------------- | |
456 | ||
fb5e0af0 | 457 | #ifdef __WXMSW__ |
7bf85405 RD |
458 | class wxMetaFileDC : public wxDC { |
459 | public: | |
460 | wxMetaFileDC(const wxString& filename = wxPyEmptyStr); | |
461 | wxMetaFile* Close(); | |
462 | }; | |
fb5e0af0 | 463 | #endif |
7bf85405 RD |
464 | |
465 | //--------------------------------------------------------------------------- | |
466 | //--------------------------------------------------------------------------- | |
467 | ||
468 | ||
469 | %readonly | |
af309447 RD |
470 | %{ |
471 | #if 0 | |
472 | %} | |
7bf85405 RD |
473 | extern wxFont *wxNORMAL_FONT; |
474 | extern wxFont *wxSMALL_FONT; | |
475 | extern wxFont *wxITALIC_FONT; | |
476 | extern wxFont *wxSWISS_FONT; | |
7bf85405 | 477 | |
1afc06c2 | 478 | extern wxPen *wxRED_PEN; |
7bf85405 RD |
479 | extern wxPen *wxCYAN_PEN; |
480 | extern wxPen *wxGREEN_PEN; | |
481 | extern wxPen *wxBLACK_PEN; | |
482 | extern wxPen *wxWHITE_PEN; | |
483 | extern wxPen *wxTRANSPARENT_PEN; | |
484 | extern wxPen *wxBLACK_DASHED_PEN; | |
485 | extern wxPen *wxGREY_PEN; | |
486 | extern wxPen *wxMEDIUM_GREY_PEN; | |
487 | extern wxPen *wxLIGHT_GREY_PEN; | |
488 | ||
489 | extern wxBrush *wxBLUE_BRUSH; | |
490 | extern wxBrush *wxGREEN_BRUSH; | |
491 | extern wxBrush *wxWHITE_BRUSH; | |
492 | extern wxBrush *wxBLACK_BRUSH; | |
493 | extern wxBrush *wxTRANSPARENT_BRUSH; | |
494 | extern wxBrush *wxCYAN_BRUSH; | |
495 | extern wxBrush *wxRED_BRUSH; | |
496 | extern wxBrush *wxGREY_BRUSH; | |
497 | extern wxBrush *wxMEDIUM_GREY_BRUSH; | |
498 | extern wxBrush *wxLIGHT_GREY_BRUSH; | |
499 | ||
500 | extern wxColour *wxBLACK; | |
501 | extern wxColour *wxWHITE; | |
502 | extern wxColour *wxRED; | |
503 | extern wxColour *wxBLUE; | |
504 | extern wxColour *wxGREEN; | |
505 | extern wxColour *wxCYAN; | |
506 | extern wxColour *wxLIGHT_GREY; | |
507 | ||
508 | extern wxCursor *wxSTANDARD_CURSOR; | |
509 | extern wxCursor *wxHOURGLASS_CURSOR; | |
510 | extern wxCursor *wxCROSS_CURSOR; | |
511 | ||
512 | extern wxBitmap wxNullBitmap; | |
513 | extern wxIcon wxNullIcon; | |
514 | extern wxCursor wxNullCursor; | |
515 | extern wxPen wxNullPen; | |
516 | extern wxBrush wxNullBrush; | |
517 | extern wxPalette wxNullPalette; | |
518 | extern wxFont wxNullFont; | |
519 | extern wxColour wxNullColour; | |
520 | ||
af309447 RD |
521 | %readwrite |
522 | %{ | |
523 | #endif | |
524 | %} | |
525 | ||
b639c3c5 RD |
526 | //--------------------------------------------------------------------------- |
527 | ||
528 | class wxPalette { | |
529 | public: | |
530 | wxPalette(int LCOUNT, byte* LIST, byte* LIST, byte* LIST); | |
531 | ~wxPalette(); | |
532 | ||
533 | int GetPixel(byte red, byte green, byte blue); | |
534 | bool GetRGB(int pixel, byte* OUTPUT, byte* OUTPUT, byte* OUTPUT); | |
535 | bool Ok(); | |
536 | }; | |
537 | ||
538 | //--------------------------------------------------------------------------- | |
539 | ||
af309447 RD |
540 | enum { |
541 | wxIMAGELIST_DRAW_NORMAL , | |
542 | wxIMAGELIST_DRAW_TRANSPARENT, | |
543 | wxIMAGELIST_DRAW_SELECTED, | |
544 | wxIMAGELIST_DRAW_FOCUSED, | |
545 | wxIMAGE_LIST_NORMAL, | |
546 | wxIMAGE_LIST_SMALL, | |
547 | wxIMAGE_LIST_STATE | |
548 | }; | |
549 | ||
550 | class wxImageList { | |
551 | public: | |
552 | wxImageList(int width, int height, const bool mask=TRUE, int initialCount=1); | |
553 | ~wxImageList(); | |
554 | ||
b57bdb5a | 555 | #ifdef __WXMSW__ |
af309447 RD |
556 | int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); |
557 | %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour); | |
558 | %name(AddIcon)int Add(const wxIcon& icon); | |
b57bdb5a RD |
559 | bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); |
560 | %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon); | |
561 | #else | |
562 | int Add(const wxBitmap& bitmap); | |
563 | bool Replace(int index, const wxBitmap& bitmap); | |
564 | #endif | |
af309447 RD |
565 | |
566 | bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL, | |
567 | const bool solidBackground = FALSE); | |
568 | ||
569 | int GetImageCount(); | |
570 | bool Remove(int index); | |
571 | bool RemoveAll(); | |
af309447 RD |
572 | }; |
573 | ||
b639c3c5 | 574 | |
7bf85405 RD |
575 | //--------------------------------------------------------------------------- |
576 |