From 0569df0fc965c911275f9015e1774b37a7f8f064 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 14 Mar 2001 08:05:03 +0000 Subject: [PATCH] Changed wxFont, wxPen, wxBrush to not implicitly use the wxTheXXXList behind the scenes, but to use normal ctor and dtors. Exposed the wxTheXXXLists to wxPython. Also wxTheColourDatabase and added a library module to load LOTS more colour names into the colour database. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/wxScrolledWindow.py | 13 +- wxPython/src/gdi.i | 94 ++-- wxPython/src/msw/clip_dnd.cpp | 2 + wxPython/src/msw/cmndlgs.cpp | 2 + wxPython/src/msw/controls.cpp | 2 + wxPython/src/msw/controls2.cpp | 2 + wxPython/src/msw/filesys.cpp | 2 + wxPython/src/msw/frames.cpp | 2 + wxPython/src/msw/gdi.cpp | 689 +++++++++++++++++++++++++++++- wxPython/src/msw/gdi.py | 104 +++++ wxPython/src/msw/image.cpp | 2 + wxPython/src/msw/mdi.cpp | 2 + wxPython/src/msw/printfw.cpp | 2 + wxPython/src/msw/sizers.cpp | 2 + wxPython/src/msw/stattool.cpp | 2 + wxPython/wxPython/lib/colourdb.py | 659 ++++++++++++++++++++++++++++ wxPython/wxPython/lib/rpcMixin.py | 6 +- 17 files changed, 1531 insertions(+), 56 deletions(-) create mode 100644 wxPython/wxPython/lib/colourdb.py diff --git a/wxPython/demo/wxScrolledWindow.py b/wxPython/demo/wxScrolledWindow.py index 3b6edadb14..c772f2ed66 100644 --- a/wxPython/demo/wxScrolledWindow.py +++ b/wxPython/demo/wxScrolledWindow.py @@ -42,16 +42,16 @@ class MyCanvas(wxScrolledWindow): def DoDrawing(self, dc): dc.BeginDrawing() - pen1 = wxPen(wxNamedColour('RED')) - dc.SetPen(pen1) + #pen1 = wxPen(wxNamedColour('RED')) + dc.SetPen(wxPen(wxNamedColour('RED'))) dc.DrawRectangle(5, 5, 50, 50) dc.SetBrush(wxLIGHT_GREY_BRUSH) dc.SetPen(wxPen(wxNamedColour('BLUE'), 4)) dc.DrawRectangle(15, 15, 50, 50) - font = wxFont(14, wxSWISS, wxNORMAL, wxNORMAL) - dc.SetFont(font) + #font = wxFont(14, wxSWISS, wxNORMAL, wxNORMAL) + dc.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxNORMAL)) dc.SetTextForeground(wxColour(0xFF, 0x20, 0xFF)) te = dc.GetTextExtent("Hello World") dc.DrawText("Hello World", 60, 65) @@ -81,12 +81,9 @@ class MyCanvas(wxScrolledWindow): dc.DrawRectangle(50,500,50,50) dc.DrawRectangle(100,500,50,50) - dc.SetPen(pen1) + dc.SetPen(wxPen(wxNamedColour('RED'))) dc.DrawEllipticArc(200, 500, 50, 75, 0, 90) - #from wxPython import dch - #dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK) - self.DrawSavedLines(dc) dc.EndDrawing() diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index e66a31dd73..da68e21f23 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -268,23 +268,15 @@ enum wxFontEncoding wxFONTENCODING_MAX }; + class wxFont { public: - // I'll do it this way to use long-lived objects and not have to - // worry about when python may delete the object. - %addmethods { - wxFont( int pointSize, int family, int style, int weight, - int underline=FALSE, char* faceName = "", - wxFontEncoding encoding=wxFONTENCODING_DEFAULT) { - - return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, - underline, faceName, encoding); - } - // NO Destructor. - } + wxFont( int pointSize, int family, int style, int weight, + int underline=FALSE, char* faceName = "", + wxFontEncoding encoding=wxFONTENCODING_DEFAULT); + ~wxFont(); bool Ok(); - wxString GetFaceName(); int GetFamily(); #ifdef __WXMSW__ @@ -317,6 +309,18 @@ public: } %} + +class wxFontList { +public: + + void AddFont(wxFont* font); + wxFont * FindOrCreateFont(int point_size, int family, int style, int weight, + bool underline = FALSE, const char* facename = NULL, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + void RemoveFont(wxFont *font); +}; + + //---------------------------------------------------------------------- class wxColour { @@ -352,19 +356,28 @@ public: %} + +class wxColourDatabase { +public: + + wxColour *FindColour(const wxString& colour); + wxString FindName(const wxColour& colour) const; + + %addmethods { + void Append(const wxString& name, int red, int green, int blue) { + self->Append(name.c_str(), new wxColour(red, green, blue)); + } + } +}; + + //---------------------------------------------------------------------- class wxPen { public: - // I'll do it this way to use long-lived objects and not have to - // worry about when python may delete the object. - %addmethods { - wxPen(wxColour* colour, int width=1, int style=wxSOLID) { - return wxThePenList->FindOrCreatePen(*colour, width, style); - } - // NO Destructor. - } + wxPen(wxColour& colour, int width=1, int style=wxSOLID); + ~wxPen(); int GetCap(); wxColour& GetColour(); @@ -389,20 +402,23 @@ public: #endif }; + +class wxPenList { +public: + + void AddPen(wxPen* pen); + wxPen* FindOrCreatePen(const wxColour& colour, int width, int style); + void RemovePen(wxPen* pen); +}; + + + //---------------------------------------------------------------------- class wxBrush { public: - // I'll do it this way to use long-lived objects and not have to - // worry about when python may delete the object. - %addmethods { - wxBrush(const wxColour* colour, int style=wxSOLID) { - return wxTheBrushList->FindOrCreateBrush(*colour, style); - } - // NO Destructor. - } - -// wxBrush(const wxColour& colour, int style=wxSOLID); + wxBrush(const wxColour& colour, int style=wxSOLID); + ~wxBrush(); wxColour& GetColour(); wxBitmap * GetStipple(); @@ -413,6 +429,15 @@ public: void SetStyle(int style); }; + +class wxBrushList { +public: + + void AddBrush(wxBrush *brush); + wxBrush * FindOrCreateBrush(const wxColour& colour, int style); + void RemoveBrush(wxBrush *brush); +}; + //---------------------------------------------------------------------- @@ -659,6 +684,13 @@ extern wxPalette wxNullPalette; extern wxFont wxNullFont; extern wxColour wxNullColour; + +extern wxFontList* wxTheFontList; +extern wxPenList* wxThePenList; +extern wxBrushlist* wxTheBrushList; +extern wxColourDatabase* wxTheColourDatabase; + + %readwrite %{ #endif diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index d4ccd97f49..73531f3f92 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -3622,6 +3622,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxFont","_wxFont",0}, { "_wxClipboard","_class_wxClipboard",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_class_wxPoint","_wxPoint",0}, @@ -3704,6 +3705,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPyDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget}, { "_wxPyDropTarget","_class_wxPyDropTarget",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_wxCustomDataObject","_class_wxCustomDataObject",0}, { "_class_wxSize","_wxSize",0}, diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index aaed3689ec..6f7ee0c023 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -3150,6 +3150,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -3291,6 +3292,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index 7c63d3c250..4d2f785dec 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -8257,6 +8257,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -8457,6 +8458,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 3375c1d964..1ba1773954 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -8443,6 +8443,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -8575,6 +8576,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent}, { "_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent}, { "_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent}, diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp index f40624059d..099b352987 100644 --- a/wxPython/src/msw/filesys.cpp +++ b/wxPython/src/msw/filesys.cpp @@ -2304,6 +2304,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxFont","_wxFont",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, @@ -2402,6 +2403,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 8489f08de4..1e416ae8f1 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -1419,6 +1419,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -1543,6 +1544,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 6f87090c25..03637d9ee0 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -195,6 +195,10 @@ extern wxBrush wxNullBrush; extern wxPalette wxNullPalette; extern wxFont wxNullFont; extern wxColour wxNullColour; +extern wxFontList * wxTheFontList; +extern wxPenList * wxThePenList; +extern wxBrushlist * wxTheBrushList; +extern wxColourDatabase * wxTheColourDatabase; #endif #ifdef __cplusplus @@ -1072,6 +1076,66 @@ static PyObject *_wrap_wxNullColour_get() { return pyobj; } +static int _wrap_wxTheFontList_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxTheFontList is read-only."); + return 1; +} + +static PyObject *_wrap_wxTheFontList_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxTheFontList,"_wxFontList_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxThePenList_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxThePenList is read-only."); + return 1; +} + +static PyObject *_wrap_wxThePenList_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxThePenList,"_wxPenList_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxTheBrushList_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxTheBrushList is read-only."); + return 1; +} + +static PyObject *_wrap_wxTheBrushList_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxTheBrushList,"_wxBrushlist_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + +static int _wrap_wxTheColourDatabase_set(PyObject *val) { + + PyErr_SetString(PyExc_TypeError,"Variable wxTheColourDatabase is read-only."); + return 1; +} + +static PyObject *_wrap_wxTheColourDatabase_get() { + PyObject * pyobj; + char ptemp[128]; + + SWIG_MakePtr(ptemp, (char *) wxTheColourDatabase,"_wxColourDatabase_p"); + pyobj = PyString_FromString(ptemp); + return pyobj; +} + #define new_wxBitmap(_swigarg0,_swigarg1) (new wxBitmap(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2656,12 +2720,7 @@ static PyObject *_wrap_wxCursor_SetSize(PyObject *self, PyObject *args, PyObject return _resultobj; } -static wxFont *new_wxFont(int pointSize,int family,int style,int weight,int underline,char *faceName,wxFontEncoding encoding) { - - return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, - underline, faceName, encoding); - } - +#define new_wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFont * _result; @@ -2693,6 +2752,33 @@ static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwar return _resultobj; } +#define delete_wxFont(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFont",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxFont(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxFont_Ok(_swigobj) (_swigobj->Ok()) static PyObject *_wrap_wxFont_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3258,6 +3344,121 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxFontList_AddFont(_swigobj,_swigarg0) (_swigobj->AddFont(_swigarg0)) +static PyObject *_wrap_wxFontList_AddFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontList * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontList_AddFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_AddFont. Expected _wxFontList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontList_AddFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFontList_AddFont(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFontList_FindOrCreateFont(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->FindOrCreateFont(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxFontList_FindOrCreateFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxFontList * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4; + bool _arg5 = (bool ) FALSE; + char * _arg6 = (char *) NULL; + wxFontEncoding _arg7 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT); + PyObject * _argo0 = 0; + int tempbool5 = (int) FALSE; + char *_kwnames[] = { "self","point_size","family","style","weight","underline","facename","encoding", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|isi:wxFontList_FindOrCreateFont",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&tempbool5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_FindOrCreateFont. Expected _wxFontList_p."); + return NULL; + } + } + _arg5 = (bool ) tempbool5; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFont *)wxFontList_FindOrCreateFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFontList_RemoveFont(_swigobj,_swigarg0) (_swigobj->RemoveFont(_swigarg0)) +static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontList * _arg0; + wxFont * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","font", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontList_RemoveFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_RemoveFont. Expected _wxFontList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontList_RemoveFont. Expected _wxFont_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFontList_RemoveFont(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3479,10 +3680,161 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -static wxPen *new_wxPen(wxColour *colour,int width,int style) { - return wxThePenList->FindOrCreatePen(*colour, width, style); - } +#define wxColourDatabase_FindColour(_swigobj,_swigarg0) (_swigobj->FindColour(_swigarg0)) +static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxColourDatabase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colour", NULL }; + char _ptemp[128]; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourDatabase_FindColour",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColourDatabase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDatabase_FindColour. Expected _wxColourDatabase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxColour *)wxColourDatabase_FindColour(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxColourDatabase_FindName(_swigobj,_swigarg0) (_swigobj->FindName(_swigarg0)) +static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxColourDatabase * _arg0; + wxColour * _arg1; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colour", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourDatabase_FindName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColourDatabase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDatabase_FindName. Expected _wxColourDatabase_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxColourDatabase_FindName(_arg0,*_arg1)); + + wxPy_END_ALLOW_THREADS; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +static void wxColourDatabase_Append(wxColourDatabase *self,const wxString & name,int red,int green,int blue) { + self->Append(name.c_str(), new wxColour(red, green, blue)); + } +static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColourDatabase * _arg0; + wxString * _arg1; + int _arg2; + int _arg3; + int _arg4; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","name","red","green","blue", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiii:wxColourDatabase_Append",_kwnames,&_argo0,&_obj1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColourDatabase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDatabase_Append. Expected _wxColourDatabase_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxColourDatabase_Append(_arg0,*_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define new_wxPen(_swigarg0,_swigarg1,_swigarg2) (new wxPen(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPen * _result; @@ -3504,7 +3856,7 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPen *)new_wxPen(_arg0,_arg1,_arg2); + _result = (wxPen *)new_wxPen(*_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -3517,6 +3869,33 @@ static PyObject *_wrap_new_wxPen(PyObject *self, PyObject *args, PyObject *kwarg return _resultobj; } +#define delete_wxPen(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPen * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPen",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPen. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPen(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPen_GetCap(_swigobj) (_swigobj->GetCap()) static PyObject *_wrap_wxPen_GetCap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3988,10 +4367,123 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args, PyObject return _resultobj; } -static wxBrush *new_wxBrush(const wxColour *colour,int style) { - return wxTheBrushList->FindOrCreateBrush(*colour, style); - } +#define wxPenList_AddPen(_swigobj,_swigarg0) (_swigobj->AddPen(_swigarg0)) +static PyObject *_wrap_wxPenList_AddPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPenList * _arg0; + wxPen * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","pen", NULL }; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPenList_AddPen",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_AddPen. Expected _wxPenList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPenList_AddPen. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPenList_AddPen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPenList_FindOrCreatePen(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->FindOrCreatePen(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxPenList_FindOrCreatePen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPen * _result; + wxPenList * _arg0; + wxColour * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colour","width","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxPenList_FindOrCreatePen",_kwnames,&_argo0,&_obj1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_FindOrCreatePen. Expected _wxPenList_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPen *)wxPenList_FindOrCreatePen(_arg0,*_arg1,_arg2,_arg3); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPenList_RemovePen(_swigobj,_swigarg0) (_swigobj->RemovePen(_swigarg0)) +static PyObject *_wrap_wxPenList_RemovePen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPenList * _arg0; + wxPen * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","pen", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPenList_RemovePen",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_RemovePen. Expected _wxPenList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPenList_RemovePen. Expected _wxPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPenList_RemovePen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxBrush(_swigarg0,_swigarg1) (new wxBrush(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxBrush * _result; @@ -4012,7 +4504,7 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBrush *)new_wxBrush(_arg0,_arg1); + _result = (wxBrush *)new_wxBrush(*_arg0,_arg1); wxPy_END_ALLOW_THREADS; } if (_result) { @@ -4025,6 +4517,33 @@ static PyObject *_wrap_new_wxBrush(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } +#define delete_wxBrush(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxBrush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBrush * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBrush",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBrush. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxBrush(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxBrush_GetColour(_swigobj) (_swigobj->GetColour()) static PyObject *_wrap_wxBrush_GetColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4247,6 +4766,121 @@ static PyObject *_wrap_wxBrush_SetStyle(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxBrushList_AddBrush(_swigobj,_swigarg0) (_swigobj->AddBrush(_swigarg0)) +static PyObject *_wrap_wxBrushList_AddBrush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBrushList * _arg0; + wxBrush * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","brush", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBrushList_AddBrush",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_AddBrush. Expected _wxBrushList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrushList_AddBrush. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrushList_AddBrush(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxBrushList_FindOrCreateBrush(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindOrCreateBrush(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxBrushList_FindOrCreateBrush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBrush * _result; + wxBrushList * _arg0; + wxColour * _arg1; + int _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","colour","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxBrushList_FindOrCreateBrush",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_FindOrCreateBrush. Expected _wxBrushList_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxColour_helper(_obj1, &_arg1)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxBrush *)wxBrushList_FindOrCreateBrush(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxBrushList_RemoveBrush(_swigobj,_swigarg0) (_swigobj->RemoveBrush(_swigarg0)) +static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBrushList * _arg0; + wxBrush * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","brush", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxBrushList_RemoveBrush",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_RemoveBrush. Expected _wxBrushList_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrushList_RemoveBrush. Expected _wxBrush_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxBrushList_RemoveBrush(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define delete_wxDC(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxDC(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8332,6 +8966,9 @@ static PyMethodDef gdicMethods[] = { { "wxDC_Blit", (PyCFunction) _wrap_wxDC_Blit, METH_VARARGS | METH_KEYWORDS }, { "wxDC_BeginDrawing", (PyCFunction) _wrap_wxDC_BeginDrawing, METH_VARARGS | METH_KEYWORDS }, { "delete_wxDC", (PyCFunction) _wrap_delete_wxDC, METH_VARARGS | METH_KEYWORDS }, + { "wxBrushList_RemoveBrush", (PyCFunction) _wrap_wxBrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS }, + { "wxBrushList_FindOrCreateBrush", (PyCFunction) _wrap_wxBrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS }, + { "wxBrushList_AddBrush", (PyCFunction) _wrap_wxBrushList_AddBrush, METH_VARARGS | METH_KEYWORDS }, { "wxBrush_SetStyle", (PyCFunction) _wrap_wxBrush_SetStyle, METH_VARARGS | METH_KEYWORDS }, { "wxBrush_SetStipple", (PyCFunction) _wrap_wxBrush_SetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxBrush_SetColour", (PyCFunction) _wrap_wxBrush_SetColour, METH_VARARGS | METH_KEYWORDS }, @@ -8339,7 +8976,11 @@ static PyMethodDef gdicMethods[] = { { "wxBrush_GetStyle", (PyCFunction) _wrap_wxBrush_GetStyle, METH_VARARGS | METH_KEYWORDS }, { "wxBrush_GetStipple", (PyCFunction) _wrap_wxBrush_GetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxBrush_GetColour", (PyCFunction) _wrap_wxBrush_GetColour, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxBrush", (PyCFunction) _wrap_delete_wxBrush, METH_VARARGS | METH_KEYWORDS }, { "new_wxBrush", (PyCFunction) _wrap_new_wxBrush, METH_VARARGS | METH_KEYWORDS }, + { "wxPenList_RemovePen", (PyCFunction) _wrap_wxPenList_RemovePen, METH_VARARGS | METH_KEYWORDS }, + { "wxPenList_FindOrCreatePen", (PyCFunction) _wrap_wxPenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS }, + { "wxPenList_AddPen", (PyCFunction) _wrap_wxPenList_AddPen, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetStipple", (PyCFunction) _wrap_wxPen_SetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxPen_GetStipple", (PyCFunction) _wrap_wxPen_GetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetDashes", (PyCFunction) _wrap_wxPen_SetDashes, METH_VARARGS | METH_KEYWORDS }, @@ -8355,7 +8996,11 @@ static PyMethodDef gdicMethods[] = { { "wxPen_GetJoin", (PyCFunction) _wrap_wxPen_GetJoin, METH_VARARGS | METH_KEYWORDS }, { "wxPen_GetColour", (PyCFunction) _wrap_wxPen_GetColour, METH_VARARGS | METH_KEYWORDS }, { "wxPen_GetCap", (PyCFunction) _wrap_wxPen_GetCap, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxPen", (PyCFunction) _wrap_delete_wxPen, METH_VARARGS | METH_KEYWORDS }, { "new_wxPen", (PyCFunction) _wrap_new_wxPen, METH_VARARGS | METH_KEYWORDS }, + { "wxColourDatabase_Append", (PyCFunction) _wrap_wxColourDatabase_Append, METH_VARARGS | METH_KEYWORDS }, + { "wxColourDatabase_FindName", (PyCFunction) _wrap_wxColourDatabase_FindName, METH_VARARGS | METH_KEYWORDS }, + { "wxColourDatabase_FindColour", (PyCFunction) _wrap_wxColourDatabase_FindColour, METH_VARARGS | METH_KEYWORDS }, { "wxColour_Get", (PyCFunction) _wrap_wxColour_Get, METH_VARARGS | METH_KEYWORDS }, { "wxColour_Set", (PyCFunction) _wrap_wxColour_Set, METH_VARARGS | METH_KEYWORDS }, { "wxColour_Ok", (PyCFunction) _wrap_wxColour_Ok, METH_VARARGS | METH_KEYWORDS }, @@ -8364,6 +9009,9 @@ static PyMethodDef gdicMethods[] = { { "wxColour_Red", (PyCFunction) _wrap_wxColour_Red, METH_VARARGS | METH_KEYWORDS }, { "delete_wxColour", (PyCFunction) _wrap_delete_wxColour, METH_VARARGS | METH_KEYWORDS }, { "new_wxColour", (PyCFunction) _wrap_new_wxColour, METH_VARARGS | METH_KEYWORDS }, + { "wxFontList_RemoveFont", (PyCFunction) _wrap_wxFontList_RemoveFont, METH_VARARGS | METH_KEYWORDS }, + { "wxFontList_FindOrCreateFont", (PyCFunction) _wrap_wxFontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS }, + { "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetWeightString", (PyCFunction) _wrap_wxFont_GetWeightString, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetStyleString", (PyCFunction) _wrap_wxFont_GetStyleString, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetFamilyString", (PyCFunction) _wrap_wxFont_GetFamilyString, METH_VARARGS | METH_KEYWORDS }, @@ -8383,6 +9031,7 @@ static PyMethodDef gdicMethods[] = { { "wxFont_GetFamily", (PyCFunction) _wrap_wxFont_GetFamily, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetFaceName", (PyCFunction) _wrap_wxFont_GetFaceName, METH_VARARGS | METH_KEYWORDS }, { "wxFont_Ok", (PyCFunction) _wrap_wxFont_Ok, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFont", (PyCFunction) _wrap_delete_wxFont, METH_VARARGS | METH_KEYWORDS }, { "new_wxFont", (PyCFunction) _wrap_new_wxFont, METH_VARARGS | METH_KEYWORDS }, { "wxCursor_SetSize", (PyCFunction) _wrap_wxCursor_SetSize, METH_VARARGS | METH_KEYWORDS }, { "wxCursor_SetDepth", (PyCFunction) _wrap_wxCursor_SetDepth, METH_VARARGS | METH_KEYWORDS }, @@ -8467,6 +9116,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxMask","_class_wxMask",0}, { "_wxPen","_class_wxPen",0}, { "_byte","_unsigned_char",0}, + { "_wxColourDatabase","_class_wxColourDatabase",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, @@ -8507,8 +9157,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxPenList","_class_wxPenList",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, + { "_class_wxColourDatabase","_wxColourDatabase",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, @@ -8531,6 +9183,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_class_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC}, { "_class_wxDC","_wxDC",0}, + { "_class_wxBrushList","_wxBrushList",0}, + { "_class_wxPenList","_wxPenList",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, @@ -8548,6 +9202,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_short",0}, { "_class_wxFont","_wxFont",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -8617,7 +9272,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_wxPrintQuality",0}, { "_wxRegion","_class_wxRegion",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxClientDC","_wxClientDC",0}, + { "_wxBrushList","_class_wxBrushList",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, @@ -8705,6 +9362,10 @@ SWIGEXPORT(void) initgdic() { SWIG_addvarlink(SWIG_globals,"wxNullPalette",_wrap_wxNullPalette_get, _wrap_wxNullPalette_set); SWIG_addvarlink(SWIG_globals,"wxNullFont",_wrap_wxNullFont_get, _wrap_wxNullFont_set); SWIG_addvarlink(SWIG_globals,"wxNullColour",_wrap_wxNullColour_get, _wrap_wxNullColour_set); + SWIG_addvarlink(SWIG_globals,"wxTheFontList",_wrap_wxTheFontList_get, _wrap_wxTheFontList_set); + SWIG_addvarlink(SWIG_globals,"wxThePenList",_wrap_wxThePenList_get, _wrap_wxThePenList_set); + SWIG_addvarlink(SWIG_globals,"wxTheBrushList",_wrap_wxTheBrushList_get, _wrap_wxTheBrushList_set); + SWIG_addvarlink(SWIG_globals,"wxTheColourDatabase",_wrap_wxTheColourDatabase_get, _wrap_wxTheColourDatabase_set); PyDict_SetItemString(d,"wxIMAGELIST_DRAW_NORMAL", PyInt_FromLong((long) wxIMAGELIST_DRAW_NORMAL)); PyDict_SetItemString(d,"wxIMAGELIST_DRAW_TRANSPARENT", PyInt_FromLong((long) wxIMAGELIST_DRAW_TRANSPARENT)); PyDict_SetItemString(d,"wxIMAGELIST_DRAW_SELECTED", PyInt_FromLong((long) wxIMAGELIST_DRAW_SELECTED)); diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index aec000e86d..cf557ca1e7 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -216,6 +216,9 @@ class wxFontPtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxFont(self) def Ok(self, *_args, **_kwargs): val = apply(gdic.wxFont_Ok,(self,) + _args, _kwargs) return val @@ -283,6 +286,29 @@ class wxFont(wxFontPtr): +class wxFontListPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def AddFont(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_AddFont,(self,) + _args, _kwargs) + return val + def FindOrCreateFont(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_FindOrCreateFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def RemoveFont(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_RemoveFont,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFontList(wxFontListPtr): + def __init__(self,this): + self.this = this + + + + class wxColourPtr : def __init__(self,this): self.this = this @@ -321,10 +347,36 @@ class wxColour(wxColourPtr): +class wxColourDatabasePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def FindColour(self, *_args, **_kwargs): + val = apply(gdic.wxColourDatabase_FindColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def FindName(self, *_args, **_kwargs): + val = apply(gdic.wxColourDatabase_FindName,(self,) + _args, _kwargs) + return val + def Append(self, *_args, **_kwargs): + val = apply(gdic.wxColourDatabase_Append,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxColourDatabase(wxColourDatabasePtr): + def __init__(self,this): + self.this = this + + + + class wxPenPtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxPen(self) def GetCap(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetCap,(self,) + _args, _kwargs) return val @@ -382,10 +434,36 @@ class wxPen(wxPenPtr): +class wxPenListPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def AddPen(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_AddPen,(self,) + _args, _kwargs) + return val + def FindOrCreatePen(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_FindOrCreatePen,(self,) + _args, _kwargs) + if val: val = wxPenPtr(val) + return val + def RemovePen(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_RemovePen,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPenList(wxPenListPtr): + def __init__(self,this): + self.this = this + + + + class wxBrushPtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxBrush(self) def GetColour(self, *_args, **_kwargs): val = apply(gdic.wxBrush_GetColour,(self,) + _args, _kwargs) if val: val = wxColourPtr(val) @@ -419,6 +497,29 @@ class wxBrush(wxBrushPtr): +class wxBrushListPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def AddBrush(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_AddBrush,(self,) + _args, _kwargs) + return val + def FindOrCreateBrush(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_FindOrCreateBrush,(self,) + _args, _kwargs) + if val: val = wxBrushPtr(val) + return val + def RemoveBrush(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_RemoveBrush,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxBrushList(wxBrushListPtr): + def __init__(self,this): + self.this = this + + + + class wxDCPtr : def __init__(self,this): self.this = this @@ -980,6 +1081,9 @@ wxNullBrush = wxBrushPtr(gdic.cvar.wxNullBrush) wxNullPalette = wxPalettePtr(gdic.cvar.wxNullPalette) wxNullFont = wxFontPtr(gdic.cvar.wxNullFont) wxNullColour = wxColourPtr(gdic.cvar.wxNullColour) +wxTheFontList = wxFontListPtr(gdic.cvar.wxTheFontList) +wxThePenList = wxPenListPtr(gdic.cvar.wxThePenList) +wxTheColourDatabase = wxColourDatabasePtr(gdic.cvar.wxTheColourDatabase) wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index c46c40550f..89392b6c56 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -2235,6 +2235,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_short",0}, { "_class_wxFont","_wxFont",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, { "_class_wxPoint","_wxPoint",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -2323,6 +2324,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index 87a067db11..d3866f22bf 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -1011,6 +1011,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -1138,6 +1139,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index c224ea72a8..650d82cd08 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -4739,6 +4739,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -4875,6 +4876,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index 15224016f3..2ac42e5fa5 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -3006,6 +3006,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -3145,6 +3146,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index 7e3ce13150..fff1dabb00 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -3486,6 +3486,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPyValidator","_wxPyValidator",0}, { "_class_wxCloseEvent","_wxCloseEvent",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_class_wxMenuEvent","_wxMenuEvent",0}, { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0}, { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0}, @@ -3622,6 +3623,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGauge","_class_wxGauge",0}, { "_class_wxCheckListBox","_wxCheckListBox",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxCommandEvent","_wxCommandEvent",0}, { "_class_wxClientDC","_wxClientDC",0}, { "_class_wxSizeEvent","_wxSizeEvent",0}, diff --git a/wxPython/wxPython/lib/colourdb.py b/wxPython/wxPython/lib/colourdb.py new file mode 100644 index 0000000000..fb8e86b445 --- /dev/null +++ b/wxPython/wxPython/lib/colourdb.py @@ -0,0 +1,659 @@ +#---------------------------------------------------------------------- +# Name: wxPython.lib.colourdb.py +# Purpose: Adds a bunch of colour names and RGB values to the +# colour database so they can be found by name +# +# Author: Robin Dunn +# +# Created: 13-March-2001 +# RCS-ID: $Id$ +# Copyright: (c) 2001 by Total Control Software +# Licence: wxWindows license +#---------------------------------------------------------------------- + +""" +Load color names/values from the rgb.txt file on my system... +""" + +def getColourList(): + return [ + ("SNOW", 255, 250, 250), + ("GHOST WHITE", 248, 248, 255), + ("GHOSTWHITE", 248, 248, 255), + ("WHITE SMOKE", 245, 245, 245), + ("WHITESMOKE", 245, 245, 245), + ("GAINSBORO", 220, 220, 220), + ("FLORAL WHITE", 255, 250, 240), + ("FLORALWHITE", 255, 250, 240), + ("OLD LACE", 253, 245, 230), + ("OLDLACE", 253, 245, 230), + ("LINEN", 250, 240, 230), + ("ANTIQUE WHITE", 250, 235, 215), + ("ANTIQUEWHITE", 250, 235, 215), + ("PAPAYA WHIP", 255, 239, 213), + ("PAPAYAWHIP", 255, 239, 213), + ("BLANCHED ALMOND", 255, 235, 205), + ("BLANCHEDALMOND", 255, 235, 205), + ("BISQUE", 255, 228, 196), + ("PEACH PUFF", 255, 218, 185), + ("PEACHPUFF", 255, 218, 185), + ("NAVAJO WHITE", 255, 222, 173), + ("NAVAJOWHITE", 255, 222, 173), + ("MOCCASIN", 255, 228, 181), + ("CORNSILK", 255, 248, 220), + ("IVORY", 255, 255, 240), + ("LEMON CHIFFON", 255, 250, 205), + ("LEMONCHIFFON", 255, 250, 205), + ("SEASHELL", 255, 245, 238), + ("HONEYDEW", 240, 255, 240), + ("MINT CREAM", 245, 255, 250), + ("MINTCREAM", 245, 255, 250), + ("AZURE", 240, 255, 255), + ("ALICE BLUE", 240, 248, 255), + ("ALICEBLUE", 240, 248, 255), + ("LAVENDER", 230, 230, 250), + ("LAVENDER BLUSH", 255, 240, 245), + ("LAVENDERBLUSH", 255, 240, 245), + ("MISTY ROSE", 255, 228, 225), + ("MISTYROSE", 255, 228, 225), + ("WHITE", 255, 255, 255), + ("BLACK", 0, 0, 0), + ("DARK SLATE GREY", 47, 79, 79), + ("DARKSLATEGREY", 47, 79, 79), + ("DIM GREY", 105, 105, 105), + ("DIMGREY", 105, 105, 105), + ("SLATE GREY", 112, 128, 144), + ("SLATEGREY", 112, 128, 144), + ("LIGHT SLATE grey", 119, 136, 153), + ("LIGHTSLATEGREY", 119, 136, 153), + ("GREY", 190, 190, 190), + ("LIGHT GREY", 211, 211, 211), + ("LIGHTGREY", 211, 211, 211), + ("MIDNIGHT BLUE", 25, 25, 112), + ("MIDNIGHTBLUE", 25, 25, 112), + ("NAVY", 0, 0, 128), + ("NAVY BLUE", 0, 0, 128), + ("NAVYBLUE", 0, 0, 128), + ("CORNFLOWER BLUE", 100, 149, 237), + ("CORNFLOWERBLUE", 100, 149, 237), + ("DARK SLATE BLUE", 72, 61, 139), + ("DARKSLATEBLUE", 72, 61, 139), + ("SLATE BLUE", 106, 90, 205), + ("SLATEBLUE", 106, 90, 205), + ("MEDIUM SLATE BLUE", 123, 104, 238), + ("MEDIUMSLATEBLUE", 123, 104, 238), + ("LIGHT SLATE blue", 132, 112, 255), + ("LIGHTSLATEBLUE", 132, 112, 255), + ("MEDIUM BLUE", 0, 0, 205), + ("MEDIUMBLUE", 0, 0, 205), + ("ROYAL BLUE", 65, 105, 225), + ("ROYALBLUE", 65, 105, 225), + ("BLUE", 0, 0, 255), + ("DODGER BLUE", 30, 144, 255), + ("DODGERBLUE", 30, 144, 255), + ("DEEP SKY BLUE", 0, 191, 255), + ("DEEPSKYBLUE", 0, 191, 255), + ("SKY BLUE", 135, 206, 235), + ("SKYBLUE", 135, 206, 235), + ("LIGHT SKY BLUE", 135, 206, 250), + ("LIGHTSKYBLUE", 135, 206, 250), + ("STEEL BLUE", 70, 130, 180), + ("STEELBLUE", 70, 130, 180), + ("LIGHT STEEL BLUE", 176, 196, 222), + ("LIGHTSTEELBLUE", 176, 196, 222), + ("LIGHT BLUE", 173, 216, 230), + ("LIGHTBLUE", 173, 216, 230), + ("POWDER BLUE", 176, 224, 230), + ("POWDERBLUE", 176, 224, 230), + ("PALE TURQUOISE", 175, 238, 238), + ("PALETURQUOISE", 175, 238, 238), + ("DARK TURQUOISE", 0, 206, 209), + ("DARKTURQUOISE", 0, 206, 209), + ("MEDIUM TURQUOISE", 72, 209, 204), + ("MEDIUMTURQUOISE", 72, 209, 204), + ("TURQUOISE", 64, 224, 208), + ("CYAN", 0, 255, 255), + ("LIGHT CYAN", 224, 255, 255), + ("LIGHTCYAN", 224, 255, 255), + ("CADET BLUE", 95, 158, 160), + ("CADETBLUE", 95, 158, 160), + ("MEDIUM AQUAMARINE", 102, 205, 170), + ("MEDIUMAQUAMARINE", 102, 205, 170), + ("AQUAMARINE", 127, 255, 212), + ("DARK GREEN", 0, 100, 0), + ("DARKGREEN", 0, 100, 0), + ("DARK OLIVE GREEN", 85, 107, 47), + ("DARKOLIVEGREEN", 85, 107, 47), + ("DARK SEA green", 143, 188, 143), + ("DARKSEAGREEN", 143, 188, 143), + ("SEA GREEN", 46, 139, 87), + ("SEAGREEN", 46, 139, 87), + ("MEDIUM SEA GREEN", 60, 179, 113), + ("MEDIUMSEAGREEN", 60, 179, 113), + ("LIGHT SEA GREEN", 32, 178, 170), + ("LIGHTSEAGREEN", 32, 178, 170), + ("PALE GREEN", 152, 251, 152), + ("PALEGREEN", 152, 251, 152), + ("SPRING GREEN", 0, 255, 127), + ("SPRINGGREEN", 0, 255, 127), + ("LAWN GREEN", 124, 252, 0), + ("LAWNGREEN", 124, 252, 0), + ("GREEN", 0, 255, 0), + ("CHARTREUSE", 127, 255, 0), + ("MEDIUM SPRING GREEN", 0, 250, 154), + ("MEDIUMSPRINGGREEN", 0, 250, 154), + ("GREEN YELLOW", 173, 255, 47), + ("GREENYELLOW", 173, 255, 47), + ("LIME GREEN", 50, 205, 50), + ("LIMEGREEN", 50, 205, 50), + ("YELLOW GREEN", 154, 205, 50), + ("YELLOWGREEN", 154, 205, 50), + ("FOREST GREEN", 34, 139, 34), + ("FORESTGREEN", 34, 139, 34), + ("OLIVE DRAB", 107, 142, 35), + ("OLIVEDRAB", 107, 142, 35), + ("DARK KHAKI", 189, 183, 107), + ("DARKKHAKI", 189, 183, 107), + ("KHAKI", 240, 230, 140), + ("PALE GOLDENROD", 238, 232, 170), + ("PALEGOLDENROD", 238, 232, 170), + ("LIGHT GOLDENROD YELLOW", 250, 250, 210), + ("LIGHTGOLDENRODYELLOW", 250, 250, 210), + ("LIGHT YELLOW", 255, 255, 224), + ("LIGHTYELLOW", 255, 255, 224), + ("YELLOW", 255, 255, 0), + ("GOLD", 255, 215, 0), + ("LIGHT GOLDENROD", 238, 221, 130), + ("LIGHTGOLDENROD", 238, 221, 130), + ("GOLDENROD", 218, 165, 32), + ("DARK GOLDENROD", 184, 134, 11), + ("DARKGOLDENROD", 184, 134, 11), + ("ROSY BROWN", 188, 143, 143), + ("ROSYBROWN", 188, 143, 143), + ("INDIAN RED", 205, 92, 92), + ("INDIANRED", 205, 92, 92), + ("SADDLE BROWN", 139, 69, 19), + ("SADDLEBROWN", 139, 69, 19), + ("SIENNA", 160, 82, 45), + ("PERU", 205, 133, 63), + ("BURLYWOOD", 222, 184, 135), + ("BEIGE", 245, 245, 220), + ("WHEAT", 245, 222, 179), + ("SANDY BROWN", 244, 164, 96), + ("SANDYBROWN", 244, 164, 96), + ("TAN", 210, 180, 140), + ("CHOCOLATE", 210, 105, 30), + ("FIREBRICK", 178, 34, 34), + ("BROWN", 165, 42, 42), + ("DARK SALMON", 233, 150, 122), + ("DARKSALMON", 233, 150, 122), + ("SALMON", 250, 128, 114), + ("LIGHT SALMON", 255, 160, 122), + ("LIGHTSALMON", 255, 160, 122), + ("ORANGE", 255, 165, 0), + ("DARK ORANGE", 255, 140, 0), + ("DARKORANGE", 255, 140, 0), + ("CORAL", 255, 127, 80), + ("LIGHT CORAL", 240, 128, 128), + ("LIGHTCORAL", 240, 128, 128), + ("TOMATO", 255, 99, 71), + ("ORANGE RED", 255, 69, 0), + ("ORANGERED", 255, 69, 0), + ("RED", 255, 0, 0), + ("HOT PINK", 255, 105, 180), + ("HOTPINK", 255, 105, 180), + ("DEEP PINK", 255, 20, 147), + ("DEEPPINK", 255, 20, 147), + ("PINK", 255, 192, 203), + ("LIGHT PINK", 255, 182, 193), + ("LIGHTPINK", 255, 182, 193), + ("PALE VIOLET RED", 219, 112, 147), + ("PALEVIOLETRED", 219, 112, 147), + ("MAROON", 176, 48, 96), + ("MEDIUM VIOLET RED", 199, 21, 133), + ("MEDIUMVIOLETRED", 199, 21, 133), + ("VIOLET RED", 208, 32, 144), + ("VIOLETRED", 208, 32, 144), + ("MAGENTA", 255, 0, 255), + ("VIOLET", 238, 130, 238), + ("PLUM", 221, 160, 221), + ("ORCHID", 218, 112, 214), + ("MEDIUM ORCHID", 186, 85, 211), + ("MEDIUMORCHID", 186, 85, 211), + ("DARK ORCHID", 153, 50, 204), + ("DARKORCHID", 153, 50, 204), + ("DARK VIOLET", 148, 0, 211), + ("DARKVIOLET", 148, 0, 211), + ("BLUE VIOLET", 138, 43, 226), + ("BLUEVIOLET", 138, 43, 226), + ("PURPLE", 160, 32, 240), + ("MEDIUM PURPLE", 147, 112, 219), + ("MEDIUMPURPLE", 147, 112, 219), + ("THISTLE", 216, 191, 216), + ("SNOW1", 255, 250, 250), + ("SNOW2", 238, 233, 233), + ("SNOW3", 205, 201, 201), + ("SNOW4", 139, 137, 137), + ("SEASHELL1", 255, 245, 238), + ("SEASHELL2", 238, 229, 222), + ("SEASHELL3", 205, 197, 191), + ("SEASHELL4", 139, 134, 130), + ("ANTIQUEWHITE1", 255, 239, 219), + ("ANTIQUEWHITE2", 238, 223, 204), + ("ANTIQUEWHITE3", 205, 192, 176), + ("ANTIQUEWHITE4", 139, 131, 120), + ("BISQUE1", 255, 228, 196), + ("BISQUE2", 238, 213, 183), + ("BISQUE3", 205, 183, 158), + ("BISQUE4", 139, 125, 107), + ("PEACHPUFF1", 255, 218, 185), + ("PEACHPUFF2", 238, 203, 173), + ("PEACHPUFF3", 205, 175, 149), + ("PEACHPUFF4", 139, 119, 101), + ("NAVAJOWHITE1", 255, 222, 173), + ("NAVAJOWHITE2", 238, 207, 161), + ("NAVAJOWHITE3", 205, 179, 139), + ("NAVAJOWHITE4", 139, 121, 94), + ("LEMONCHIFFON1", 255, 250, 205), + ("LEMONCHIFFON2", 238, 233, 191), + ("LEMONCHIFFON3", 205, 201, 165), + ("LEMONCHIFFON4", 139, 137, 112), + ("CORNSILK1", 255, 248, 220), + ("CORNSILK2", 238, 232, 205), + ("CORNSILK3", 205, 200, 177), + ("CORNSILK4", 139, 136, 120), + ("IVORY1", 255, 255, 240), + ("IVORY2", 238, 238, 224), + ("IVORY3", 205, 205, 193), + ("IVORY4", 139, 139, 131), + ("HONEYDEW1", 240, 255, 240), + ("HONEYDEW2", 224, 238, 224), + ("HONEYDEW3", 193, 205, 193), + ("HONEYDEW4", 131, 139, 131), + ("LAVENDERBLUSH1", 255, 240, 245), + ("LAVENDERBLUSH2", 238, 224, 229), + ("LAVENDERBLUSH3", 205, 193, 197), + ("LAVENDERBLUSH4", 139, 131, 134), + ("MISTYROSE1", 255, 228, 225), + ("MISTYROSE2", 238, 213, 210), + ("MISTYROSE3", 205, 183, 181), + ("MISTYROSE4", 139, 125, 123), + ("AZURE1", 240, 255, 255), + ("AZURE2", 224, 238, 238), + ("AZURE3", 193, 205, 205), + ("AZURE4", 131, 139, 139), + ("SLATEBLUE1", 131, 111, 255), + ("SLATEBLUE2", 122, 103, 238), + ("SLATEBLUE3", 105, 89, 205), + ("SLATEBLUE4", 71, 60, 139), + ("ROYALBLUE1", 72, 118, 255), + ("ROYALBLUE2", 67, 110, 238), + ("ROYALBLUE3", 58, 95, 205), + ("ROYALBLUE4", 39, 64, 139), + ("BLUE1", 0, 0, 255), + ("BLUE2", 0, 0, 238), + ("BLUE3", 0, 0, 205), + ("BLUE4", 0, 0, 139), + ("DODGERBLUE1", 30, 144, 255), + ("DODGERBLUE2", 28, 134, 238), + ("DODGERBLUE3", 24, 116, 205), + ("DODGERBLUE4", 16, 78, 139), + ("STEELBLUE1", 99, 184, 255), + ("STEELBLUE2", 92, 172, 238), + ("STEELBLUE3", 79, 148, 205), + ("STEELBLUE4", 54, 100, 139), + ("DEEPSKYBLUE1", 0, 191, 255), + ("DEEPSKYBLUE2", 0, 178, 238), + ("DEEPSKYBLUE3", 0, 154, 205), + ("DEEPSKYBLUE4", 0, 104, 139), + ("SKYBLUE1", 135, 206, 255), + ("SKYBLUE2", 126, 192, 238), + ("SKYBLUE3", 108, 166, 205), + ("SKYBLUE4", 74, 112, 139), + ("LIGHTSKYBLUE1", 176, 226, 255), + ("LIGHTSKYBLUE2", 164, 211, 238), + ("LIGHTSKYBLUE3", 141, 182, 205), + ("LIGHTSKYBLUE4", 96, 123, 139), + ("LIGHTSTEELBLUE1", 202, 225, 255), + ("LIGHTSTEELBLUE2", 188, 210, 238), + ("LIGHTSTEELBLUE3", 162, 181, 205), + ("LIGHTSTEELBLUE4", 110, 123, 139), + ("LIGHTBLUE1", 191, 239, 255), + ("LIGHTBLUE2", 178, 223, 238), + ("LIGHTBLUE3", 154, 192, 205), + ("LIGHTBLUE4", 104, 131, 139), + ("LIGHTCYAN1", 224, 255, 255), + ("LIGHTCYAN2", 209, 238, 238), + ("LIGHTCYAN3", 180, 205, 205), + ("LIGHTCYAN4", 122, 139, 139), + ("PALETURQUOISE1", 187, 255, 255), + ("PALETURQUOISE2", 174, 238, 238), + ("PALETURQUOISE3", 150, 205, 205), + ("PALETURQUOISE4", 102, 139, 139), + ("CADETBLUE1", 152, 245, 255), + ("CADETBLUE2", 142, 229, 238), + ("CADETBLUE3", 122, 197, 205), + ("CADETBLUE4", 83, 134, 139), + ("TURQUOISE1", 0, 245, 255), + ("TURQUOISE2", 0, 229, 238), + ("TURQUOISE3", 0, 197, 205), + ("TURQUOISE4", 0, 134, 139), + ("CYAN1", 0, 255, 255), + ("CYAN2", 0, 238, 238), + ("CYAN3", 0, 205, 205), + ("CYAN4", 0, 139, 139), + ("AQUAMARINE1", 127, 255, 212), + ("AQUAMARINE2", 118, 238, 198), + ("AQUAMARINE3", 102, 205, 170), + ("AQUAMARINE4", 69, 139, 116), + ("DARKSEAGREEN1", 193, 255, 193), + ("DARKSEAGREEN2", 180, 238, 180), + ("DARKSEAGREEN3", 155, 205, 155), + ("DARKSEAGREEN4", 105, 139, 105), + ("SEAGREEN1", 84, 255, 159), + ("SEAGREEN2", 78, 238, 148), + ("SEAGREEN3", 67, 205, 128), + ("SEAGREEN4", 46, 139, 87), + ("PALEGREEN1", 154, 255, 154), + ("PALEGREEN2", 144, 238, 144), + ("PALEGREEN3", 124, 205, 124), + ("PALEGREEN4", 84, 139, 84), + ("SPRINGGREEN1", 0, 255, 127), + ("SPRINGGREEN2", 0, 238, 118), + ("SPRINGGREEN3", 0, 205, 102), + ("SPRINGGREEN4", 0, 139, 69), + ("GREEN1", 0, 255, 0), + ("GREEN2", 0, 238, 0), + ("GREEN3", 0, 205, 0), + ("GREEN4", 0, 139, 0), + ("CHARTREUSE1", 127, 255, 0), + ("CHARTREUSE2", 118, 238, 0), + ("CHARTREUSE3", 102, 205, 0), + ("CHARTREUSE4", 69, 139, 0), + ("OLIVEDRAB1", 192, 255, 62), + ("OLIVEDRAB2", 179, 238, 58), + ("OLIVEDRAB3", 154, 205, 50), + ("OLIVEDRAB4", 105, 139, 34), + ("DARKOLIVEGREEN1", 202, 255, 112), + ("DARKOLIVEGREEN2", 188, 238, 104), + ("DARKOLIVEGREEN3", 162, 205, 90), + ("DARKOLIVEGREEN4", 110, 139, 61), + ("KHAKI1", 255, 246, 143), + ("KHAKI2", 238, 230, 133), + ("KHAKI3", 205, 198, 115), + ("KHAKI4", 139, 134, 78), + ("LIGHTGOLDENROD1", 255, 236, 139), + ("LIGHTGOLDENROD2", 238, 220, 130), + ("LIGHTGOLDENROD3", 205, 190, 112), + ("LIGHTGOLDENROD4", 139, 129, 76), + ("LIGHTYELLOW1", 255, 255, 224), + ("LIGHTYELLOW2", 238, 238, 209), + ("LIGHTYELLOW3", 205, 205, 180), + ("LIGHTYELLOW4", 139, 139, 122), + ("YELLOW1", 255, 255, 0), + ("YELLOW2", 238, 238, 0), + ("YELLOW3", 205, 205, 0), + ("YELLOW4", 139, 139, 0), + ("GOLD1", 255, 215, 0), + ("GOLD2", 238, 201, 0), + ("GOLD3", 205, 173, 0), + ("GOLD4", 139, 117, 0), + ("GOLDENROD1", 255, 193, 37), + ("GOLDENROD2", 238, 180, 34), + ("GOLDENROD3", 205, 155, 29), + ("GOLDENROD4", 139, 105, 20), + ("DARKGOLDENROD1", 255, 185, 15), + ("DARKGOLDENROD2", 238, 173, 14), + ("DARKGOLDENROD3", 205, 149, 12), + ("DARKGOLDENROD4", 139, 101, 8), + ("ROSYBROWN1", 255, 193, 193), + ("ROSYBROWN2", 238, 180, 180), + ("ROSYBROWN3", 205, 155, 155), + ("ROSYBROWN4", 139, 105, 105), + ("INDIANRED1", 255, 106, 106), + ("INDIANRED2", 238, 99, 99), + ("INDIANRED3", 205, 85, 85), + ("INDIANRED4", 139, 58, 58), + ("SIENNA1", 255, 130, 71), + ("SIENNA2", 238, 121, 66), + ("SIENNA3", 205, 104, 57), + ("SIENNA4", 139, 71, 38), + ("BURLYWOOD1", 255, 211, 155), + ("BURLYWOOD2", 238, 197, 145), + ("BURLYWOOD3", 205, 170, 125), + ("BURLYWOOD4", 139, 115, 85), + ("WHEAT1", 255, 231, 186), + ("WHEAT2", 238, 216, 174), + ("WHEAT3", 205, 186, 150), + ("WHEAT4", 139, 126, 102), + ("TAN1", 255, 165, 79), + ("TAN2", 238, 154, 73), + ("TAN3", 205, 133, 63), + ("TAN4", 139, 90, 43), + ("CHOCOLATE1", 255, 127, 36), + ("CHOCOLATE2", 238, 118, 33), + ("CHOCOLATE3", 205, 102, 29), + ("CHOCOLATE4", 139, 69, 19), + ("FIREBRICK1", 255, 48, 48), + ("FIREBRICK2", 238, 44, 44), + ("FIREBRICK3", 205, 38, 38), + ("FIREBRICK4", 139, 26, 26), + ("BROWN1", 255, 64, 64), + ("BROWN2", 238, 59, 59), + ("BROWN3", 205, 51, 51), + ("BROWN4", 139, 35, 35), + ("SALMON1", 255, 140, 105), + ("SALMON2", 238, 130, 98), + ("SALMON3", 205, 112, 84), + ("SALMON4", 139, 76, 57), + ("LIGHTSALMON1", 255, 160, 122), + ("LIGHTSALMON2", 238, 149, 114), + ("LIGHTSALMON3", 205, 129, 98), + ("LIGHTSALMON4", 139, 87, 66), + ("ORANGE1", 255, 165, 0), + ("ORANGE2", 238, 154, 0), + ("ORANGE3", 205, 133, 0), + ("ORANGE4", 139, 90, 0), + ("DARKORANGE1", 255, 127, 0), + ("DARKORANGE2", 238, 118, 0), + ("DARKORANGE3", 205, 102, 0), + ("DARKORANGE4", 139, 69, 0), + ("CORAL1", 255, 114, 86), + ("CORAL2", 238, 106, 80), + ("CORAL3", 205, 91, 69), + ("CORAL4", 139, 62, 47), + ("TOMATO1", 255, 99, 71), + ("TOMATO2", 238, 92, 66), + ("TOMATO3", 205, 79, 57), + ("TOMATO4", 139, 54, 38), + ("ORANGERED1", 255, 69, 0), + ("ORANGERED2", 238, 64, 0), + ("ORANGERED3", 205, 55, 0), + ("ORANGERED4", 139, 37, 0), + ("RED1", 255, 0, 0), + ("RED2", 238, 0, 0), + ("RED3", 205, 0, 0), + ("RED4", 139, 0, 0), + ("DEEPPINK1", 255, 20, 147), + ("DEEPPINK2", 238, 18, 137), + ("DEEPPINK3", 205, 16, 118), + ("DEEPPINK4", 139, 10, 80), + ("HOTPINK1", 255, 110, 180), + ("HOTPINK2", 238, 106, 167), + ("HOTPINK3", 205, 96, 144), + ("HOTPINK4", 139, 58, 98), + ("PINK1", 255, 181, 197), + ("PINK2", 238, 169, 184), + ("PINK3", 205, 145, 158), + ("PINK4", 139, 99, 108), + ("LIGHTPINK1", 255, 174, 185), + ("LIGHTPINK2", 238, 162, 173), + ("LIGHTPINK3", 205, 140, 149), + ("LIGHTPINK4", 139, 95, 101), + ("PALEVIOLETRED1", 255, 130, 171), + ("PALEVIOLETRED2", 238, 121, 159), + ("PALEVIOLETRED3", 205, 104, 137), + ("PALEVIOLETRED4", 139, 71, 93), + ("MAROON1", 255, 52, 179), + ("MAROON2", 238, 48, 167), + ("MAROON3", 205, 41, 144), + ("MAROON4", 139, 28, 98), + ("VIOLETRED1", 255, 62, 150), + ("VIOLETRED2", 238, 58, 140), + ("VIOLETRED3", 205, 50, 120), + ("VIOLETRED4", 139, 34, 82), + ("MAGENTA1", 255, 0, 255), + ("MAGENTA2", 238, 0, 238), + ("MAGENTA3", 205, 0, 205), + ("MAGENTA4", 139, 0, 139), + ("ORCHID1", 255, 131, 250), + ("ORCHID2", 238, 122, 233), + ("ORCHID3", 205, 105, 201), + ("ORCHID4", 139, 71, 137), + ("PLUM1", 255, 187, 255), + ("PLUM2", 238, 174, 238), + ("PLUM3", 205, 150, 205), + ("PLUM4", 139, 102, 139), + ("MEDIUMORCHID1", 224, 102, 255), + ("MEDIUMORCHID2", 209, 95, 238), + ("MEDIUMORCHID3", 180, 82, 205), + ("MEDIUMORCHID4", 122, 55, 139), + ("DARKORCHID1", 191, 62, 255), + ("DARKORCHID2", 178, 58, 238), + ("DARKORCHID3", 154, 50, 205), + ("DARKORCHID4", 104, 34, 139), + ("PURPLE1", 155, 48, 255), + ("PURPLE2", 145, 44, 238), + ("PURPLE3", 125, 38, 205), + ("PURPLE4", 85, 26, 139), + ("MEDIUMPURPLE1", 171, 130, 255), + ("MEDIUMPURPLE2", 159, 121, 238), + ("MEDIUMPURPLE3", 137, 104, 205), + ("MEDIUMPURPLE4", 93, 71, 139), + ("THISTLE1", 255, 225, 255), + ("THISTLE2", 238, 210, 238), + ("THISTLE3", 205, 181, 205), + ("THISTLE4", 139, 123, 139), + ("GREY0", 0, 0, 0), + ("GREY1", 3, 3, 3), + ("GREY2", 5, 5, 5), + ("GREY3", 8, 8, 8), + ("GREY4", 10, 10, 10), + ("GREY5", 13, 13, 13), + ("GREY6", 15, 15, 15), + ("GREY7", 18, 18, 18), + ("GREY8", 20, 20, 20), + ("GREY9", 23, 23, 23), + ("GREY10", 26, 26, 26), + ("GREY11", 28, 28, 28), + ("GREY12", 31, 31, 31), + ("GREY13", 33, 33, 33), + ("GREY14", 36, 36, 36), + ("GREY15", 38, 38, 38), + ("GREY16", 41, 41, 41), + ("GREY17", 43, 43, 43), + ("GREY18", 46, 46, 46), + ("GREY19", 48, 48, 48), + ("GREY20", 51, 51, 51), + ("GREY21", 54, 54, 54), + ("GREY22", 56, 56, 56), + ("GREY23", 59, 59, 59), + ("GREY24", 61, 61, 61), + ("GREY25", 64, 64, 64), + ("GREY26", 66, 66, 66), + ("GREY27", 69, 69, 69), + ("GREY28", 71, 71, 71), + ("GREY29", 74, 74, 74), + ("GREY30", 77, 77, 77), + ("GREY31", 79, 79, 79), + ("GREY32", 82, 82, 82), + ("GREY33", 84, 84, 84), + ("GREY34", 87, 87, 87), + ("GREY35", 89, 89, 89), + ("GREY36", 92, 92, 92), + ("GREY37", 94, 94, 94), + ("GREY38", 97, 97, 97), + ("GREY39", 99, 99, 99), + ("GREY40", 102, 102, 102), + ("GREY41", 105, 105, 105), + ("GREY42", 107, 107, 107), + ("GREY43", 110, 110, 110), + ("GREY44", 112, 112, 112), + ("GREY45", 115, 115, 115), + ("GREY46", 117, 117, 117), + ("GREY47", 120, 120, 120), + ("GREY48", 122, 122, 122), + ("GREY49", 125, 125, 125), + ("GREY50", 127, 127, 127), + ("GREY51", 130, 130, 130), + ("GREY52", 133, 133, 133), + ("GREY53", 135, 135, 135), + ("GREY54", 138, 138, 138), + ("GREY55", 140, 140, 140), + ("GREY56", 143, 143, 143), + ("GREY57", 145, 145, 145), + ("GREY58", 148, 148, 148), + ("GREY59", 150, 150, 150), + ("GREY60", 153, 153, 153), + ("GREY61", 156, 156, 156), + ("GREY62", 158, 158, 158), + ("GREY63", 161, 161, 161), + ("GREY64", 163, 163, 163), + ("GREY65", 166, 166, 166), + ("GREY66", 168, 168, 168), + ("GREY67", 171, 171, 171), + ("GREY68", 173, 173, 173), + ("GREY69", 176, 176, 176), + ("GREY70", 179, 179, 179), + ("GREY71", 181, 181, 181), + ("GREY72", 184, 184, 184), + ("GREY73", 186, 186, 186), + ("GREY74", 189, 189, 189), + ("GREY75", 191, 191, 191), + ("GREY76", 194, 194, 194), + ("GREY77", 196, 196, 196), + ("GREY78", 199, 199, 199), + ("GREY79", 201, 201, 201), + ("GREY80", 204, 204, 204), + ("GREY81", 207, 207, 207), + ("GREY82", 209, 209, 209), + ("GREY83", 212, 212, 212), + ("GREY84", 214, 214, 214), + ("GREY85", 217, 217, 217), + ("GREY86", 219, 219, 219), + ("GREY87", 222, 222, 222), + ("GREY88", 224, 224, 224), + ("GREY89", 227, 227, 227), + ("GREY90", 229, 229, 229), + ("GREY91", 232, 232, 232), + ("GREY92", 235, 235, 235), + ("GREY93", 237, 237, 237), + ("GREY94", 240, 240, 240), + ("GREY95", 242, 242, 242), + ("GREY96", 245, 245, 245), + ("GREY97", 247, 247, 247), + ("GREY98", 250, 250, 250), + ("GREY99", 252, 252, 252), + ("GREY100", 255, 255, 255), + ("DARK GREY", 169, 169, 169), + ("DARKGREY", 169, 169, 169), + ("DARK BLUE", 0, 0, 139), + ("DARKBLUE", 0, 0, 139), + ("DARK CYAN", 0, 139, 139), + ("DARKCYAN", 0, 139, 139), + ("DARK MAGENTA", 139, 0, 139), + ("DARKMAGENTA", 139, 0, 139), + ("DARK RED", 139, 0, 0), + ("DARKRED", 139, 0, 0), + ("LIGHT GREEN", 144, 238, 144), + ("LIGHTGREEN", 144, 238, 144), + ] + + +def updateColourDB(): + from wxPython.wx import wxTheColourDatabase + cl = getColourList() + for info in cl: + apply(wxTheColourDatabase.Append, info) + + diff --git a/wxPython/wxPython/lib/rpcMixin.py b/wxPython/wxPython/lib/rpcMixin.py index 44736e6bd8..1d7821b326 100644 --- a/wxPython/wxPython/lib/rpcMixin.py +++ b/wxPython/wxPython/lib/rpcMixin.py @@ -9,7 +9,7 @@ # (http://www.pythonware.com/products/xmlrpc/) # the code was developed and tested using version 0.9.8 # -# Author: greg Landrum (Landrum@RationalDiscovery.com) +# Author: Greg Landrum (Landrum@RationalDiscovery.com) # # Copyright: (c) 2000 by Greg Landrum and Rational Discovery LLC # Licence: wxWindows license @@ -102,7 +102,7 @@ class Handler(xmlrpcserver.RequestHandler): evt.rpcCondVar.wait() evt.rpcCondVar.release() evt.rpcStatusLock.acquire() - if evt.rpcStatus.status == rpcEXCEPT: + if evt.rpcStatus.stwxTheColourDatabaseatus == rpcEXCEPT: # The GUI threw an exception, release the status lock # and re-raise the exception evt.rpcStatusLock.release() @@ -128,7 +128,7 @@ class rpcMixin: host: (optional) the hostname for the server port: (optional) the port the server will use """ - EVT_EXTERNAL_EVENT(self,self.OnExternal) + EVT_EXTERNAL_EVENT(swxTheColourDatabaseelf,self.OnExternal) if hasattr(self,'OnClose'): self._origOnClose = self.OnClose else: