1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface file for wxDC, wxBrush, wxPen, wxFont, etc.
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/metafile.h>
19 #include <wx/imaglist.h>
23 #include <wx/fontmap.h>
24 #include <wx/fontenc.h>
25 #include <wx/fontmap.h>
26 #include <wx/fontutil.h>
29 //----------------------------------------------------------------------
32 %include my_typemaps.i
34 // Import some definitions of other classes, etc.
39 static wxString wxPyEmptyStr("");
42 //---------------------------------------------------------------------------
44 class wxGDIObject : public wxObject {
50 void SetVisible( bool visible );
56 //---------------------------------------------------------------------------
58 class wxBitmap : public wxGDIObject
61 wxBitmap(const wxString& name, wxBitmapType type);
64 wxPalette* GetPalette();
66 bool LoadFile(const wxString& name, long flags);
67 bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL);
68 void SetMask(wxMask* mask);
70 void SetPalette(wxPalette& palette);
76 void SetHandle(long handle);
83 void SetHeight(int h);
86 void SetSize(const wxSize& size);
89 wxBitmap GetSubBitmap( const wxRect& rect );
90 bool CopyFromIcon(const wxIcon& icon);
92 bool CopyFromCursor(const wxCursor& cursor);
94 void SetQuality(int q);
97 %pragma(python) addtoclass = "
98 def __del__(self,gdic=gdic):
100 if self.thisown == 1 :
101 gdic.delete_wxBitmap(self)
108 // Declarations of some alternate "constructors"
109 %new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
110 %new wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings);
111 %new wxBitmap* wxBitmapFromIcon(const wxIcon& icon);
112 %new wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 );
115 // %new wxBitmap* wxBitmapFromData(PyObject* data, long type,
116 // int width, int height, int depth = 1);
121 %{ // Implementations of some alternate "constructors"
123 wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) {
124 return new wxBitmap(width, height, depth);
127 static char** ConvertListOfStrings(PyObject* listOfStrings) {
128 char** cArray = NULL;
131 if (!PyList_Check(listOfStrings)) {
132 PyErr_SetString(PyExc_TypeError, "Expected a list of strings.");
135 count = PyList_Size(listOfStrings);
136 cArray = new char*[count];
138 for(int x=0; x<count; x++) {
139 // TODO: Need some validation and error checking here
140 cArray[x] = PyString_AsString(PyList_GET_ITEM(listOfStrings, x));
146 wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings) {
147 char** cArray = NULL;
150 cArray = ConvertListOfStrings(listOfStrings);
153 bmp = new wxBitmap(cArray);
159 wxBitmap* wxBitmapFromIcon(const wxIcon& icon) {
160 return new wxBitmap(icon);
164 wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) {
165 return new wxBitmap(bits, width, height, depth);
170 // wxBitmap* wxBitmapFromData(PyObject* data, long type,
171 // int width, int height, int depth = 1) {
172 // if (! PyString_Check(data)) {
173 // PyErr_SetString(PyExc_TypeError, "Expected string object");
176 // return new wxBitmap((void*)PyString_AsString(data), type, width, height, depth);
181 //---------------------------------------------------------------------------
183 class wxMask : public wxObject {
185 wxMask(const wxBitmap& bitmap);
188 %addmethods { void Destroy() { delete self; } }
191 %new wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour);
193 wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) {
194 return new wxMask(bitmap, colour);
199 //---------------------------------------------------------------------------
202 class wxIcon : public wxGDIObject
205 wxIcon(const wxString& name, long flags,
206 int desiredWidth = -1, int desiredHeight = -1);
209 bool LoadFile(const wxString& name, long flags);
211 // wxGDIImage methods
214 void SetHandle(long handle);
220 void SetWidth(int w);
221 void SetHeight(int h);
222 void SetDepth(int d);
224 void SetSize(const wxSize& size);
226 void CopyFromBitmap(const wxBitmap& bmp);
228 %pragma(python) addtoclass = "
229 def __del__(self,gdic=gdic):
231 if self.thisown == 1 :
232 gdic.delete_wxIcon(self)
239 // Declarations of some alternate "constructors"
240 %new wxIcon* wxEmptyIcon();
241 %new wxIcon* wxIconFromXPMData(PyObject* listOfStrings);
243 %{ // Implementations of some alternate "constructors"
244 wxIcon* wxEmptyIcon() {
248 wxIcon* wxIconFromXPMData(PyObject* listOfStrings) {
249 char** cArray = NULL;
252 cArray = ConvertListOfStrings(listOfStrings);
255 icon = new wxIcon(cArray);
261 //---------------------------------------------------------------------------
263 class wxCursor : public wxGDIObject
267 wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
271 // wxGDIImage methods
274 void SetHandle(long handle);
281 void SetWidth(int w);
282 void SetHeight(int h);
283 void SetDepth(int d);
284 void SetSize(const wxSize& size);
288 %name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
289 %{ // Alternate 'constructor'
290 wxCursor* wxPyStockCursor(int id) {
291 return new wxCursor(id);
295 //----------------------------------------------------------------------
300 wxFONTFAMILY_DEFAULT = wxDEFAULT,
301 wxFONTFAMILY_DECORATIVE = wxDECORATIVE,
302 wxFONTFAMILY_ROMAN = wxROMAN,
303 wxFONTFAMILY_SCRIPT = wxSCRIPT,
304 wxFONTFAMILY_SWISS = wxSWISS,
305 wxFONTFAMILY_MODERN = wxMODERN,
306 wxFONTFAMILY_TELETYPE = wxTELETYPE,
313 wxFONTSTYLE_NORMAL = wxNORMAL,
314 wxFONTSTYLE_ITALIC = wxITALIC,
315 wxFONTSTYLE_SLANT = wxSLANT,
322 wxFONTWEIGHT_NORMAL = wxNORMAL,
323 wxFONTWEIGHT_LIGHT = wxLIGHT,
324 wxFONTWEIGHT_BOLD = wxBOLD,
332 wxFONTENCODING_SYSTEM = -1, // system default
333 wxFONTENCODING_DEFAULT, // current default encoding
335 // ISO8859 standard defines a number of single-byte charsets
336 wxFONTENCODING_ISO8859_1, // West European (Latin1)
337 wxFONTENCODING_ISO8859_2, // Central and East European (Latin2)
338 wxFONTENCODING_ISO8859_3, // Esperanto (Latin3)
339 wxFONTENCODING_ISO8859_4, // Baltic (old) (Latin4)
340 wxFONTENCODING_ISO8859_5, // Cyrillic
341 wxFONTENCODING_ISO8859_6, // Arabic
342 wxFONTENCODING_ISO8859_7, // Greek
343 wxFONTENCODING_ISO8859_8, // Hebrew
344 wxFONTENCODING_ISO8859_9, // Turkish (Latin5)
345 wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6)
346 wxFONTENCODING_ISO8859_11, // Thai
347 wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it
348 // here anyhow to make all ISO8859
349 // consecutive numbers
350 wxFONTENCODING_ISO8859_13, // Baltic (Latin7)
351 wxFONTENCODING_ISO8859_14, // Latin8
352 wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro)
353 wxFONTENCODING_ISO8859_MAX,
355 // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html)
356 wxFONTENCODING_KOI8, // we don't support any of KOI8 variants
357 wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866
358 wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria
360 // what would we do without Microsoft? They have their own encodings
362 wxFONTENCODING_CP437, // original MS-DOS codepage
363 wxFONTENCODING_CP850, // CP437 merged with Latin1
364 wxFONTENCODING_CP852, // CP437 merged with Latin2
365 wxFONTENCODING_CP855, // another cyrillic encoding
366 wxFONTENCODING_CP866, // and another one
368 wxFONTENCODING_CP874, // WinThai
369 wxFONTENCODING_CP1250, // WinLatin2
370 wxFONTENCODING_CP1251, // WinCyrillic
371 wxFONTENCODING_CP1252, // WinLatin1
372 wxFONTENCODING_CP1253, // WinGreek (8859-7)
373 wxFONTENCODING_CP1254, // WinTurkish
374 wxFONTENCODING_CP1255, // WinHebrew
375 wxFONTENCODING_CP1256, // WinArabic
376 wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7)
377 wxFONTENCODING_CP12_MAX,
379 wxFONTENCODING_UTF7, // UTF-7 Unicode encoding
380 wxFONTENCODING_UTF8, // UTF-8 Unicode encoding
382 wxFONTENCODING_UNICODE, // Unicode - currently used only by
383 // wxEncodingConverter class
390 // wxNativeFontInfo is platform-specific font representation: this struct
391 // should be considered as opaque font description only used by the native
392 // functions, the user code can only get the objects of this type from
393 // somewhere and pass it somewhere else (possibly save them somewhere using
394 // ToString() and restore them using FromString())
395 struct wxNativeFontInfo
397 // it is important to be able to serialize wxNativeFontInfo objects to be
398 // able to store them (in config file, for example)
399 bool FromString(const wxString& s);
400 wxString ToString() const;
404 return self->ToString();
410 // wxFontMapper manages user-definable correspondence between logical font
411 // names and the fonts present on the machine.
413 // The default implementations of all functions will ask the user if they are
414 // not capable of finding the answer themselves and store the answer in a
415 // config file (configurable via SetConfigXXX functions). This behaviour may
416 // be disabled by giving the value of FALSE to "interactive" parameter.
417 // However, the functions will always consult the config file to allow the
418 // user-defined values override the default logic and there is no way to
419 // disable this - which shouldn't be ever needed because if "interactive" was
420 // never TRUE, the config file is never created anyhow.
428 // find an alternative for the given encoding (which is supposed to not be
429 // available on this system). If successful, return TRUE and rwxFontEcoding
430 // that can be used it wxFont ctor otherwise return FALSE
431 //bool GetAltForEncoding(wxFontEncoding encoding,
432 // wxFontEncoding *alt_encoding,
433 // const wxString& facename = wxEmptyString,
434 // bool interactive = TRUE);
437 // Find an alternative for the given encoding (which is supposed to not be
438 // available on this system). If successful, returns the encoding otherwise
441 PyObject* GetAltForEncoding(wxFontEncoding encoding,
442 const wxString& facename = wxEmptyString,
443 bool interactive = TRUE) {
444 wxFontEncoding alt_enc;
445 if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
446 return PyInt_FromLong(alt_enc);
455 // checks whether given encoding is available in given face or not.
456 // If no facename is given,
457 bool IsEncodingAvailable(wxFontEncoding encoding,
458 const wxString& facename = wxEmptyString);
460 // returns the encoding for the given charset (in the form of RFC 2046) or
461 // wxFONTENCODING_SYSTEM if couldn't decode it
462 wxFontEncoding CharsetToEncoding(const wxString& charset,
463 bool interactive = TRUE);
465 // return internal string identifier for the encoding (see also
466 // GetEncodingDescription())
467 static wxString GetEncodingName(wxFontEncoding encoding);
469 // return user-readable string describing the given encoding
471 // NB: hard-coded now, but might change later (read it from config?)
472 static wxString GetEncodingDescription(wxFontEncoding encoding);
474 // the parent window for modal dialogs
475 void SetDialogParent(wxWindow *parent);
477 // the title for the dialogs (note that default is quite reasonable)
478 void SetDialogTitle(const wxString& title);
480 // functions which allow to configure the config object used: by default,
481 // the global one (from wxConfigBase::Get() will be used) and the default
482 // root path for the config settings is the string returned by
483 // GetDefaultConfigPath()
486 // set the config object to use (may be NULL to use default)
487 void SetConfig(wxConfigBase *config);
489 // set the root config path to use (should be an absolute path)
490 void SetConfigPath(const wxString& prefix);
492 // return default config path
493 static const wxChar *GetDefaultConfigPath();
499 class wxFont : public wxGDIObject {
501 wxFont( int pointSize, int family, int style, int weight,
502 int underline=FALSE, char* faceName = "",
503 wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
505 %name(wxFontFromNativeInfo)wxFont(const wxNativeFontInfo& info);
510 int GetPointSize() const;
511 int GetFamily() const;
512 int GetStyle() const;
513 int GetWeight() const;
514 bool GetUnderlined() const;
515 wxString GetFaceName() const;
516 wxFontEncoding GetEncoding() const;
517 wxNativeFontInfo* GetNativeFontInfo() const;
519 void SetPointSize(int pointSize);
520 void SetFamily(int family);
521 void SetStyle(int style);
522 void SetWeight(int weight);
523 void SetFaceName(const wxString& faceName);
524 void SetUnderlined(bool underlined);
525 void SetEncoding(wxFontEncoding encoding);
526 void SetNativeFontInfo(const wxNativeFontInfo& info);
528 wxString GetFamilyString() const;
529 wxString GetStyleString() const;
530 wxString GetWeightString() const;
532 static wxFontEncoding GetDefaultEncoding();
533 static void SetDefaultEncoding(wxFontEncoding encoding);
538 class wxFontList : public wxObject {
541 void AddFont(wxFont* font);
542 wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
543 bool underline = FALSE, const char* facename = NULL,
544 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
545 void RemoveFont(wxFont *font);
549 //----------------------------------------------------------------------
551 class wxColour : public wxObject {
553 wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0);
556 unsigned char Green();
557 unsigned char Blue();
559 void Set(unsigned char red, unsigned char green, unsigned char blue);
562 PyObject* rv = PyTuple_New(3);
563 PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red()));
564 PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green()));
565 PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue()));
569 %pragma(python) addtoclass = "asTuple = Get"
570 %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())"
571 %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())"
575 %new wxColour* wxNamedColour(const wxString& colorName);
577 %{ // Alternate 'constructor'
578 wxColour* wxNamedColour(const wxString& colorName) {
579 return new wxColour(colorName);
585 class wxColourDatabase : public wxObject {
588 wxColour *FindColour(const wxString& colour);
589 wxString FindName(const wxColour& colour) const;
592 void Append(const wxString& name, int red, int green, int blue) {
593 self->Append(name.c_str(), new wxColour(red, green, blue));
599 //----------------------------------------------------------------------
601 class wxPen : public wxGDIObject {
603 wxPen(wxColour& colour, int width=1, int style=wxSOLID);
607 wxColour GetColour();
613 void SetCap(int cap_style);
614 void SetColour(wxColour& colour);
615 void SetJoin(int join_style);
616 void SetStyle(int style);
617 void SetWidth(int width);
619 // **** This one needs to return a list of ints (wxDash)
620 //int GetDashes(wxDash **dashes);
621 void SetDashes(int LCOUNT, wxDash* choices);
624 wxBitmap* GetStipple();
625 void SetStipple(wxBitmap& stipple);
632 class wxPyPen : public wxPen {
634 wxPyPen(wxColour& colour, int width=1, int style=wxSOLID)
635 : wxPen(colour, width, style)
642 void SetDashes(int nb_dashes, const wxDash *dash) {
643 m_dash = new wxDash[nb_dashes];
644 for (int i=0; i<nb_dashes; i++)
646 wxPen::SetDashes(nb_dashes, m_dash);
656 class wxPyPen : public wxPen {
658 wxPyPen(wxColour& colour, int width=1, int style=wxSOLID);
661 void SetDashes(int LCOUNT, wxDash* choices);
666 class wxPenList : public wxObject {
669 void AddPen(wxPen* pen);
670 wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
671 void RemovePen(wxPen* pen);
676 //----------------------------------------------------------------------
678 class wxBrush : public wxGDIObject {
680 wxBrush(const wxColour& colour, int style=wxSOLID);
683 wxColour GetColour();
684 wxBitmap * GetStipple();
687 void SetColour(wxColour &colour);
688 void SetStipple(wxBitmap& bitmap);
689 void SetStyle(int style);
693 class wxBrushList : public wxObject {
696 void AddBrush(wxBrush *brush);
697 wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
698 void RemoveBrush(wxBrush *brush);
701 //----------------------------------------------------------------------
705 class wxDC : public wxObject {
707 // wxDC(); **** abstract base class, can't instantiate.
712 bool Blit(long xdest, long ydest,
713 long width, long height,
714 wxDC *source, long xsrc, long ysrc,
715 int logicalFunc = wxCOPY, int useMask = FALSE);
716 // bool Blit(const wxPoint& destPt, const wxSize& sz,
717 // wxDC *source, const wxPoint& srcPt,
718 // int logicalFunc = wxCOPY, int useMask = FALSE);
721 void CrossHair(long x, long y);
722 void DestroyClippingRegion();
723 long DeviceToLogicalX(long x);
724 long DeviceToLogicalXRel(long x);
725 long DeviceToLogicalY(long y);
726 long DeviceToLogicalYRel(long y);
727 void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc);
728 void DrawCircle(long x, long y, long radius);
729 void DrawEllipse(long x, long y, long width, long height);
730 void DrawEllipticArc(long x, long y, long width, long height, long start, long end);
731 void DrawIcon(const wxIcon& icon, long x, long y);
732 void DrawLine(long x1, long y1, long x2, long y2);
733 void DrawLines(int PCOUNT, wxPoint* points, long xoffset=0, long yoffset=0);
734 void DrawPolygon(int PCOUNT, wxPoint* points, long xoffset=0, long yoffset=0,
735 int fill_style=wxODDEVEN_RULE);
736 void DrawPoint(long x, long y);
737 void DrawRectangle(long x, long y, long width, long height);
738 void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
739 void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
740 void DrawSpline(int PCOUNT, wxPoint* points);
741 void DrawText(const wxString& text, long x, long y);
745 void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE);
746 wxBrush& GetBackground();
748 long GetCharHeight();
750 void GetClippingBox(long *OUTPUT, long *OUTPUT,
751 long *OUTPUT, long *OUTPUT);
753 int GetLogicalFunction();
754 void GetLogicalScale(double *OUTPUT, double *OUTPUT);
756 bool GetOptimization();
759 %new wxColour* GetPixel(long x, long y) {
760 wxColour* wc = new wxColour();
761 self->GetPixel(x, y, wc);
765 %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
768 wxColour GetTextBackground();
769 void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
770 %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
771 long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT,
772 const wxFont* font = NULL);
773 wxColour GetTextForeground();
774 void GetUserScale(double *OUTPUT, double *OUTPUT);
775 long LogicalToDeviceX(long x);
776 long LogicalToDeviceXRel(long x);
777 long LogicalToDeviceY(long y);
778 long LogicalToDeviceYRel(long y);
784 void SetDeviceOrigin(long x, long y);
785 void SetBackground(const wxBrush& brush);
786 void SetBackgroundMode(int mode);
787 void SetClippingRegion(long x, long y, long width, long height);
788 %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
789 void SetPalette(const wxPalette& colourMap);
790 void SetBrush(const wxBrush& brush);
791 void SetFont(const wxFont& font);
792 void SetLogicalFunction(int function);
793 void SetLogicalScale(double x, double y);
794 void SetMapMode(int mode);
795 void SetOptimization(bool optimize);
796 void SetPen(const wxPen& pen);
797 void SetTextBackground(const wxColour& colour);
798 void SetTextForeground(const wxColour& colour);
799 void SetUserScale(double x_scale, double y_scale);
800 bool StartDoc(const wxString& message);
805 void DrawBitmap(const wxBitmap& bitmap, long x, long y,
806 int useMask = FALSE);
808 bool CanDrawBitmap();
809 bool CanGetTextExtent();
813 void GetLogicalOrigin(int *OUTPUT, int *OUTPUT);
814 void SetLogicalOrigin(int x, int y);
815 void GetDeviceOrigin(int *OUTPUT, int *OUTPUT);
816 void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
818 void CalcBoundingBox(int x, int y);
819 void ResetBoundingBox();
827 //----------------------------------------------------------------------
829 class wxMemoryDC : public wxDC {
833 void SelectObject(const wxBitmap& bitmap);
836 %new wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC);
837 %{ // Alternate 'constructor'
838 wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) {
839 return new wxMemoryDC(oldDC);
844 //---------------------------------------------------------------------------
846 class wxScreenDC : public wxDC {
850 %name(StartDrawingOnTopWin) bool StartDrawingOnTop(wxWindow* window);
851 bool StartDrawingOnTop(wxRect* rect = NULL);
852 bool EndDrawingOnTop();
855 //---------------------------------------------------------------------------
857 class wxClientDC : public wxDC {
859 wxClientDC(wxWindow* win);
862 //---------------------------------------------------------------------------
864 class wxPaintDC : public wxDC {
866 wxPaintDC(wxWindow* win);
869 //---------------------------------------------------------------------------
871 class wxWindowDC : public wxDC {
873 wxWindowDC(wxWindow* win);
876 //---------------------------------------------------------------------------
879 class wxPostScriptDC : public wxDC {
881 wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL);
885 //---------------------------------------------------------------------------
889 class wxMetaFileDC : public wxDC {
891 wxMetaFileDC(const wxString& filename = wxPyEmptyStr);
896 //---------------------------------------------------------------------------
897 //---------------------------------------------------------------------------
904 extern wxFont *wxNORMAL_FONT;
905 extern wxFont *wxSMALL_FONT;
906 extern wxFont *wxITALIC_FONT;
907 extern wxFont *wxSWISS_FONT;
909 extern wxPen *wxRED_PEN;
910 extern wxPen *wxCYAN_PEN;
911 extern wxPen *wxGREEN_PEN;
912 extern wxPen *wxBLACK_PEN;
913 extern wxPen *wxWHITE_PEN;
914 extern wxPen *wxTRANSPARENT_PEN;
915 extern wxPen *wxBLACK_DASHED_PEN;
916 extern wxPen *wxGREY_PEN;
917 extern wxPen *wxMEDIUM_GREY_PEN;
918 extern wxPen *wxLIGHT_GREY_PEN;
920 extern wxBrush *wxBLUE_BRUSH;
921 extern wxBrush *wxGREEN_BRUSH;
922 extern wxBrush *wxWHITE_BRUSH;
923 extern wxBrush *wxBLACK_BRUSH;
924 extern wxBrush *wxTRANSPARENT_BRUSH;
925 extern wxBrush *wxCYAN_BRUSH;
926 extern wxBrush *wxRED_BRUSH;
927 extern wxBrush *wxGREY_BRUSH;
928 extern wxBrush *wxMEDIUM_GREY_BRUSH;
929 extern wxBrush *wxLIGHT_GREY_BRUSH;
931 extern wxColour *wxBLACK;
932 extern wxColour *wxWHITE;
933 extern wxColour *wxRED;
934 extern wxColour *wxBLUE;
935 extern wxColour *wxGREEN;
936 extern wxColour *wxCYAN;
937 extern wxColour *wxLIGHT_GREY;
939 extern wxCursor *wxSTANDARD_CURSOR;
940 extern wxCursor *wxHOURGLASS_CURSOR;
941 extern wxCursor *wxCROSS_CURSOR;
943 extern wxBitmap wxNullBitmap;
944 extern wxIcon wxNullIcon;
945 extern wxCursor wxNullCursor;
946 extern wxPen wxNullPen;
947 extern wxBrush wxNullBrush;
948 extern wxPalette wxNullPalette;
949 extern wxFont wxNullFont;
950 extern wxColour wxNullColour;
953 extern wxFontList* wxTheFontList;
954 extern wxPenList* wxThePenList;
955 extern wxBrushList* wxTheBrushList;
956 extern wxColourDatabase* wxTheColourDatabase;
964 //---------------------------------------------------------------------------
966 class wxPalette : public wxGDIObject {
968 wxPalette(int LCOUNT, byte* choices, byte* choices, byte* choices);
971 int GetPixel(byte red, byte green, byte blue);
972 bool GetRGB(int pixel, byte* OUTPUT, byte* OUTPUT, byte* OUTPUT);
976 //---------------------------------------------------------------------------
979 wxIMAGELIST_DRAW_NORMAL ,
980 wxIMAGELIST_DRAW_TRANSPARENT,
981 wxIMAGELIST_DRAW_SELECTED,
982 wxIMAGELIST_DRAW_FOCUSED,
988 class wxImageList : public wxObject {
990 wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
993 int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
994 %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour);
995 %name(AddIcon)int Add(const wxIcon& icon);
997 bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
999 // %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon);
1000 // int Add(const wxBitmap& bitmap);
1001 bool Replace(int index, const wxBitmap& bitmap);
1004 bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL,
1005 const bool solidBackground = FALSE);
1007 int GetImageCount();
1008 bool Remove(int index);
1010 void GetSize(int index, int& OUTPUT, int& OUTPUT);
1014 //---------------------------------------------------------------------------
1017 enum wxRegionContain {
1018 wxOutRegion, wxPartRegion, wxInRegion
1022 class wxRegion : public wxGDIObject {
1024 wxRegion(long x=0, long y=0, long width=0, long height=0);
1028 wxRegionContain Contains(long x, long y);
1029 %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
1030 %name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
1031 %name(ContainsRectDim)wxRegionContain Contains(long x, long y, long w, long h);
1035 bool Intersect(long x, long y, long width, long height);
1036 %name(IntersectRect)bool Intersect(const wxRect& rect);
1037 %name(IntersectRegion)bool Intersect(const wxRegion& region);
1041 bool Union(long x, long y, long width, long height);
1042 %name(UnionRect)bool Union(const wxRect& rect);
1043 %name(UnionRegion)bool Union(const wxRegion& region);
1045 bool Subtract(long x, long y, long width, long height);
1046 %name(SubtractRect)bool Subtract(const wxRect& rect);
1047 %name(SubtractRegion)bool Subtract(const wxRegion& region);
1049 bool Xor(long x, long y, long width, long height);
1050 %name(XorRect)bool Xor(const wxRect& rect);
1051 %name(XorRegion)bool Xor(const wxRegion& region);
1056 class wxRegionIterator : public wxObject {
1058 wxRegionIterator(const wxRegion& region);
1059 ~wxRegionIterator();
1079 //---------------------------------------------------------------------------