]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/gdi.i
new tests
[wxWidgets.git] / utils / wxPython / src / gdi.i
CommitLineData
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
5bff6bb8
RD
36// class wxGDIImage {
37// public:
38// long GetHandle();
39// void SetHandle(long handle);
40// bool Ok();
41// int GetWidth();
42// int GetHeight();
43// int GetDepth();
44// void SetWidth(int w);
45// void SetHeight(int h);
46// void SetDepth(int d);
47// void SetSize(const wxSize& size);
48// };
6999b0d8
RD
49
50//---------------------------------------------------------------------------
51
5bff6bb8
RD
52class wxBitmap
53//: public wxGDIImage
54{
7bf85405
RD
55public:
56 wxBitmap(const wxString& name, long type);
57 ~wxBitmap();
58
7bf85405
RD
59 wxPalette* GetPalette();
60 wxMask* GetMask();
7bf85405 61 bool LoadFile(const wxString& name, long flags);
7bf85405 62 bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL);
7bf85405 63 void SetMask(wxMask* mask);
fb5e0af0 64#ifdef __WXMSW__
b8b8dda7 65 void SetPalette(wxPalette& palette);
fb5e0af0 66#endif
5bff6bb8
RD
67
68 // wxGDIImage methods
69#ifdef __WXMSW__
70 long GetHandle();
71 void SetHandle(long handle);
72#endif
73 bool Ok();
74 int GetWidth();
75 int GetHeight();
76 int GetDepth();
77 void SetWidth(int w);
78 void SetHeight(int h);
79 void SetDepth(int d);
80#ifdef __WXMSW__
81 void SetSize(const wxSize& size);
82#endif
7bf85405
RD
83};
84
5bff6bb8 85
7bf85405 86%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
9c039d08 87
8bf5d46e
RD
88#ifdef __WXMSW__
89%new wxBitmap* wxBitmapFromData(char* data, long type,
90 int width, int height, int depth = 1);
91#endif
92
7bf85405
RD
93%{ // Alternate 'constructor'
94 wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) {
95 return new wxBitmap(width, height, depth);
96 }
97
8bf5d46e
RD
98#ifdef __WXMSW__
99 wxBitmap* wxBitmapFromData(char* data, long type,
100 int width, int height, int depth = 1) {
101 return new wxBitmap((void*)data, type, width, height, depth);
102 }
103#endif
7bf85405
RD
104%}
105
106//---------------------------------------------------------------------------
107
108class wxMask {
109public:
110 wxMask(const wxBitmap& bitmap);
eb715945 111 //~wxMask();
7bf85405
RD
112};
113
114%new wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour);
115%{
116 wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) {
117 return new wxMask(bitmap, colour);
118 }
119%}
120
121
122//---------------------------------------------------------------------------
123
124
5bff6bb8
RD
125class wxIcon
126//: public wxGDIImage
127{
7bf85405 128public:
fb5e0af0
RD
129 wxIcon(const wxString& name, long flags,
130 int desiredWidth = -1, int desiredHeight = -1);
7bf85405
RD
131 ~wxIcon();
132
7bf85405 133 bool LoadFile(const wxString& name, long flags);
5bff6bb8
RD
134
135 // wxGDIImage methods
136#ifdef __WXMSW__
137 long GetHandle();
138 void SetHandle(long handle);
139#endif
140 bool Ok();
141 int GetWidth();
142 int GetHeight();
143 int GetDepth();
144 void SetWidth(int w);
145 void SetHeight(int h);
146 void SetDepth(int d);
147#ifdef __WXMSW__
148 void SetSize(const wxSize& size);
149#endif
7bf85405
RD
150};
151
8bf5d46e 152
7bf85405
RD
153//---------------------------------------------------------------------------
154
5bff6bb8
RD
155class wxCursor
156//: public wxGDIImage
157{
7bf85405 158public:
fb5e0af0 159#ifdef __WXMSW__
7bf85405 160 wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
fb5e0af0 161#endif
7bf85405 162 ~wxCursor();
5bff6bb8
RD
163
164 // wxGDIImage methods
165#ifdef __WXMSW__
166 long GetHandle();
167 void SetHandle(long handle);
168#endif
169 bool Ok();
170#ifdef __WXMSW__
171 int GetWidth();
172 int GetHeight();
173 int GetDepth();
174 void SetWidth(int w);
175 void SetHeight(int h);
176 void SetDepth(int d);
177 void SetSize(const wxSize& size);
178#endif
7bf85405
RD
179};
180
9c039d08 181%name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
7bf85405 182%{ // Alternate 'constructor'
9c039d08 183 wxCursor* wxPyStockCursor(int id) {
7bf85405
RD
184 return new wxCursor(id);
185 }
186%}
187
188//----------------------------------------------------------------------
189
f0261a72
RD
190
191enum wxFontEncoding
192{
193 wxFONTENCODING_SYSTEM = -1, // system default
194 wxFONTENCODING_DEFAULT, // current default encoding
195
196 // ISO8859 standard defines a number of single-byte charsets
197 wxFONTENCODING_ISO8859_1, // West European (Latin1)
198 wxFONTENCODING_ISO8859_2, // Central and East European (Latin2)
199 wxFONTENCODING_ISO8859_3, // Esperanto (Latin3)
200 wxFONTENCODING_ISO8859_4, // Baltic languages (Estonian) (Latin4)
201 wxFONTENCODING_ISO8859_5, // Cyrillic
202 wxFONTENCODING_ISO8859_6, // Arabic
203 wxFONTENCODING_ISO8859_7, // Greek
204 wxFONTENCODING_ISO8859_8, // Hebrew
205 wxFONTENCODING_ISO8859_9, // Turkish (Latin5)
206 wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6)
207 wxFONTENCODING_ISO8859_11, // Thai
208 wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it
209 // here anyhow to make all ISO8859
210 // consecutive numbers
211 wxFONTENCODING_ISO8859_13, // Latin7
212 wxFONTENCODING_ISO8859_14, // Latin8
213 wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro)
214
215 // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html)
216 wxFONTENCODING_KOI8, // we don't support any of KOI8 variants
217 wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866
218 wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria
219
220 // what would we do without Microsoft? They have their own encodings
221 // for DOS
222 wxFONTENCODING_CP437, // original MS-DOS codepage
223 wxFONTENCODING_CP850, // CP437 merged with Latin1
224 wxFONTENCODING_CP852, // CP437 merged with Latin2
225 wxFONTENCODING_CP855, // another cyrillic encoding
226 wxFONTENCODING_CP866, // and another one
227 // and for Windows
228 wxFONTENCODING_CP1250, // WinLatin2
229 wxFONTENCODING_CP1251, // WinCyrillic
230 wxFONTENCODING_CP1252, // WinLatin1
231
232 wxFONTENCODING_MAX
233};
234
7bf85405
RD
235class wxFont {
236public:
237 // I'll do it this way to use long-lived objects and not have to
238 // worry about when python may delete the object.
239 %addmethods {
240 wxFont( int pointSize, int family, int style, int weight,
f0261a72
RD
241 int underline=FALSE, char* faceName = "",
242 wxFontEncoding encoding=wxFONTENCODING_DEFAULT) {
7bf85405
RD
243
244 return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight,
694759cf 245 underline, faceName, encoding);
7bf85405
RD
246 }
247 // NO Destructor.
248 }
249
694759cf 250 bool Ok();
7bf85405
RD
251
252 wxString GetFaceName();
253 int GetFamily();
08127323 254#ifdef __WXMSW__
7bf85405 255 int GetFontId();
08127323 256#endif
7bf85405
RD
257 int GetPointSize();
258 int GetStyle();
259 bool GetUnderlined();
260 int GetWeight();
f0261a72 261 wxFontEncoding GetEncoding();
7bf85405
RD
262 void SetFaceName(const wxString& faceName);
263 void SetFamily(int family);
264 void SetPointSize(int pointSize);
265 void SetStyle(int style);
266 void SetUnderlined(bool underlined);
267 void SetWeight(int weight);
f0261a72
RD
268 void SetEncoding(wxFontEncoding encoding);
269 wxString GetFamilyString();
270 wxString GetStyleString();
271 wxString GetWeightString();
7bf85405
RD
272};
273
f0261a72
RD
274%inline %{
275 wxFontEncoding wxFont_GetDefaultEncoding() {
276 return wxFont::GetDefaultEncoding();
277 }
278
279 void wxFont_SetDefaultEncoding(wxFontEncoding encoding) {
280 wxFont::SetDefaultEncoding(encoding);
281 }
282%}
283
7bf85405
RD
284//----------------------------------------------------------------------
285
286class wxColour {
287public:
288 wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0);
289 ~wxColour();
290 unsigned char Red();
291 unsigned char Green();
292 unsigned char Blue();
293 bool Ok();
294 void Set(unsigned char red, unsigned char green, unsigned char blue);
295 %addmethods {
296 PyObject* Get() {
297 PyObject* rv = PyTuple_New(3);
298 PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red()));
299 PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green()));
300 PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue()));
301 return rv;
302 }
303 }
9b3d3bc4
RD
304 %pragma(python) addtoclass = "asTuple = Get"
305 %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())"
306 %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())"
307
7bf85405
RD
308};
309
310%new wxColour* wxNamedColour(const wxString& colorName);
311%{ // Alternate 'constructor'
312 wxColour* wxNamedColour(const wxString& colorName) {
313 return new wxColour(colorName);
314 }
315%}
316
317
318//----------------------------------------------------------------------
319
6999b0d8 320#ifdef __WXMSW__
7bf85405 321typedef unsigned long wxDash;
6999b0d8 322#else
5bff6bb8 323typedef char wxDash;
6999b0d8
RD
324#endif
325
7bf85405
RD
326
327class wxPen {
328public:
329 // I'll do it this way to use long-lived objects and not have to
330 // worry about when python may delete the object.
331 %addmethods {
332 wxPen(wxColour* colour, int width=1, int style=wxSOLID) {
333 return wxThePenList->FindOrCreatePen(*colour, width, style);
334 }
335 // NO Destructor.
336 }
337
338 int GetCap();
339 wxColour& GetColour();
340
fb5e0af0 341 int GetJoin();
7bf85405
RD
342 int GetStyle();
343 int GetWidth();
344 bool Ok();
345 void SetCap(int cap_style);
346 void SetColour(wxColour& colour);
aeeb6a44
RR
347 void SetJoin(int join_style);
348 void SetStyle(int style);
349 void SetWidth(int width);
08127323 350
aeeb6a44
RR
351 // **** This one needs to return a list of ints (wxDash)
352 int GetDashes(wxDash **dashes);
7bf85405 353 void SetDashes(int LCOUNT, wxDash* LIST);
6999b0d8
RD
354
355#ifdef __WXMSW__
356 wxBitmap* GetStipple();
b8b8dda7 357 void SetStipple(wxBitmap& stipple);
fb5e0af0 358#endif
7bf85405
RD
359};
360
361//----------------------------------------------------------------------
362
363class wxBrush {
364public:
365 // I'll do it this way to use long-lived objects and not have to
366 // worry about when python may delete the object.
367 %addmethods {
368 wxBrush(wxColour* colour, int style=wxSOLID) {
369 return wxTheBrushList->FindOrCreateBrush(*colour, style);
370 }
371 // NO Destructor.
372 }
373
374 wxColour& GetColour();
375 wxBitmap * GetStipple();
376 int GetStyle();
377 bool Ok();
378 void SetColour(wxColour &colour);
b8b8dda7 379 void SetStipple(wxBitmap& bitmap);
7bf85405
RD
380 void SetStyle(int style);
381};
382
383//----------------------------------------------------------------------
384
385
386
387class wxDC {
388public:
fb5e0af0 389// wxDC(); **** abstract base class, can't instantiate.
7bf85405
RD
390 ~wxDC();
391
392 void BeginDrawing();
efc5f224
RD
393// %name(BlitXY)
394 bool Blit(long xdest, long ydest,
395 long width, long height,
396 wxDC *source, long xsrc, long ysrc,
397 int logicalFunc = wxCOPY, int useMask = FALSE);
398// bool Blit(const wxPoint& destPt, const wxSize& sz,
399// wxDC *source, const wxPoint& srcPt,
400// int logicalFunc = wxCOPY, int useMask = FALSE);
401
7bf85405
RD
402 void Clear();
403 void CrossHair(long x, long y);
404 void DestroyClippingRegion();
405 long DeviceToLogicalX(long x);
406 long DeviceToLogicalXRel(long x);
407 long DeviceToLogicalY(long y);
408 long DeviceToLogicalYRel(long y);
409 void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc);
bb0054cd 410 void DrawCircle(long x, long y, long radius);
7bf85405
RD
411 void DrawEllipse(long x, long y, long width, long height);
412 void DrawEllipticArc(long x, long y, long width, long height, long start, long end);
413 void DrawIcon(const wxIcon& icon, long x, long y);
414 void DrawLine(long x1, long y1, long x2, long y2);
415 void DrawLines(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0);
416 void DrawPolygon(int LCOUNT, wxPoint* LIST, long xoffset=0, long yoffset=0,
417 int fill_style=wxODDEVEN_RULE);
418 void DrawPoint(long x, long y);
419 void DrawRectangle(long x, long y, long width, long height);
6999b0d8 420 void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
7bf85405
RD
421 void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
422 void DrawSpline(int LCOUNT, wxPoint* LIST);
423 void DrawText(const wxString& text, long x, long y);
424 void EndDoc();
425 void EndDrawing();
426 void EndPage();
427 void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE);
b8b8dda7
RD
428 wxBrush& GetBackground();
429 wxBrush& GetBrush();
7bf85405
RD
430 long GetCharHeight();
431 long GetCharWidth();
432 void GetClippingBox(long *OUTPUT, long *OUTPUT,
433 long *OUTPUT, long *OUTPUT);
b8b8dda7 434 wxFont& GetFont();
7bf85405
RD
435 int GetLogicalFunction();
436 int GetMapMode();
437 bool GetOptimization();
b8b8dda7 438 wxPen& GetPen();
fb5e0af0
RD
439 %addmethods {
440 %new wxColour* GetPixel(long x, long y) {
441 wxColour* wc = new wxColour();
442 self->GetPixel(x, y, wc);
443 return wc;
444 }
445 }
bb0054cd
RD
446 %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
447 wxSize GetSize();
7bf85405 448 wxColour& GetTextBackground();
af309447
RD
449 void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
450 %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
451 long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT,
452 const wxFont* font = NULL);
7bf85405
RD
453 wxColour& GetTextForeground();
454 long LogicalToDeviceX(long x);
455 long LogicalToDeviceXRel(long x);
456 long LogicalToDeviceY(long y);
457 long LogicalToDeviceYRel(long y);
458 long MaxX();
459 long MaxY();
460 long MinX();
461 long MinY();
462 bool Ok();
463 void SetDeviceOrigin(long x, long y);
464 void SetBackground(const wxBrush& brush);
465 void SetBackgroundMode(int mode);
466 void SetClippingRegion(long x, long y, long width, long height);
467 void SetPalette(const wxPalette& colourMap);
468 void SetBrush(const wxBrush& brush);
469 void SetFont(const wxFont& font);
470 void SetLogicalFunction(int function);
471 void SetMapMode(int mode);
472 void SetOptimization(bool optimize);
473 void SetPen(const wxPen& pen);
474 void SetTextBackground(const wxColour& colour);
475 void SetTextForeground(const wxColour& colour);
476 void SetUserScale(double x_scale, double y_scale);
477 bool StartDoc(const wxString& message);
478 void StartPage();
479
480
efc5f224
RD
481// Don't need this one anymore as wxWindows has one...
482// %addmethods {
483// // This one is my own creation...
484// void DrawBitmap(wxBitmap& bitmap, long x, long y, bool swapPalette=TRUE) {
485// wxMemoryDC* memDC = new wxMemoryDC;
486// memDC->SelectObject(bitmap);
487// #ifdef __WXMSW__
488// if (swapPalette)
489// self->SetPalette(*bitmap.GetPalette());
490// #endif
491// self->Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), memDC,
492// 0, 0, self->GetLogicalFunction());
493// memDC->SelectObject(wxNullBitmap);
494// delete memDC;
495// }
496// }
497
498 void DrawBitmap(const wxBitmap& bitmap, long x, long y,
499 int useMask = FALSE);
500
7bf85405
RD
501};
502
503
504//----------------------------------------------------------------------
505
506class wxMemoryDC : public wxDC {
507public:
508 wxMemoryDC();
509
510 void SelectObject(const wxBitmap& bitmap);
511}
512
513%new wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC);
514%{ // Alternate 'constructor'
515 wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) {
516 return new wxMemoryDC(oldDC);
517 }
518%}
519
520
521//---------------------------------------------------------------------------
522
523class wxScreenDC : public wxDC {
524public:
525 wxScreenDC();
526
527 bool StartDrawingOnTop(wxWindow* window);
528 %name(StartDrawingOnTopRect) bool StartDrawingOnTop(wxRect* rect = NULL);
529 bool EndDrawingOnTop();
530};
531
532//---------------------------------------------------------------------------
533
534class wxClientDC : public wxDC {
535public:
536 wxClientDC(wxWindow* win);
537};
538
539//---------------------------------------------------------------------------
540
541class wxPaintDC : public wxDC {
542public:
543 wxPaintDC(wxWindow* win);
544};
545
546//---------------------------------------------------------------------------
547
b639c3c5
RD
548class wxWindowDC : public wxDC {
549public:
550 wxWindowDC(wxWindow* win);
551};
b639c3c5
RD
552
553//---------------------------------------------------------------------------
554
be4d9c1f 555#ifndef __WXMSW__
7bf85405
RD
556class wxPostScriptDC : public wxDC {
557public:
558 wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL);
559};
be4d9c1f 560#endif
7bf85405
RD
561
562//---------------------------------------------------------------------------
563
fb5e0af0 564#ifdef __WXMSW__
7bf85405
RD
565class wxPrinterDC : public wxDC {
566public:
567 wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output,
568 bool interactive = TRUE, int orientation = wxPORTRAIT);
569};
fb5e0af0 570#endif
7bf85405
RD
571
572//---------------------------------------------------------------------------
573
fb5e0af0 574#ifdef __WXMSW__
7bf85405
RD
575class wxMetaFileDC : public wxDC {
576public:
577 wxMetaFileDC(const wxString& filename = wxPyEmptyStr);
578 wxMetaFile* Close();
579};
fb5e0af0 580#endif
7bf85405
RD
581
582//---------------------------------------------------------------------------
583//---------------------------------------------------------------------------
584
585
586%readonly
af309447
RD
587%{
588#if 0
589%}
7bf85405
RD
590extern wxFont *wxNORMAL_FONT;
591extern wxFont *wxSMALL_FONT;
592extern wxFont *wxITALIC_FONT;
593extern wxFont *wxSWISS_FONT;
7bf85405 594
1afc06c2 595extern wxPen *wxRED_PEN;
7bf85405
RD
596extern wxPen *wxCYAN_PEN;
597extern wxPen *wxGREEN_PEN;
598extern wxPen *wxBLACK_PEN;
599extern wxPen *wxWHITE_PEN;
600extern wxPen *wxTRANSPARENT_PEN;
601extern wxPen *wxBLACK_DASHED_PEN;
602extern wxPen *wxGREY_PEN;
603extern wxPen *wxMEDIUM_GREY_PEN;
604extern wxPen *wxLIGHT_GREY_PEN;
605
606extern wxBrush *wxBLUE_BRUSH;
607extern wxBrush *wxGREEN_BRUSH;
608extern wxBrush *wxWHITE_BRUSH;
609extern wxBrush *wxBLACK_BRUSH;
610extern wxBrush *wxTRANSPARENT_BRUSH;
611extern wxBrush *wxCYAN_BRUSH;
612extern wxBrush *wxRED_BRUSH;
613extern wxBrush *wxGREY_BRUSH;
614extern wxBrush *wxMEDIUM_GREY_BRUSH;
615extern wxBrush *wxLIGHT_GREY_BRUSH;
616
617extern wxColour *wxBLACK;
618extern wxColour *wxWHITE;
619extern wxColour *wxRED;
620extern wxColour *wxBLUE;
621extern wxColour *wxGREEN;
622extern wxColour *wxCYAN;
623extern wxColour *wxLIGHT_GREY;
624
625extern wxCursor *wxSTANDARD_CURSOR;
626extern wxCursor *wxHOURGLASS_CURSOR;
627extern wxCursor *wxCROSS_CURSOR;
628
629extern wxBitmap wxNullBitmap;
630extern wxIcon wxNullIcon;
631extern wxCursor wxNullCursor;
632extern wxPen wxNullPen;
633extern wxBrush wxNullBrush;
634extern wxPalette wxNullPalette;
635extern wxFont wxNullFont;
636extern wxColour wxNullColour;
637
af309447
RD
638%readwrite
639%{
640#endif
641%}
642
b639c3c5
RD
643//---------------------------------------------------------------------------
644
645class wxPalette {
646public:
647 wxPalette(int LCOUNT, byte* LIST, byte* LIST, byte* LIST);
648 ~wxPalette();
649
650 int GetPixel(byte red, byte green, byte blue);
651 bool GetRGB(int pixel, byte* OUTPUT, byte* OUTPUT, byte* OUTPUT);
652 bool Ok();
653};
654
655//---------------------------------------------------------------------------
656
af309447
RD
657enum {
658 wxIMAGELIST_DRAW_NORMAL ,
659 wxIMAGELIST_DRAW_TRANSPARENT,
660 wxIMAGELIST_DRAW_SELECTED,
661 wxIMAGELIST_DRAW_FOCUSED,
662 wxIMAGE_LIST_NORMAL,
663 wxIMAGE_LIST_SMALL,
664 wxIMAGE_LIST_STATE
665};
666
667class wxImageList {
668public:
6999b0d8 669 wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
af309447
RD
670 ~wxImageList();
671
b57bdb5a 672#ifdef __WXMSW__
af309447
RD
673 int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
674 %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour);
675 %name(AddIcon)int Add(const wxIcon& icon);
b57bdb5a
RD
676 bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
677 %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon);
678#else
679 int Add(const wxBitmap& bitmap);
680 bool Replace(int index, const wxBitmap& bitmap);
681#endif
af309447
RD
682
683 bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL,
684 const bool solidBackground = FALSE);
685
686 int GetImageCount();
687 bool Remove(int index);
688 bool RemoveAll();
af309447
RD
689};
690
b639c3c5 691
7bf85405
RD
692//---------------------------------------------------------------------------
693