From b2dc104421c340091342156d6b01f61f1ccff438 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 20 Dec 2003 01:01:49 +0000 Subject: [PATCH] More changes to make the autodocs be better, made all the namestrings and such be visible to swig so the autodoc generator knows how to rename them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/gizmos.i | 13 +- wxPython/contrib/gizmos/gtk/gizmos.py | 32 +- wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp | 73 ++- wxPython/contrib/glcanvas/glcanvas.i | 7 +- wxPython/contrib/glcanvas/gtk/glcanvas.py | 9 +- .../contrib/glcanvas/gtk/glcanvas_wrap.cpp | 26 +- wxPython/contrib/ogl/gtk/ogl_wrap.cpp | 3 +- wxPython/contrib/ogl/ogl.i | 6 +- wxPython/contrib/stc/stc.i | 4 +- wxPython/contrib/stc/stc.py | 4 +- wxPython/contrib/stc/stc_wrap.cpp | 24 +- wxPython/contrib/xrc/xrc.i | 19 +- wxPython/contrib/xrc/xrc.py | 32 +- wxPython/contrib/xrc/xrc_wrap.cpp | 164 +++++- wxPython/src/_button.i | 23 +- wxPython/src/_checkbox.i | 4 +- wxPython/src/_choice.i | 5 +- wxPython/src/_cmndlgs.i | 16 +- wxPython/src/_combobox.i | 4 +- wxPython/src/_control.i | 4 +- wxPython/src/_datetime.i | 7 +- wxPython/src/_defs.i | 50 +- wxPython/src/_dirctrl.i | 10 +- wxPython/src/_event.i | 1 - wxPython/src/_functions.i | 8 +- wxPython/src/_gauge.i | 4 +- wxPython/src/_listbox.i | 4 +- wxPython/src/_listctrl.i | 3 +- wxPython/src/_notebook.i | 4 +- wxPython/src/_printfw.i | 12 +- wxPython/src/_radio.i | 6 +- wxPython/src/_sashwin.i | 8 +- wxPython/src/_scrolbar.i | 4 +- wxPython/src/_slider.i | 3 +- wxPython/src/_spin.i | 7 +- wxPython/src/_splitter.i | 6 +- wxPython/src/_statctrls.i | 8 +- wxPython/src/_textctrl.i | 4 +- wxPython/src/_tglbtn.i | 5 +- wxPython/src/_toolbar.i | 11 +- wxPython/src/_toplvl.i | 11 +- wxPython/src/_treectrl.i | 9 +- wxPython/src/_vscroll.i | 3 +- wxPython/src/calendar.i | 4 +- wxPython/src/controls.i | 14 +- wxPython/src/gdi.i | 8 +- wxPython/src/grid.i | 9 +- wxPython/src/gtk/calendar.py | 6 +- wxPython/src/gtk/calendar_wrap.cpp | 26 +- wxPython/src/gtk/controls.py | 160 ++--- wxPython/src/gtk/controls_wrap.cpp | 547 +++++++++++++++--- wxPython/src/gtk/core.py | 5 +- wxPython/src/gtk/core_wrap.cpp | 25 +- wxPython/src/gtk/gdi.py | 2 +- wxPython/src/gtk/gdi_wrap.cpp | 2 +- wxPython/src/gtk/grid.py | 3 +- wxPython/src/gtk/grid_wrap.cpp | 27 +- wxPython/src/gtk/html.py | 32 +- wxPython/src/gtk/html_wrap.cpp | 77 ++- wxPython/src/gtk/misc.py | 33 +- wxPython/src/gtk/misc_wrap.cpp | 123 +++- wxPython/src/gtk/windows.py | 101 ++-- wxPython/src/gtk/windows_wrap.cpp | 428 ++++++++++++-- wxPython/src/gtk/wizard.py | 4 +- wxPython/src/gtk/wizard_wrap.cpp | 6 +- wxPython/src/html.i | 16 +- wxPython/src/misc.i | 4 +- wxPython/src/my_typemaps.i | 1 + wxPython/src/windows.i | 7 +- wxPython/src/wizard.i | 7 +- wxPython/wxPython/calendar.py | 1 + wxPython/wxPython/controls.py | 21 + wxPython/wxPython/core.py | 1 + wxPython/wxPython/gizmos.py | 3 + wxPython/wxPython/glcanvas.py | 1 + wxPython/wxPython/grid.py | 1 + wxPython/wxPython/html.py | 3 + wxPython/wxPython/misc.py | 5 + wxPython/wxPython/stc.py | 1 + wxPython/wxPython/windows.py | 16 + wxPython/wxPython/xrc.py | 7 + 81 files changed, 1850 insertions(+), 547 deletions(-) diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index 8213bd273a..5c2426d295 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -29,11 +29,6 @@ #include "treelistctrl.h" #include "wx/wxPython/pytree.h" - - static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow")); - static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox")); - static const wxString wxPyTreeListCtrlNameStr(wxT("treelistctrl")); - static const wxString wxPyEmptyString(wxT("")); %} //--------------------------------------------------------------------------- @@ -42,6 +37,14 @@ %import controls.i %pythoncode { wx = core } + +MAKE_CONST_WXSTRING2(DynamicSashNameStr, "dynamicSashWindow"); +MAKE_CONST_WXSTRING2(EditableListBoxNameStr, "editableListBox"); +MAKE_CONST_WXSTRING2(TreeListCtrlNameStr, "treelistctrl"); + +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); + + %include _gizmos_rename.i //--------------------------------------------------------------------------- diff --git a/wxPython/contrib/gizmos/gtk/gizmos.py b/wxPython/contrib/gizmos/gtk/gizmos.py index 50f396c9cb..4e081d708d 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos.py +++ b/wxPython/contrib/gizmos/gtk/gizmos.py @@ -27,6 +27,10 @@ class DynamicSashSplitEventPtr(DynamicSashSplitEvent): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = DynamicSashSplitEvent _gizmos.DynamicSashSplitEvent_swigregister(DynamicSashSplitEventPtr) +cvar = _gizmos.cvar +DynamicSashNameStr = cvar.DynamicSashNameStr +EditableListBoxNameStr = cvar.EditableListBoxNameStr +TreeListCtrlNameStr = cvar.TreeListCtrlNameStr class DynamicSashUnifyEvent(core.CommandEvent): def __repr__(self): @@ -52,7 +56,7 @@ class DynamicSashWindow(core.Window): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, - String name=wxPyDynamicSashNameStr) -> DynamicSashWindow + String name=DynamicSashNameStr) -> DynamicSashWindow """ newobj = _gizmos.new_DynamicSashWindow(*args, **kwargs) self.this = newobj.this @@ -64,7 +68,7 @@ class DynamicSashWindow(core.Window): """ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, - String name=wxPyDynamicSashNameStr) -> bool + String name=DynamicSashNameStr) -> bool """ return _gizmos.DynamicSashWindow_Create(*args, **kwargs) @@ -103,7 +107,7 @@ class EditableListBox(windows.Panel): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, - String name=wxPyEditableListBoxNameStr) -> EditableListBox + String name=EditableListBoxNameStr) -> EditableListBox """ newobj = _gizmos.new_EditableListBox(*args, **kwargs) self.this = newobj.this @@ -411,7 +415,7 @@ class TreeListCtrl(core.Control): __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=TR_DEFAULT_STYLE, Validator validator=DefaultValidator, - String name=wxPyTreeListCtrlNameStr) -> TreeListCtrl + String name=TreeListCtrlNameStr) -> TreeListCtrl """ newobj = _gizmos.new_TreeListCtrl(*args, **kwargs) self.this = newobj.this @@ -424,7 +428,7 @@ class TreeListCtrl(core.Control): Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=TR_DEFAULT_STYLE, Validator validator=DefaultValidator, - String name=wxPyTreeListCtrlNameStr) -> bool + String name=TreeListCtrlNameStr) -> bool """ return _gizmos.TreeListCtrl_Create(*args, **kwargs) @@ -461,43 +465,43 @@ class TreeListCtrl(core.Control): return _gizmos.TreeListCtrl_SetLineSpacing(*args, **kwargs) def GetImageList(*args, **kwargs): - """GetImageList() -> wxImageList""" + """GetImageList() -> ImageList""" return _gizmos.TreeListCtrl_GetImageList(*args, **kwargs) def GetStateImageList(*args, **kwargs): - """GetStateImageList() -> wxImageList""" + """GetStateImageList() -> ImageList""" return _gizmos.TreeListCtrl_GetStateImageList(*args, **kwargs) def GetButtonsImageList(*args, **kwargs): - """GetButtonsImageList() -> wxImageList""" + """GetButtonsImageList() -> ImageList""" return _gizmos.TreeListCtrl_GetButtonsImageList(*args, **kwargs) def SetImageList(*args, **kwargs): - """SetImageList(wxImageList imageList)""" + """SetImageList(ImageList imageList)""" return _gizmos.TreeListCtrl_SetImageList(*args, **kwargs) def SetStateImageList(*args, **kwargs): - """SetStateImageList(wxImageList imageList)""" + """SetStateImageList(ImageList imageList)""" return _gizmos.TreeListCtrl_SetStateImageList(*args, **kwargs) def SetButtonsImageList(*args, **kwargs): - """SetButtonsImageList(wxImageList imageList)""" + """SetButtonsImageList(ImageList imageList)""" return _gizmos.TreeListCtrl_SetButtonsImageList(*args, **kwargs) def AssignImageList(*args, **kwargs): - """AssignImageList(wxImageList imageList)""" + """AssignImageList(ImageList imageList)""" val = _gizmos.TreeListCtrl_AssignImageList(*args, **kwargs) args[1].thisown = 0 return val def AssignStateImageList(*args, **kwargs): - """AssignStateImageList(wxImageList imageList)""" + """AssignStateImageList(ImageList imageList)""" val = _gizmos.TreeListCtrl_AssignStateImageList(*args, **kwargs) args[1].thisown = 0 return val def AssignButtonsImageList(*args, **kwargs): - """AssignButtonsImageList(wxImageList imageList)""" + """AssignButtonsImageList(ImageList imageList)""" val = _gizmos.TreeListCtrl_AssignButtonsImageList(*args, **kwargs) args[1].thisown = 0 return val diff --git a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp index 0dbc576861..3302089429 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp @@ -267,12 +267,11 @@ static swig_type_info *swig_types[32]; #include "treelistctrl.h" #include "wx/wxPython/pytree.h" - - static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow")); - static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox")); - static const wxString wxPyTreeListCtrlNameStr(wxT("treelistctrl")); - static const wxString wxPyEmptyString(wxT("")); + static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow")); + static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox")); + static const wxString wxPyTreeListCtrlNameStr(wxT("treelistctrl")); + static const wxString wxPyEmptyString(wxEmptyString); PyObject *wxEditableListBox_GetStrings(wxEditableListBox *self){ wxArrayString strings; self->GetStrings(strings); @@ -471,6 +470,66 @@ PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId c #ifdef __cplusplus extern "C" { #endif +static int _wrap_DynamicSashNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DynamicSashNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DynamicSashNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDynamicSashNameStr)->c_str(), (&wxPyDynamicSashNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDynamicSashNameStr)->c_str(), (&wxPyDynamicSashNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_EditableListBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable EditableListBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_EditableListBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyEditableListBoxNameStr)->c_str(), (&wxPyEditableListBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyEditableListBoxNameStr)->c_str(), (&wxPyEditableListBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_TreeListCtrlNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable TreeListCtrlNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_TreeListCtrlNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyTreeListCtrlNameStr)->c_str(), (&wxPyTreeListCtrlNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyTreeListCtrlNameStr)->c_str(), (&wxPyTreeListCtrlNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_DynamicSashSplitEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxObject *arg1 = (wxObject *) 0 ; @@ -7300,6 +7359,10 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"DynamicSashNameStr",_wrap_DynamicSashNameStr_get, _wrap_DynamicSashNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"EditableListBoxNameStr",_wrap_EditableListBoxNameStr_get, _wrap_EditableListBoxNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"TreeListCtrlNameStr",_wrap_TreeListCtrlNameStr_get, _wrap_TreeListCtrlNameStr_set); wxPyPtrTypeMap_Add("wxTreeCompanionWindow", "wxPyTreeCompanionWindow"); diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index 826f0c071f..2698732dbd 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -19,8 +19,6 @@ #include - static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas")); - static const wxString wxPyEmptyString(wxT("")); %} //--------------------------------------------------------------------------- @@ -28,6 +26,11 @@ %import core.i %pythoncode { wx = core } + +MAKE_CONST_WXSTRING2(GLCanvasNameStr, "GLCanvas"); +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); + + %include _glcanvas_rename.i //--------------------------------------------------------------------------- diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.py b/wxPython/contrib/glcanvas/gtk/glcanvas.py index fbbd08a791..e72e91fd30 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.py +++ b/wxPython/contrib/glcanvas/gtk/glcanvas.py @@ -62,6 +62,8 @@ class GLContextPtr(GLContext): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = GLContext _glcanvas.GLContext_swigregister(GLContextPtr) +cvar = _glcanvas.cvar +GLCanvasNameStr = cvar.GLCanvasNameStr WX_GL_RGBA = _glcanvas.WX_GL_RGBA WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE @@ -85,9 +87,8 @@ class GLCanvas(core.Window): def __init__(self, *args, **kwargs): """ __init__(Window parent, int id=-1, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, String name=wxPyGLCanvasNameStr, - int attribList=None, - wxPalette palette=wxNullPalette) -> GLCanvas + Size size=DefaultSize, long style=0, String name=GLCanvasNameStr, + int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas """ newobj = _glcanvas.new_GLCanvas(*args, **kwargs) self.this = newobj.this @@ -123,7 +124,7 @@ def wxGLCanvasWithContext(*args, **kwargs): """ wxGLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=wxPyGLCanvasNameStr, + long style=0, String name=GLCanvasNameStr, int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas """ val = _glcanvas.new_wxGLCanvasWithContext(*args, **kwargs) diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp index cc0020cd57..3ee151395e 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp @@ -234,12 +234,32 @@ static swig_type_info *swig_types[9]; #include - static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas")); - static const wxString wxPyEmptyString(wxT("")); + static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas")); + static const wxString wxPyEmptyString(wxEmptyString); #ifdef __cplusplus extern "C" { #endif +static int _wrap_GLCanvasNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable GLCanvasNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_GLCanvasNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyGLCanvasNameStr)->c_str(), (&wxPyGLCanvasNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyGLCanvasNameStr)->c_str(), (&wxPyGLCanvasNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_GLContext(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; bool arg1 ; @@ -1214,6 +1234,8 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"GLCanvasNameStr",_wrap_GLCanvasNameStr_get, _wrap_GLCanvasNameStr_set); diff --git a/wxPython/contrib/ogl/gtk/ogl_wrap.cpp b/wxPython/contrib/ogl/gtk/ogl_wrap.cpp index fea4eaade1..e993108279 100644 --- a/wxPython/contrib/ogl/gtk/ogl_wrap.cpp +++ b/wxPython/contrib/ogl/gtk/ogl_wrap.cpp @@ -266,8 +266,7 @@ static swig_type_info *swig_types[41]; #include "oglhelpers.h" - static const wxString wxPyEmptyString(wxT("")); - + static const wxString wxPyEmptyString(wxEmptyString); static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index 2bf13628ec..66c1277797 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -18,16 +18,16 @@ #include "wx/wxPython/pyclasses.h" #include "oglhelpers.h" - - static const wxString wxPyEmptyString(wxT("")); %} //--------------------------------------------------------------------------- %import windows.i - %pythoncode { wx = core } + +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); + %include _ogl_rename.i %include _ogldefs.i diff --git a/wxPython/contrib/stc/stc.i b/wxPython/contrib/stc/stc.i index 09ae2caf85..0aca899c95 100644 --- a/wxPython/contrib/stc/stc.i +++ b/wxPython/contrib/stc/stc.i @@ -18,7 +18,6 @@ #include "wx/wxPython/pyclasses.h" #include - DECLARE_DEF_STRING(STCNameStr); %} //--------------------------------------------------------------------------- @@ -26,6 +25,9 @@ %import core.i %pythoncode { wx = core } +MAKE_CONST_WXSTRING(STCNameStr); + + %include _stc_rename.i diff --git a/wxPython/contrib/stc/stc.py b/wxPython/contrib/stc/stc.py index 3fa573f26b..7aacc49d52 100644 --- a/wxPython/contrib/stc/stc.py +++ b/wxPython/contrib/stc/stc.py @@ -783,7 +783,7 @@ class StyledTextCtrl(core.Control): def __init__(self, *args, **kwargs): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=wxPySTCNameStr) -> StyledTextCtrl + long style=0, String name=STCNameStr) -> StyledTextCtrl """ newobj = _stc.new_StyledTextCtrl(*args, **kwargs) self.this = newobj.this @@ -2162,6 +2162,8 @@ class StyledTextCtrlPtr(StyledTextCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = StyledTextCtrl _stc.StyledTextCtrl_swigregister(StyledTextCtrlPtr) +cvar = _stc.cvar +STCNameStr = cvar.STCNameStr def PreStyledTextCtrl(*args, **kwargs): """PreStyledTextCtrl() -> StyledTextCtrl""" diff --git a/wxPython/contrib/stc/stc_wrap.cpp b/wxPython/contrib/stc/stc_wrap.cpp index 721b61be26..1597f564e8 100644 --- a/wxPython/contrib/stc/stc_wrap.cpp +++ b/wxPython/contrib/stc/stc_wrap.cpp @@ -245,8 +245,8 @@ static swig_type_info *swig_types[21]; #include "wx/wxPython/pyclasses.h" #include - DECLARE_DEF_STRING(STCNameStr); + static const wxString wxPySTCNameStr(wxSTCNameStr); static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -277,6 +277,26 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif +static int _wrap_STCNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable STCNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_STCNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySTCNameStr)->c_str(), (&wxPySTCNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySTCNameStr)->c_str(), (&wxPySTCNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_StyledTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -12712,6 +12732,8 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"STCNameStr",_wrap_STCNameStr_get, _wrap_STCNameStr_set); } diff --git a/wxPython/contrib/xrc/xrc.i b/wxPython/contrib/xrc/xrc.i index 2bab3a9144..37612db90a 100644 --- a/wxPython/contrib/xrc/xrc.i +++ b/wxPython/contrib/xrc/xrc.i @@ -21,14 +21,6 @@ #include #include - static const wxString wxPyEmptyString(wxT("")); - static const wxString wxPyUTF8String(wxT("UTF-8")); - static const wxString wxPyStyleString(wxT("style")); - static const wxString wxPySizeString(wxT("size")); - static const wxString wxPyPosString(wxT("pos")); - static const wxString wxPyBitmapString(wxT("bitmap")); - static const wxString wxPyIconString(wxT("icon")); - static const wxString wxPyFontString(wxT("font")); %} //--------------------------------------------------------------------------- @@ -36,6 +28,17 @@ %import core.i %pythoncode { wx = core } + +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); +MAKE_CONST_WXSTRING2(UTF8String, "UTF-8"); +MAKE_CONST_WXSTRING2(StyleString, "style"); +MAKE_CONST_WXSTRING2(SizeString, "size"); +MAKE_CONST_WXSTRING2(PosString, "pos"); +MAKE_CONST_WXSTRING2(BitmapString, "bitmap"); +MAKE_CONST_WXSTRING2(IconString, "icon"); +MAKE_CONST_WXSTRING2(FontString, "font"); + + %include _xrc_rename.i diff --git a/wxPython/contrib/xrc/xrc.py b/wxPython/contrib/xrc/xrc.py index 99670dae82..90845bdf53 100644 --- a/wxPython/contrib/xrc/xrc.py +++ b/wxPython/contrib/xrc/xrc.py @@ -112,7 +112,7 @@ class XmlResource(core.Object): return _xrc.XmlResource_LoadBitmap(*args, **kwargs) def LoadIcon(*args, **kwargs): - """LoadIcon(String name) -> wxIcon""" + """LoadIcon(String name) -> Icon""" return _xrc.XmlResource_LoadIcon(*args, **kwargs) def AttachUnknownControl(*args, **kwargs): @@ -157,6 +157,14 @@ class XmlResourcePtr(XmlResource): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = XmlResource _xrc.XmlResource_swigregister(XmlResourcePtr) +cvar = _xrc.cvar +UTF8String = cvar.UTF8String +StyleString = cvar.StyleString +SizeString = cvar.SizeString +PosString = cvar.PosString +BitmapString = cvar.BitmapString +IconString = cvar.IconString +FontString = cvar.FontString def EmptyXmlResource(*args, **kwargs): """EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource""" @@ -396,7 +404,7 @@ class XmlDocument(core.Object): def __repr__(self): return "<%s.%s; proxy of C++ wxXmlDocument instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(String filename, String encoding=wxPyUTF8String) -> XmlDocument""" + """__init__(String filename, String encoding=UTF8String) -> XmlDocument""" newobj = _xrc.new_XmlDocument(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -408,11 +416,11 @@ class XmlDocument(core.Object): except: pass def Load(*args, **kwargs): - """Load(String filename, String encoding=wxPyUTF8String) -> bool""" + """Load(String filename, String encoding=UTF8String) -> bool""" return _xrc.XmlDocument_Load(*args, **kwargs) def LoadFromStream(*args, **kwargs): - """LoadFromStream(InputStream stream, String encoding=wxPyUTF8String) -> bool""" + """LoadFromStream(InputStream stream, String encoding=UTF8String) -> bool""" return _xrc.XmlDocument_LoadFromStream(*args, **kwargs) def Save(*args, **kwargs): @@ -460,7 +468,7 @@ class XmlDocumentPtr(XmlDocument): _xrc.XmlDocument_swigregister(XmlDocumentPtr) def XmlDocumentFromStream(*args, **kwargs): - """XmlDocumentFromStream(InputStream stream, String encoding=wxPyUTF8String) -> XmlDocument""" + """XmlDocumentFromStream(InputStream stream, String encoding=UTF8String) -> XmlDocument""" val = _xrc.new_XmlDocumentFromStream(*args, **kwargs) val.thisown = 1 return val @@ -553,7 +561,7 @@ class XmlResourceHandler(core.Object): return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs) def GetStyle(*args, **kwargs): - """GetStyle(String param=wxPyStyleString, int defaults=0) -> int""" + """GetStyle(String param=StyleString, int defaults=0) -> int""" return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs) def GetText(*args, **kwargs): @@ -581,11 +589,11 @@ class XmlResourceHandler(core.Object): return _xrc.XmlResourceHandler_GetColour(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(String param=wxPySizeString) -> Size""" + """GetSize(String param=SizeString) -> Size""" return _xrc.XmlResourceHandler_GetSize(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(String param=wxPyPosString) -> Point""" + """GetPosition(String param=PosString) -> Point""" return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs) def GetDimension(*args, **kwargs): @@ -594,20 +602,20 @@ class XmlResourceHandler(core.Object): def GetBitmap(*args, **kwargs): """ - GetBitmap(String param=wxPyBitmapString, wxArtClient defaultArtClient=wxART_OTHER, + GetBitmap(String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER, Size size=DefaultSize) -> Bitmap """ return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs) def GetIcon(*args, **kwargs): """ - GetIcon(String param=wxPyIconString, wxArtClient defaultArtClient=wxART_OTHER, - Size size=DefaultSize) -> wxIcon + GetIcon(String param=IconString, wxArtClient defaultArtClient=wxART_OTHER, + Size size=DefaultSize) -> Icon """ return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs) def GetFont(*args, **kwargs): - """GetFont(String param=wxPyFontString) -> Font""" + """GetFont(String param=FontString) -> Font""" return _xrc.XmlResourceHandler_GetFont(*args, **kwargs) def SetupWindow(*args, **kwargs): diff --git a/wxPython/contrib/xrc/xrc_wrap.cpp b/wxPython/contrib/xrc/xrc_wrap.cpp index 08776ffa19..89ae9be242 100644 --- a/wxPython/contrib/xrc/xrc_wrap.cpp +++ b/wxPython/contrib/xrc/xrc_wrap.cpp @@ -250,15 +250,15 @@ static swig_type_info *swig_types[23]; #include #include - static const wxString wxPyEmptyString(wxT("")); - static const wxString wxPyUTF8String(wxT("UTF-8")); - static const wxString wxPyStyleString(wxT("style")); - static const wxString wxPySizeString(wxT("size")); - static const wxString wxPyPosString(wxT("pos")); - static const wxString wxPyBitmapString(wxT("bitmap")); - static const wxString wxPyIconString(wxT("icon")); - static const wxString wxPyFontString(wxT("font")); + static const wxString wxPyEmptyString(wxEmptyString); + static const wxString wxPyUTF8String(wxT("UTF-8")); + static const wxString wxPyStyleString(wxT("style")); + static const wxString wxPySizeString(wxT("size")); + static const wxString wxPyPosString(wxT("pos")); + static const wxString wxPyBitmapString(wxT("bitmap")); + static const wxString wxPyIconString(wxT("icon")); + static const wxString wxPyFontString(wxT("font")); bool wxXmlResource_LoadFromString(wxXmlResource *self,wxString const &data){ static int s_memFileIdx = 0; @@ -413,6 +413,146 @@ IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanH #ifdef __cplusplus extern "C" { #endif +static int _wrap_UTF8String_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable UTF8String is read-only."); + return 1; +} + + +static PyObject *_wrap_UTF8String_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyUTF8String)->c_str(), (&wxPyUTF8String)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyUTF8String)->c_str(), (&wxPyUTF8String)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_StyleString_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable StyleString is read-only."); + return 1; +} + + +static PyObject *_wrap_StyleString_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyStyleString)->c_str(), (&wxPyStyleString)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyStyleString)->c_str(), (&wxPyStyleString)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_SizeString_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SizeString is read-only."); + return 1; +} + + +static PyObject *_wrap_SizeString_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySizeString)->c_str(), (&wxPySizeString)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySizeString)->c_str(), (&wxPySizeString)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_PosString_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable PosString is read-only."); + return 1; +} + + +static PyObject *_wrap_PosString_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyPosString)->c_str(), (&wxPyPosString)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyPosString)->c_str(), (&wxPyPosString)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_BitmapString_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable BitmapString is read-only."); + return 1; +} + + +static PyObject *_wrap_BitmapString_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyBitmapString)->c_str(), (&wxPyBitmapString)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyBitmapString)->c_str(), (&wxPyBitmapString)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_IconString_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable IconString is read-only."); + return 1; +} + + +static PyObject *_wrap_IconString_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyIconString)->c_str(), (&wxPyIconString)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyIconString)->c_str(), (&wxPyIconString)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_FontString_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable FontString is read-only."); + return 1; +} + + +static PyObject *_wrap_FontString_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyFontString)->c_str(), (&wxPyFontString)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyFontString)->c_str(), (&wxPyFontString)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_XmlResource(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxString *arg1 = 0 ; @@ -5229,6 +5369,14 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"UTF8String",_wrap_UTF8String_get, _wrap_UTF8String_set); + SWIG_addvarlink(SWIG_globals,(char*)"StyleString",_wrap_StyleString_get, _wrap_StyleString_set); + SWIG_addvarlink(SWIG_globals,(char*)"SizeString",_wrap_SizeString_get, _wrap_SizeString_set); + SWIG_addvarlink(SWIG_globals,(char*)"PosString",_wrap_PosString_get, _wrap_PosString_set); + SWIG_addvarlink(SWIG_globals,(char*)"BitmapString",_wrap_BitmapString_get, _wrap_BitmapString_set); + SWIG_addvarlink(SWIG_globals,(char*)"IconString",_wrap_IconString_get, _wrap_IconString_set); + SWIG_addvarlink(SWIG_globals,(char*)"FontString",_wrap_FontString_get, _wrap_FontString_set); wxXmlInitResourceModule(); diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index d858873bf2..b83e1599c9 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -16,10 +16,7 @@ //--------------------------------------------------------------------------- %newgroup; - -%{ - DECLARE_DEF_STRING(ButtonNameStr); -%} +MAKE_CONST_WXSTRING(ButtonNameStr); enum { wxBU_LEFT, @@ -40,16 +37,15 @@ DocStr(wxButton, RefDoc(wxButton, " Styles - wxBU_LEFT: Left-justifies the label. WIN32 only. - wxBU_TOP: Aligns the label to the top of the button. WIN32 only. - wxBU_RIGHT: Right-justifies the bitmap label. WIN32 only. - wxBU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. - wxBU_EXACTFIT: Creates the button as small as possible instead of making - it of the standard size (which is the default behaviour.) + wx.BU_LEFT: Left-justifies the label. WIN32 only. + wx.BU_TOP: Aligns the label to the top of the button. WIN32 only. + wx.BU_RIGHT: Right-justifies the bitmap label. WIN32 only. + wx.BU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. + wx.BU_EXACTFIT: Creates the button as small as possible instead of making + it of the standard size (which is the default behaviour.) Events - EVT_BUTTON(win,id,func): - Sent when the button is clicked. + EVT_BUTTON: Sent when the button is clicked. "); class wxButton : public wxControl @@ -59,7 +55,8 @@ public: %addtofunc wxButton() "" - DocStr(wxButton, "Create and show a button.") + DocStr(wxButton, "Create and show a button."); + RefDoc(wxButton, ""); wxButton(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, diff --git a/wxPython/src/_checkbox.i b/wxPython/src/_checkbox.i index f6f4e37686..479c210060 100644 --- a/wxPython/src/_checkbox.i +++ b/wxPython/src/_checkbox.i @@ -16,9 +16,7 @@ //--------------------------------------------------------------------------- %newgroup; -%{ - DECLARE_DEF_STRING(CheckBoxNameStr); -%} +MAKE_CONST_WXSTRING(CheckBoxNameStr); enum { diff --git a/wxPython/src/_choice.i b/wxPython/src/_choice.i index 1f068a5085..366cc4e308 100644 --- a/wxPython/src/_choice.i +++ b/wxPython/src/_choice.i @@ -15,9 +15,8 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(ChoiceNameStr); -%} +MAKE_CONST_WXSTRING(ChoiceNameStr); + //--------------------------------------------------------------------------- %newgroup; diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index a4d736f1f6..e6ae880860 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -16,16 +16,12 @@ //--------------------------------------------------------------------------- %newgroup -%{ - - DECLARE_DEF_STRING(FileSelectorPromptStr); - DECLARE_DEF_STRING(DirSelectorPromptStr); - DECLARE_DEF_STRING(DirDialogNameStr); - DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr); - DECLARE_DEF_STRING(GetTextFromUserPromptStr); - DECLARE_DEF_STRING(MessageBoxCaptionStr); - -%} +MAKE_CONST_WXSTRING(FileSelectorPromptStr); +MAKE_CONST_WXSTRING(DirSelectorPromptStr); +MAKE_CONST_WXSTRING(DirDialogNameStr); +MAKE_CONST_WXSTRING(FileSelectorDefaultWildcardStr); +MAKE_CONST_WXSTRING(GetTextFromUserPromptStr); +MAKE_CONST_WXSTRING(MessageBoxCaptionStr); //--------------------------------------------------------------------------- diff --git a/wxPython/src/_combobox.i b/wxPython/src/_combobox.i index 1cc6d1c0d9..a9da630a68 100644 --- a/wxPython/src/_combobox.i +++ b/wxPython/src/_combobox.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(ComboBoxNameStr); -%} +MAKE_CONST_WXSTRING(ComboBoxNameStr); //--------------------------------------------------------------------------- %newgroup; diff --git a/wxPython/src/_control.i b/wxPython/src/_control.i index 8019be7641..1035fbb4f7 100644 --- a/wxPython/src/_control.i +++ b/wxPython/src/_control.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(ControlNameStr); -%} +MAKE_CONST_WXSTRING(ControlNameStr); //--------------------------------------------------------------------------- %newgroup; diff --git a/wxPython/src/_datetime.i b/wxPython/src/_datetime.i index 6a2dfbd742..13b2b50eac 100644 --- a/wxPython/src/_datetime.i +++ b/wxPython/src/_datetime.i @@ -19,10 +19,9 @@ %{ #include - DECLARE_DEF_STRING2(DateFormatStr, wxT("%c")); - DECLARE_DEF_STRING2(TimeSpanFormatStr, wxT("%H:%M:%S")); - -%} +%} +MAKE_CONST_WXSTRING2(DateFormatStr, wxT("%c")); +MAKE_CONST_WXSTRING2(TimeSpanFormatStr, wxT("%H:%M:%S")); //--------------------------------------------------------------------------- diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 66bd527637..cb02767991 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -64,6 +64,16 @@ typedef unsigned char byte; %mutable; %enddef +%define MAKE_CONST_WXSTRING2(strname, val) + %{ static const wxString wxPy##strname(wxT(val)); %} + %immutable; + %name(strname) const wxString wxPy##strname; + %mutable; +%enddef + +%define MAKE_CONST_WXSTRING_NOSWIG(strname) + %{ static const wxString wxPy##strname(wx##strname); %} +%enddef // Generate code in the module init for the event types, since they may not be // initialized yet when they are used in the static swig_const_table. @@ -75,10 +85,15 @@ typedef unsigned char byte; // Macros for the docstring and autodoc features of SWIG. // Set the docsring for the given full or partial declaration -#define DocStr(decl, docstr) %feature("docstring") decl docstr +%define DocStr(decl, docstr) + %feature("docstring") decl docstr; + //%feature("refdoc") decl ""; +%enddef // Set the autodoc string for a full or partial declaration -#define DocA(decl, astr) %feature("autodoc") decl astr +%define DocA(decl, astr) + %feature("autodoc") decl astr; +%enddef // Set both the autodoc and docstring for a full or partial declaration %define DocAStr(decl, astr, docstr) @@ -186,6 +201,7 @@ typedef unsigned char byte; // A placeholder for the detailed reference docs. %define RefDoc(decl, docstr) + %feature("refdoc") decl docstr; %enddef @@ -209,18 +225,24 @@ typedef unsigned char byte; %enddef #endif -FORWARD_DECLARE(wxString, String); -FORWARD_DECLARE(wxBitmap, Bitmap); -FORWARD_DECLARE(wxDateTime, DateTime); -FORWARD_DECLARE(wxInputStream, InputStream); -FORWARD_DECLARE(wxDC, DC); -FORWARD_DECLARE(wxCursor, Cursor); -FORWARD_DECLARE(wxRegion, Region); -FORWARD_DECLARE(wxColour, Colour); -FORWARD_DECLARE(wxFont, Font); -FORWARD_DECLARE(wxCaret, Caret); -FORWARD_DECLARE(wxToolTip, ToolTip); -FORWARD_DECLARE(wxPyDropTarget, PyDropTarget); +FORWARD_DECLARE(wxString, String); +FORWARD_DECLARE(wxBitmap, Bitmap); +FORWARD_DECLARE(wxDateTime, DateTime); +FORWARD_DECLARE(wxInputStream, InputStream); +FORWARD_DECLARE(wxDC, DC); +FORWARD_DECLARE(wxCursor, Cursor); +FORWARD_DECLARE(wxRegion, Region); +FORWARD_DECLARE(wxColour, Colour); +FORWARD_DECLARE(wxFont, Font); +FORWARD_DECLARE(wxCaret, Caret); +FORWARD_DECLARE(wxToolTip, ToolTip); +FORWARD_DECLARE(wxPyDropTarget, PyDropTarget); +FORWARD_DECLARE(wxImageList, ImageList); +FORWARD_DECLARE(wxMemoryDC, MemoryDC); +FORWARD_DECLARE(wxHtmlTagHandler, HtmlTagHandler); +FORWARD_DECLARE(wxConfigBase, ConfigBase); +FORWARD_DECLARE(wxIcon, Icon); + //--------------------------------------------------------------------------- diff --git a/wxPython/src/_dirctrl.i b/wxPython/src/_dirctrl.i index 98549692b9..8d207caf65 100644 --- a/wxPython/src/_dirctrl.i +++ b/wxPython/src/_dirctrl.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(DirDialogDefaultFolderStr); -%} +MAKE_CONST_WXSTRING(DirDialogDefaultFolderStr); //--------------------------------------------------------------------------- %newgroup @@ -69,7 +67,7 @@ public: long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxPyEmptyString, int defaultFilter = 0, - const wxString& name = wxPy_TreeCtrlNameStr); + const wxString& name = wxPyTreeCtrlNameStr); %name(PreGenericDirCtrl)wxGenericDirCtrl(); @@ -80,7 +78,7 @@ public: long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxPyEmptyString, int defaultFilter = 0, - const wxString& name = wxPy_TreeCtrlNameStr); + const wxString& name = wxPyTreeCtrlNameStr); @@ -110,7 +108,7 @@ public: virtual wxTreeItemId GetRootId(); - virtual wxTreeCtrl* GetTreeCtrl() const; + virtual wxPyTreeCtrl* GetTreeCtrl() const; virtual wxDirFilterListCtrl* GetFilterListCtrl() const; diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index f59a2332ce..877fab6d12 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -1032,7 +1032,6 @@ public: static wxUpdateUIMode GetMode(); }; - //--------------------------------------------------------------------------- %newgroup; diff --git a/wxPython/src/_functions.i b/wxPython/src/_functions.i index 241ad3d5fd..8abf2a31c8 100644 --- a/wxPython/src/_functions.i +++ b/wxPython/src/_functions.i @@ -15,11 +15,9 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(FileSelectorPromptStr); - DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr); - DECLARE_DEF_STRING(DirSelectorPromptStr); -%} +MAKE_CONST_WXSTRING(FileSelectorPromptStr); +MAKE_CONST_WXSTRING(FileSelectorDefaultWildcardStr); +MAKE_CONST_WXSTRING(DirSelectorPromptStr); //--------------------------------------------------------------------------- %newgroup; diff --git a/wxPython/src/_gauge.i b/wxPython/src/_gauge.i index 941054bf49..9171ca3dcf 100644 --- a/wxPython/src/_gauge.i +++ b/wxPython/src/_gauge.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(GaugeNameStr); -%} +MAKE_CONST_WXSTRING(GaugeNameStr); %newgroup diff --git a/wxPython/src/_listbox.i b/wxPython/src/_listbox.i index c045df428b..5b126a5799 100644 --- a/wxPython/src/_listbox.i +++ b/wxPython/src/_listbox.i @@ -18,9 +18,11 @@ %{ #include - DECLARE_DEF_STRING(ListBoxNameStr); %} +MAKE_CONST_WXSTRING(ListBoxNameStr); + + //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 8c2cdf26da..156c2f658d 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -18,9 +18,8 @@ %{ #include - const wxChar* wxListCtrlNameStr = _T("wxListCtrl"); - DECLARE_DEF_STRING(ListCtrlNameStr); %} +MAKE_CONST_WXSTRING2(ListCtrlNameStr, _T("wxListCtrl")); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index 305a3103a4..63b40a0565 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(NOTEBOOK_NAME); -%} +MAKE_CONST_WXSTRING(NOTEBOOK_NAME); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_printfw.i b/wxPython/src/_printfw.i index 81365330a0..55ddfca1b1 100644 --- a/wxPython/src/_printfw.i +++ b/wxPython/src/_printfw.i @@ -19,13 +19,11 @@ %{ #include "wx/wxPython/printfw.h" - static const wxChar* wxPrintoutTitleStr = wxT("Printout"); - DECLARE_DEF_STRING(PrintoutTitleStr); - static const wxChar* wxPreviewCanvasNameStr = wxT("previewcanvas"); - DECLARE_DEF_STRING(PreviewCanvasNameStr); - %} +MAKE_CONST_WXSTRING2(PrintoutTitleStr, wxT("Printout")); +MAKE_CONST_WXSTRING2(PreviewCanvasNameStr, wxT("previewcanvas")); + //--------------------------------------------------------------------------- @@ -56,7 +54,7 @@ public: wxPaperSize GetPaperId(); const wxSize& GetPaperSize(); - wxPrintQuality GetQuality(); + int GetQuality(); void SetNoCopies(int v); void SetCollate(bool flag); @@ -67,7 +65,7 @@ public: void SetDuplex(wxDuplexMode duplex); void SetPaperId(wxPaperSize sizeId); void SetPaperSize(const wxSize& sz); - void SetQuality(wxPrintQuality quality); + void SetQuality(int quality); // PostScript-specific data const wxString& GetPrinterCommand(); diff --git a/wxPython/src/_radio.i b/wxPython/src/_radio.i index 323f7ae965..aaced88af9 100644 --- a/wxPython/src/_radio.i +++ b/wxPython/src/_radio.i @@ -15,10 +15,8 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(RadioBoxNameStr); - DECLARE_DEF_STRING(RadioButtonNameStr); -%} +MAKE_CONST_WXSTRING(RadioBoxNameStr); +MAKE_CONST_WXSTRING(RadioButtonNameStr); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_sashwin.i b/wxPython/src/_sashwin.i index c2de865ace..da6752c285 100644 --- a/wxPython/src/_sashwin.i +++ b/wxPython/src/_sashwin.i @@ -15,12 +15,8 @@ //--------------------------------------------------------------------------- -%{ - static const wxChar* wxSashNameStr = wxT("sashWindow"); - DECLARE_DEF_STRING(SashNameStr); - static const wxChar* wxSashLayoutNameStr = wxT("layoutWindow"); - DECLARE_DEF_STRING(SashLayoutNameStr); -%} +MAKE_CONST_WXSTRING2(SashNameStr, wxT("sashWindow")); +MAKE_CONST_WXSTRING2(SashLayoutNameStr, wxT("layoutWindow")); //--------------------------------------------------------------------------- %newgroup; diff --git a/wxPython/src/_scrolbar.i b/wxPython/src/_scrolbar.i index 196a8241ef..5a32c1503f 100644 --- a/wxPython/src/_scrolbar.i +++ b/wxPython/src/_scrolbar.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(ScrollBarNameStr); -%} +MAKE_CONST_WXSTRING(ScrollBarNameStr); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_slider.i b/wxPython/src/_slider.i index f1eb5a9d4c..21bae7b0ed 100644 --- a/wxPython/src/_slider.i +++ b/wxPython/src/_slider.i @@ -18,9 +18,10 @@ %{ #include - DECLARE_DEF_STRING(SliderNameStr); %} +MAKE_CONST_WXSTRING(SliderNameStr); + //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_spin.i b/wxPython/src/_spin.i index 8802d40d7d..c092ec8303 100644 --- a/wxPython/src/_spin.i +++ b/wxPython/src/_spin.i @@ -15,11 +15,8 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(SPIN_BUTTON_NAME); - wxChar* wxSpinCtrlNameStr = _T("wxSpinCtrl"); - DECLARE_DEF_STRING(SpinCtrlNameStr); -%} +MAKE_CONST_WXSTRING(SPIN_BUTTON_NAME); +MAKE_CONST_WXSTRING2(SpinCtrlNameStr, _T("wxSpinCtrl")); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_splitter.i b/wxPython/src/_splitter.i index db9bd69f56..0c3a7fb6de 100644 --- a/wxPython/src/_splitter.i +++ b/wxPython/src/_splitter.i @@ -15,11 +15,7 @@ //--------------------------------------------------------------------------- -%{ - static const wxChar* wxSplitterNameStr = wxT("splitter"); - DECLARE_DEF_STRING(SplitterNameStr); -%} - +MAKE_CONST_WXSTRING2(SplitterNameStr, wxT("splitter")); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_statctrls.i b/wxPython/src/_statctrls.i index 6560372c75..097e0f314d 100644 --- a/wxPython/src/_statctrls.i +++ b/wxPython/src/_statctrls.i @@ -16,11 +16,9 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(StaticBitmapNameStr); - DECLARE_DEF_STRING(StaticBoxNameStr); - DECLARE_DEF_STRING(StaticTextNameStr); -%} +MAKE_CONST_WXSTRING(StaticBitmapNameStr); +MAKE_CONST_WXSTRING(StaticBoxNameStr); +MAKE_CONST_WXSTRING(StaticTextNameStr); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_textctrl.i b/wxPython/src/_textctrl.i index b83c30dacf..3a36c5e3e5 100644 --- a/wxPython/src/_textctrl.i +++ b/wxPython/src/_textctrl.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(TextCtrlNameStr); -%} +MAKE_CONST_WXSTRING(TextCtrlNameStr); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_tglbtn.i b/wxPython/src/_tglbtn.i index b0eec03e23..1d736f9c38 100644 --- a/wxPython/src/_tglbtn.i +++ b/wxPython/src/_tglbtn.i @@ -15,10 +15,7 @@ //--------------------------------------------------------------------------- -%{ - wxChar* wxToggleButtonNameStr = _T("wxToggleButton"); - DECLARE_DEF_STRING(ToggleButtonNameStr); -%} +MAKE_CONST_WXSTRING2(ToggleButtonNameStr, _T("wxToggleButton")); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index e8ee8dad48..f377951263 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -15,9 +15,8 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(ToolBarNameStr); -%} +MAKE_CONST_WXSTRING_NOSWIG(ToolBarNameStr); + //--------------------------------------------------------------------------- %newgroup; @@ -60,13 +59,13 @@ class wxToolBarToolBase : public wxObject { public: // wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)NULL, // int id = wxID_SEPARATOR, -// const wxString& label = wxEmptyString, +// const wxString& label = wxPyEmptyString, // const wxBitmap& bmpNormal = wxNullBitmap, // const wxBitmap& bmpDisabled = wxNullBitmap, // wxItemKind kind = wxITEM_NORMAL, // wxObject *clientData = (wxObject *) NULL, -// const wxString& shortHelpString = wxEmptyString, -// const wxString& longHelpString = wxEmptyString) +// const wxString& shortHelpString = wxPyEmptyString, +// const wxString& longHelpString = wxPyEmptyString) // ~wxToolBarToolBase(); int GetId(); diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 5ca8ae9b09..5f782c7a0f 100644 --- a/wxPython/src/_toplvl.i +++ b/wxPython/src/_toplvl.i @@ -15,13 +15,10 @@ //--------------------------------------------------------------------------- -%{ - // Put some wx default wxChar* values into wxStrings. - DECLARE_DEF_STRING(FrameNameStr); - DECLARE_DEF_STRING(DialogNameStr); - DECLARE_DEF_STRING(StatusLineNameStr); - DECLARE_DEF_STRING(ToolBarNameStr); -%} +MAKE_CONST_WXSTRING(FrameNameStr); +MAKE_CONST_WXSTRING(DialogNameStr); +MAKE_CONST_WXSTRING(StatusLineNameStr); +MAKE_CONST_WXSTRING(ToolBarNameStr); //--------------------------------------------------------------------------- %newgroup diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index e5bece1eee..1fac4850c1 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -18,10 +18,9 @@ %{ #include #include "wx/wxPython/pytree.h" - - const wxChar* wx_TreeCtrlNameStr = _T("wxTreeCtrl"); - DECLARE_DEF_STRING(_TreeCtrlNameStr); %} + +MAKE_CONST_WXSTRING2(TreeCtrlNameStr, _T("wxTreeCtrl")); //--------------------------------------------------------------------------- %newgroup @@ -328,7 +327,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxPy_TreeCtrlNameStr); + const wxString& name = wxPyTreeCtrlNameStr); %name(PreTreeCtrl)wxPyTreeCtrl(); bool Create(wxWindow *parent, wxWindowID id = -1, @@ -336,7 +335,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxPy_TreeCtrlNameStr); + const wxString& name = wxPyTreeCtrlNameStr); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index ac2dcd8b5f..19a1a26d11 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -201,9 +201,10 @@ public: %{ #include -DECLARE_DEF_STRING(VListBoxNameStr); %} +MAKE_CONST_WXSTRING(VListBoxNameStr); + // First, the C++ version %{ diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i index a1cc4173d3..d513513e44 100644 --- a/wxPython/src/calendar.i +++ b/wxPython/src/calendar.i @@ -136,9 +136,7 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(CalendarNameStr); -%} +MAKE_CONST_WXSTRING(CalendarNameStr); diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index ce2dfcc5eb..502b4346fc 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -17,22 +17,22 @@ %{ #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - - DECLARE_DEF_STRING(PanelNameStr); - DECLARE_DEF_STRING(EmptyString); - DECLARE_DEF_STRING(ControlNameStr); - %} - + //--------------------------------------------------------------------------- %import core.i %pythoncode { wx = core } +%include _controls_rename.i + +MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); +MAKE_CONST_WXSTRING_NOSWIG(ControlNameStr); + // Include all the files that make up this module -%include _controls_rename.i //%include _control.i <-- It's in core so other modules don't have to %import controls.i %include _button.i diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index c622181a4f..117e370581 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -18,7 +18,6 @@ #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - DECLARE_DEF_STRING(EmptyString); %} //--------------------------------------------------------------------------- @@ -26,13 +25,14 @@ %import core.i %pythoncode { wx = core } +%include _gdi_rename.i -// Include all the files that make up this module -%include _gdi_rename.i +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); -// GDI +// Include all the files that make up this module + %include _gdiobj.i %include _colour.i %include _palette.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index a689b9af83..0c47eff96c 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -20,9 +20,6 @@ #include #include - DECLARE_DEF_STRING(PanelNameStr); - DECLARE_DEF_STRING2(DateTimeFormatStr, wxT("%c")); - static const wxString wxPyEmptyString(wxT("")); %} @@ -31,8 +28,14 @@ %import windows.i %pythoncode { wx = core } + %include _grid_rename.i +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); +MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); +MAKE_CONST_WXSTRING2(DateTimeFormatStr, wxT("%c")); + + //--------------------------------------------------------------------------- // OOR related typemaps and helper functions diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py index f9b30828d7..46eef2f4d6 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/calendar.py @@ -171,7 +171,7 @@ class CalendarCtrl(core.Control): __init__(Window parent, int id, DateTime date=wxDefaultDateTime, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS, - String name=wxPyCalendarNameStr) -> CalendarCtrl + String name=CalendarNameStr) -> CalendarCtrl """ newobj = _calendar.new_CalendarCtrl(*args, **kwargs) self.this = newobj.this @@ -184,7 +184,7 @@ class CalendarCtrl(core.Control): Create(Window parent, int id, DateTime date=wxDefaultDateTime, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS, - String name=wxPyCalendarNameStr) -> bool + String name=CalendarNameStr) -> bool """ return _calendar.CalendarCtrl_Create(*args, **kwargs) @@ -307,6 +307,8 @@ class CalendarCtrlPtr(CalendarCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = CalendarCtrl _calendar.CalendarCtrl_swigregister(CalendarCtrlPtr) +cvar = _calendar.cvar +CalendarNameStr = cvar.CalendarNameStr def PreCalendarCtrl(*args, **kwargs): """PreCalendarCtrl() -> CalendarCtrl""" diff --git a/wxPython/src/gtk/calendar_wrap.cpp b/wxPython/src/gtk/calendar_wrap.cpp index 75063351dc..fecb539043 100644 --- a/wxPython/src/gtk/calendar_wrap.cpp +++ b/wxPython/src/gtk/calendar_wrap.cpp @@ -240,9 +240,7 @@ static swig_type_info *swig_types[15]; #include - - DECLARE_DEF_STRING(CalendarNameStr); - + static const wxString wxPyCalendarNameStr(wxCalendarNameStr); #ifdef __cplusplus extern "C" { #endif @@ -953,6 +951,26 @@ static PyObject * CalendarEvent_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_CalendarNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable CalendarNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_CalendarNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyCalendarNameStr)->c_str(), (&wxPyCalendarNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyCalendarNameStr)->c_str(), (&wxPyCalendarNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_CalendarCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -2618,6 +2636,8 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_CALENDAR_MONTH_CHANGED", PyInt_FromLong(wxEVT_CALENDAR_MONTH_CHANGED)); PyDict_SetItemString(d, "wxEVT_CALENDAR_YEAR_CHANGED", PyInt_FromLong(wxEVT_CALENDAR_YEAR_CHANGED)); PyDict_SetItemString(d, "wxEVT_CALENDAR_WEEKDAY_CLICKED", PyInt_FromLong(wxEVT_CALENDAR_WEEKDAY_CLICKED)); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"CalendarNameStr",_wrap_CalendarNameStr_get, _wrap_CalendarNameStr_set); } diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index 22b6c09959..738abe9073 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -25,7 +25,7 @@ class Button(core.Control): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyButtonNameStr) -> Button + Validator validator=DefaultValidator, String name=ButtonNameStr) -> Button Create and show a button. """ @@ -39,7 +39,7 @@ class Button(core.Control): """ Create(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyButtonNameStr) -> bool + Validator validator=DefaultValidator, String name=ButtonNameStr) -> bool Acutally create the GUI Button for 2-phase creation. """ @@ -65,6 +65,8 @@ class ButtonPtr(Button): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Button _controls.Button_swigregister(ButtonPtr) +cvar = _controls.cvar +ButtonNameStr = cvar.ButtonNameStr def PreButton(*args, **kwargs): """ @@ -89,7 +91,7 @@ class BitmapButton(Button): __init__(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, Size size=DefaultSize, long style=BU_AUTODRAW, Validator validator=DefaultValidator, - String name=wxPyButtonNameStr) -> BitmapButton + String name=ButtonNameStr) -> BitmapButton Create and show a button. """ @@ -104,7 +106,7 @@ class BitmapButton(Button): Create(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, Size size=DefaultSize, long style=BU_AUTODRAW, Validator validator=DefaultValidator, - String name=wxPyButtonNameStr) -> bool + String name=ButtonNameStr) -> bool Acutally create the GUI BitmapButton for 2-phase creation. """ @@ -220,7 +222,7 @@ class CheckBox(core.Control): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyCheckBoxNameStr) -> CheckBox + Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox """ newobj = _controls.new_CheckBox(*args, **kwargs) self.this = newobj.this @@ -232,7 +234,7 @@ class CheckBox(core.Control): """ Create(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyCheckBoxNameStr) -> bool + Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool """ return _controls.CheckBox_Create(*args, **kwargs) @@ -271,6 +273,7 @@ class CheckBoxPtr(CheckBox): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = CheckBox _controls.CheckBox_swigregister(CheckBoxPtr) +CheckBoxNameStr = cvar.CheckBoxNameStr def PreCheckBox(*args, **kwargs): """PreCheckBox() -> CheckBox""" @@ -288,7 +291,7 @@ class Choice(core.ControlWithItems): __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyChoiceNameStr) -> Choice + String name=ChoiceNameStr) -> Choice """ newobj = _controls.new_Choice(*args, **kwargs) self.this = newobj.this @@ -301,7 +304,7 @@ class Choice(core.ControlWithItems): Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyChoiceNameStr) -> bool + String name=ChoiceNameStr) -> bool """ return _controls.Choice_Create(*args, **kwargs) @@ -332,6 +335,7 @@ class ChoicePtr(Choice): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Choice _controls.Choice_swigregister(ChoicePtr) +ChoiceNameStr = cvar.ChoiceNameStr def PreChoice(*args, **kwargs): """PreChoice() -> Choice""" @@ -350,7 +354,7 @@ class ComboBox(core.Control,core.ItemContainer): Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyComboBoxNameStr) -> ComboBox + String name=ComboBoxNameStr) -> ComboBox """ newobj = _controls.new_ComboBox(*args, **kwargs) self.this = newobj.this @@ -364,7 +368,7 @@ class ComboBox(core.Control,core.ItemContainer): Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyComboBoxNameStr) -> bool + String name=ComboBoxNameStr) -> bool """ return _controls.ComboBox_Create(*args, **kwargs) @@ -431,6 +435,7 @@ class ComboBoxPtr(ComboBox): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ComboBox _controls.ComboBox_swigregister(ComboBoxPtr) +ComboBoxNameStr = cvar.ComboBoxNameStr def PreComboBox(*args, **kwargs): """PreComboBox() -> ComboBox""" @@ -452,7 +457,7 @@ class Gauge(core.Control): __init__(Window parent, int id, int range, Point pos=DefaultPosition, Size size=DefaultSize, long style=GA_HORIZONTAL, Validator validator=DefaultValidator, - String name=wxPyGaugeNameStr) -> Gauge + String name=GaugeNameStr) -> Gauge """ newobj = _controls.new_Gauge(*args, **kwargs) self.this = newobj.this @@ -465,7 +470,7 @@ class Gauge(core.Control): Create(Window parent, int id, int range, Point pos=DefaultPosition, Size size=DefaultSize, long style=GA_HORIZONTAL, Validator validator=DefaultValidator, - String name=wxPyGaugeNameStr) -> bool + String name=GaugeNameStr) -> bool """ return _controls.Gauge_Create(*args, **kwargs) @@ -512,6 +517,7 @@ class GaugePtr(Gauge): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Gauge _controls.Gauge_swigregister(GaugePtr) +GaugeNameStr = cvar.GaugeNameStr def PreGauge(*args, **kwargs): """PreGauge() -> Gauge""" @@ -528,7 +534,7 @@ class StaticBox(core.Control): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyStaticBoxNameStr) -> StaticBox + String name=StaticBoxNameStr) -> StaticBox """ newobj = _controls.new_StaticBox(*args, **kwargs) self.this = newobj.this @@ -540,7 +546,7 @@ class StaticBox(core.Control): """ Create(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyStaticBoxNameStr) -> bool + String name=StaticBoxNameStr) -> bool """ return _controls.StaticBox_Create(*args, **kwargs) @@ -551,6 +557,9 @@ class StaticBoxPtr(StaticBox): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = StaticBox _controls.StaticBox_swigregister(StaticBoxPtr) +StaticBitmapNameStr = cvar.StaticBitmapNameStr +StaticBoxNameStr = cvar.StaticBoxNameStr +StaticTextNameStr = cvar.StaticTextNameStr def PreStaticBox(*args, **kwargs): """PreStaticBox() -> StaticBox""" @@ -567,7 +576,7 @@ class StaticLine(core.Control): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=LI_HORIZONTAL, - String name=wxPyStaticTextNameStr) -> StaticLine + String name=StaticTextNameStr) -> StaticLine """ newobj = _controls.new_StaticLine(*args, **kwargs) self.this = newobj.this @@ -579,7 +588,7 @@ class StaticLine(core.Control): """ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=LI_HORIZONTAL, - String name=wxPyStaticTextNameStr) -> bool + String name=StaticTextNameStr) -> bool """ return _controls.StaticLine_Create(*args, **kwargs) @@ -619,7 +628,7 @@ class StaticText(core.Control): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyStaticTextNameStr) -> StaticText + String name=StaticTextNameStr) -> StaticText """ newobj = _controls.new_StaticText(*args, **kwargs) self.this = newobj.this @@ -631,7 +640,7 @@ class StaticText(core.Control): """ Create(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyStaticTextNameStr) -> bool + String name=StaticTextNameStr) -> bool """ return _controls.StaticText_Create(*args, **kwargs) @@ -658,7 +667,7 @@ class StaticBitmap(core.Control): """ __init__(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyStaticBitmapNameStr) -> StaticBitmap + String name=StaticBitmapNameStr) -> StaticBitmap """ newobj = _controls.new_StaticBitmap(*args, **kwargs) self.this = newobj.this @@ -668,7 +677,7 @@ class StaticBitmap(core.Control): """ Create(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyStaticBitmapNameStr) -> bool + String name=StaticBitmapNameStr) -> bool """ return _controls.StaticBitmap_Create(*args, **kwargs) @@ -681,7 +690,7 @@ class StaticBitmap(core.Control): return _controls.StaticBitmap_SetBitmap(*args, **kwargs) def SetIcon(*args, **kwargs): - """SetIcon(wxIcon icon)""" + """SetIcon(Icon icon)""" return _controls.StaticBitmap_SetIcon(*args, **kwargs) @@ -708,7 +717,7 @@ class ListBox(core.ControlWithItems): __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyListBoxNameStr) -> ListBox + String name=ListBoxNameStr) -> ListBox """ newobj = _controls.new_ListBox(*args, **kwargs) self.this = newobj.this @@ -721,7 +730,7 @@ class ListBox(core.ControlWithItems): Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyListBoxNameStr) -> bool + String name=ListBoxNameStr) -> bool """ return _controls.ListBox_Create(*args, **kwargs) @@ -792,6 +801,7 @@ class ListBoxPtr(ListBox): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ListBox _controls.ListBox_swigregister(ListBoxPtr) +ListBoxNameStr = cvar.ListBoxNameStr def PreListBox(*args, **kwargs): """PreListBox() -> ListBox""" @@ -809,7 +819,7 @@ class CheckListBox(ListBox): __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyListBoxNameStr) -> CheckListBox + String name=ListBoxNameStr) -> CheckListBox """ newobj = _controls.new_CheckListBox(*args, **kwargs) self.this = newobj.this @@ -820,7 +830,7 @@ class CheckListBox(ListBox): Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, int choices=0, String choices_array=None, long style=0, Validator validator=DefaultValidator, - String name=wxPyListBoxNameStr) -> bool + String name=ListBoxNameStr) -> bool """ return _controls.CheckListBox_Create(*args, **kwargs) @@ -1025,6 +1035,7 @@ class TextAttrPtr(TextAttr): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = TextAttr _controls.TextAttr_swigregister(TextAttrPtr) +TextCtrlNameStr = cvar.TextCtrlNameStr def TextAttr_Combine(*args, **kwargs): """TextAttr_Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" @@ -1038,7 +1049,7 @@ class TextCtrl(core.Control): __init__(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, - String name=wxPyTextCtrlNameStr) -> TextCtrl + String name=TextCtrlNameStr) -> TextCtrl """ newobj = _controls.new_TextCtrl(*args, **kwargs) self.this = newobj.this @@ -1051,7 +1062,7 @@ class TextCtrl(core.Control): Create(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, - String name=wxPyTextCtrlNameStr) -> bool + String name=TextCtrlNameStr) -> bool """ return _controls.TextCtrl_Create(*args, **kwargs) @@ -1316,7 +1327,7 @@ class ScrollBar(core.Control): """ __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=SB_HORIZONTAL, - Validator validator=DefaultValidator, String name=wxPyScrollBarNameStr) -> ScrollBar + Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> ScrollBar """ newobj = _controls.new_ScrollBar(*args, **kwargs) self.this = newobj.this @@ -1328,7 +1339,7 @@ class ScrollBar(core.Control): """ Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=SB_HORIZONTAL, - Validator validator=DefaultValidator, String name=wxPyScrollBarNameStr) -> bool + Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> bool """ return _controls.ScrollBar_Create(*args, **kwargs) @@ -1371,6 +1382,7 @@ class ScrollBarPtr(ScrollBar): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ScrollBar _controls.ScrollBar_swigregister(ScrollBarPtr) +ScrollBarNameStr = cvar.ScrollBarNameStr def PreScrollBar(*args, **kwargs): """PreScrollBar() -> ScrollBar""" @@ -1391,7 +1403,7 @@ class SpinButton(core.Control): """ __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=SP_HORIZONTAL, - String name=wxPySPIN_BUTTON_NAME) -> SpinButton + String name=SPIN_BUTTON_NAME) -> SpinButton """ newobj = _controls.new_SpinButton(*args, **kwargs) self.this = newobj.this @@ -1403,7 +1415,7 @@ class SpinButton(core.Control): """ Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=SP_HORIZONTAL, - String name=wxPySPIN_BUTTON_NAME) -> bool + String name=SPIN_BUTTON_NAME) -> bool """ return _controls.SpinButton_Create(*args, **kwargs) @@ -1446,6 +1458,8 @@ class SpinButtonPtr(SpinButton): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = SpinButton _controls.SpinButton_swigregister(SpinButtonPtr) +SPIN_BUTTON_NAME = cvar.SPIN_BUTTON_NAME +SpinCtrlNameStr = cvar.SpinCtrlNameStr def PreSpinButton(*args, **kwargs): """PreSpinButton() -> SpinButton""" @@ -1461,7 +1475,7 @@ class SpinCtrl(core.Control): __init__(Window parent, int id=-1, String value=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=SP_ARROW_KEYS, int min=0, int max=100, - int initial=0, String name=wxPySpinCtrlNameStr) -> SpinCtrl + int initial=0, String name=SpinCtrlNameStr) -> SpinCtrl """ newobj = _controls.new_SpinCtrl(*args, **kwargs) self.this = newobj.this @@ -1474,7 +1488,7 @@ class SpinCtrl(core.Control): Create(Window parent, int id=-1, String value=EmptyString, Point pos=DefaultPosition, Size size=DefaultSize, long style=SP_ARROW_KEYS, int min=0, int max=100, - int initial=0, String name=wxPySpinCtrlNameStr) -> bool + int initial=0, String name=SpinCtrlNameStr) -> bool """ return _controls.SpinCtrl_Create(*args, **kwargs) @@ -1534,7 +1548,7 @@ class RadioBox(core.Control): Size size=DefaultSize, int choices=0, String choices_array=None, int majorDimension=0, long style=RA_HORIZONTAL, Validator validator=DefaultValidator, - String name=wxPyRadioBoxNameStr) -> RadioBox + String name=RadioBoxNameStr) -> RadioBox """ newobj = _controls.new_RadioBox(*args, **kwargs) self.this = newobj.this @@ -1548,7 +1562,7 @@ class RadioBox(core.Control): Size size=DefaultSize, int choices=0, String choices_array=None, int majorDimension=0, long style=RA_HORIZONTAL, Validator validator=DefaultValidator, - String name=wxPyRadioBoxNameStr) -> bool + String name=RadioBoxNameStr) -> bool """ return _controls.RadioBox_Create(*args, **kwargs) @@ -1613,6 +1627,8 @@ class RadioBoxPtr(RadioBox): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = RadioBox _controls.RadioBox_swigregister(RadioBoxPtr) +RadioBoxNameStr = cvar.RadioBoxNameStr +RadioButtonNameStr = cvar.RadioButtonNameStr def PreRadioBox(*args, **kwargs): """PreRadioBox() -> RadioBox""" @@ -1629,7 +1645,7 @@ class RadioButton(core.Control): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyRadioButtonNameStr) -> RadioButton + Validator validator=DefaultValidator, String name=RadioButtonNameStr) -> RadioButton """ newobj = _controls.new_RadioButton(*args, **kwargs) self.this = newobj.this @@ -1641,7 +1657,7 @@ class RadioButton(core.Control): """ Create(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyRadioButtonNameStr) -> bool + Validator validator=DefaultValidator, String name=RadioButtonNameStr) -> bool """ return _controls.RadioButton_Create(*args, **kwargs) @@ -1677,7 +1693,7 @@ class Slider(core.Control): __init__(Window parent, int id, int value, int minValue, int maxValue, Point point=DefaultPosition, Size size=DefaultSize, long style=SL_HORIZONTAL, Validator validator=DefaultValidator, - String name=wxPySliderNameStr) -> Slider + String name=SliderNameStr) -> Slider """ newobj = _controls.new_Slider(*args, **kwargs) self.this = newobj.this @@ -1690,7 +1706,7 @@ class Slider(core.Control): Create(Window parent, int id, int value, int minValue, int maxValue, Point point=DefaultPosition, Size size=DefaultSize, long style=SL_HORIZONTAL, Validator validator=DefaultValidator, - String name=wxPySliderNameStr) -> bool + String name=SliderNameStr) -> bool """ return _controls.Slider_Create(*args, **kwargs) @@ -1785,6 +1801,7 @@ class SliderPtr(Slider): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Slider _controls.Slider_swigregister(SliderPtr) +SliderNameStr = cvar.SliderNameStr def PreSlider(*args, **kwargs): """PreSlider() -> Slider""" @@ -1804,7 +1821,7 @@ class ToggleButton(core.Control): """ __init__(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyToggleButtonNameStr) -> ToggleButton + Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> ToggleButton """ newobj = _controls.new_ToggleButton(*args, **kwargs) self.this = newobj.this @@ -1816,7 +1833,7 @@ class ToggleButton(core.Control): """ Create(Window parent, int id, String label, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=wxPyToggleButtonNameStr) -> bool + Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> bool """ return _controls.ToggleButton_Create(*args, **kwargs) @@ -1839,6 +1856,7 @@ class ToggleButtonPtr(ToggleButton): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ToggleButton _controls.ToggleButton_swigregister(ToggleButtonPtr) +ToggleButtonNameStr = cvar.ToggleButtonNameStr def PreToggleButton(*args, **kwargs): """PreToggleButton() -> ToggleButton""" @@ -1873,17 +1891,17 @@ class BookCtrl(core.Control): return _controls.BookCtrl_GetPageText(*args, **kwargs) def SetImageList(*args, **kwargs): - """SetImageList(wxImageList imageList)""" + """SetImageList(ImageList imageList)""" return _controls.BookCtrl_SetImageList(*args, **kwargs) def AssignImageList(*args, **kwargs): - """AssignImageList(wxImageList imageList)""" + """AssignImageList(ImageList imageList)""" val = _controls.BookCtrl_AssignImageList(*args, **kwargs) args[1].thisown = 0 return val def GetImageList(*args, **kwargs): - """GetImageList() -> wxImageList""" + """GetImageList() -> ImageList""" return _controls.BookCtrl_GetImageList(*args, **kwargs) def GetPageImage(*args, **kwargs): @@ -1940,6 +1958,7 @@ class BookCtrlPtr(BookCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = BookCtrl _controls.BookCtrl_swigregister(BookCtrlPtr) +NOTEBOOK_NAME = cvar.NOTEBOOK_NAME class BookCtrlEvent(core.NotifyEvent): def __repr__(self): @@ -1995,7 +2014,7 @@ class Notebook(BookCtrl): def __init__(self, *args, **kwargs): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=wxPyNOTEBOOK_NAME) -> Notebook + long style=0, String name=NOTEBOOK_NAME) -> Notebook """ newobj = _controls.new_Notebook(*args, **kwargs) self.this = newobj.this @@ -2006,7 +2025,7 @@ class Notebook(BookCtrl): def Create(*args, **kwargs): """ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=wxPyNOTEBOOK_NAME) -> bool + long style=0, String name=NOTEBOOK_NAME) -> bool """ return _controls.Notebook_Create(*args, **kwargs) @@ -2882,6 +2901,7 @@ class ListItemAttrPtr(ListItemAttr): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ListItemAttr _controls.ListItemAttr_swigregister(ListItemAttrPtr) +ListCtrlNameStr = cvar.ListCtrlNameStr #--------------------------------------------------------------------------- @@ -3171,7 +3191,7 @@ class ListCtrl(core.Control): """ __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=LC_ICON, - Validator validator=DefaultValidator, String name=wxPyListCtrlNameStr) -> ListCtrl + Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl """ newobj = _controls.new_ListCtrl(*args, **kwargs) self.this = newobj.this @@ -3183,7 +3203,7 @@ class ListCtrl(core.Control): """ Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=LC_ICON, - Validator validator=DefaultValidator, String name=wxPyListCtrlNameStr) -> bool + Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool """ return _controls.ListCtrl_Create(*args, **kwargs) @@ -3324,15 +3344,15 @@ class ListCtrl(core.Control): return _controls.ListCtrl_GetNextItem(*args, **kwargs) def GetImageList(*args, **kwargs): - """GetImageList(int which) -> wxImageList""" + """GetImageList(int which) -> ImageList""" return _controls.ListCtrl_GetImageList(*args, **kwargs) def SetImageList(*args, **kwargs): - """SetImageList(wxImageList imageList, int which)""" + """SetImageList(ImageList imageList, int which)""" return _controls.ListCtrl_SetImageList(*args, **kwargs) def AssignImageList(*args, **kwargs): - """AssignImageList(wxImageList imageList, int which)""" + """AssignImageList(ImageList imageList, int which)""" val = _controls.ListCtrl_AssignImageList(*args, **kwargs) args[1].thisown = 0 return val @@ -3543,7 +3563,7 @@ class ListView(ListCtrl): """ __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=LC_REPORT, - Validator validator=DefaultValidator, String name=wxPyListCtrlNameStr) -> ListView + Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListView """ newobj = _controls.new_ListView(*args, **kwargs) self.this = newobj.this @@ -3555,7 +3575,7 @@ class ListView(ListCtrl): """ Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=LC_REPORT, - Validator validator=DefaultValidator, String name=wxPyListCtrlNameStr) -> bool + Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool """ return _controls.ListView_Create(*args, **kwargs) @@ -3681,6 +3701,7 @@ class TreeItemIdPtr(TreeItemId): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = TreeItemId _controls.TreeItemId_swigregister(TreeItemIdPtr) +TreeCtrlNameStr = cvar.TreeCtrlNameStr class TreeItemData(object): def __repr__(self): @@ -3845,7 +3866,7 @@ class TreeCtrl(core.Control): __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=TR_DEFAULT_STYLE, Validator validator=DefaultValidator, - String name=wxPy_TreeCtrlNameStr) -> TreeCtrl + String name=TreeCtrlNameStr) -> TreeCtrl """ newobj = _controls.new_TreeCtrl(*args, **kwargs) self.this = newobj.this @@ -3858,7 +3879,7 @@ class TreeCtrl(core.Control): Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=TR_DEFAULT_STYLE, Validator validator=DefaultValidator, - String name=wxPy_TreeCtrlNameStr) -> bool + String name=TreeCtrlNameStr) -> bool """ return _controls.TreeCtrl_Create(*args, **kwargs) @@ -3887,29 +3908,29 @@ class TreeCtrl(core.Control): return _controls.TreeCtrl_SetSpacing(*args, **kwargs) def GetImageList(*args, **kwargs): - """GetImageList() -> wxImageList""" + """GetImageList() -> ImageList""" return _controls.TreeCtrl_GetImageList(*args, **kwargs) def GetStateImageList(*args, **kwargs): - """GetStateImageList() -> wxImageList""" + """GetStateImageList() -> ImageList""" return _controls.TreeCtrl_GetStateImageList(*args, **kwargs) def SetImageList(*args, **kwargs): - """SetImageList(wxImageList imageList)""" + """SetImageList(ImageList imageList)""" return _controls.TreeCtrl_SetImageList(*args, **kwargs) def SetStateImageList(*args, **kwargs): - """SetStateImageList(wxImageList imageList)""" + """SetStateImageList(ImageList imageList)""" return _controls.TreeCtrl_SetStateImageList(*args, **kwargs) def AssignImageList(*args, **kwargs): - """AssignImageList(wxImageList imageList)""" + """AssignImageList(ImageList imageList)""" val = _controls.TreeCtrl_AssignImageList(*args, **kwargs) args[1].thisown = 0 return val def AssignStateImageList(*args, **kwargs): - """AssignStateImageList(wxImageList imageList)""" + """AssignStateImageList(ImageList imageList)""" val = _controls.TreeCtrl_AssignStateImageList(*args, **kwargs) args[1].thisown = 0 return val @@ -4186,11 +4207,11 @@ class GenericDirCtrl(core.Control): return "<%s.%s; proxy of C++ wxGenericDirCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, int id=-1, String dir=wxPyDirDialogDefaultFolderStr, + __init__(Window parent, int id=-1, String dir=DirDialogDefaultFolderStr, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, String filter=EmptyString, - int defaultFilter=0, String name=wxPy_TreeCtrlNameStr) -> GenericDirCtrl + int defaultFilter=0, String name=TreeCtrlNameStr) -> GenericDirCtrl """ newobj = _controls.new_GenericDirCtrl(*args, **kwargs) self.this = newobj.this @@ -4200,11 +4221,11 @@ class GenericDirCtrl(core.Control): def Create(*args, **kwargs): """ - Create(Window parent, int id=-1, String dir=wxPyDirDialogDefaultFolderStr, + Create(Window parent, int id=-1, String dir=DirDialogDefaultFolderStr, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, String filter=EmptyString, - int defaultFilter=0, String name=wxPy_TreeCtrlNameStr) -> bool + int defaultFilter=0, String name=TreeCtrlNameStr) -> bool """ return _controls.GenericDirCtrl_Create(*args, **kwargs) @@ -4261,7 +4282,7 @@ class GenericDirCtrl(core.Control): return _controls.GenericDirCtrl_GetRootId(*args, **kwargs) def GetTreeCtrl(*args, **kwargs): - """GetTreeCtrl() -> wxTreeCtrl""" + """GetTreeCtrl() -> TreeCtrl""" return _controls.GenericDirCtrl_GetTreeCtrl(*args, **kwargs) def GetFilterListCtrl(*args, **kwargs): @@ -4294,6 +4315,7 @@ class GenericDirCtrlPtr(GenericDirCtrl): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = GenericDirCtrl _controls.GenericDirCtrl_swigregister(GenericDirCtrlPtr) +DirDialogDefaultFolderStr = cvar.DirDialogDefaultFolderStr def PreGenericDirCtrl(*args, **kwargs): """PreGenericDirCtrl() -> GenericDirCtrl""" @@ -4349,7 +4371,7 @@ class PyControl(core.Control): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, - String name=wxPyControlNameStr) -> PyControl + String name=ControlNameStr) -> PyControl """ newobj = _controls.new_PyControl(*args, **kwargs) self.this = newobj.this @@ -4670,7 +4692,7 @@ class DragImage(core.Object): return _controls.DragImage_DoDrawImage(*args, **kwargs) def UpdateBackingFromWindow(*args, **kwargs): - """UpdateBackingFromWindow(DC windowDC, wxMemoryDC destDC, Rect sourceRect, Rect destRect) -> bool""" + """UpdateBackingFromWindow(DC windowDC, MemoryDC destDC, Rect sourceRect, Rect destRect) -> bool""" return _controls.DragImage_UpdateBackingFromWindow(*args, **kwargs) def RedrawImage(*args, **kwargs): @@ -4686,7 +4708,7 @@ class DragImagePtr(DragImage): _controls.DragImage_swigregister(DragImagePtr) def DragIcon(*args, **kwargs): - """DragIcon(wxIcon image, Cursor cursor=wxNullCursor) -> DragImage""" + """DragIcon(Icon image, Cursor cursor=wxNullCursor) -> DragImage""" val = _controls.new_DragIcon(*args, **kwargs) val.thisown = 1 return val diff --git a/wxPython/src/gtk/controls_wrap.cpp b/wxPython/src/gtk/controls_wrap.cpp index 41600029c6..7a4c37f9d9 100644 --- a/wxPython/src/gtk/controls_wrap.cpp +++ b/wxPython/src/gtk/controls_wrap.cpp @@ -307,36 +307,22 @@ static swig_type_info *swig_types[84]; #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - DECLARE_DEF_STRING(PanelNameStr); - DECLARE_DEF_STRING(EmptyString); - DECLARE_DEF_STRING(ControlNameStr); - - - - DECLARE_DEF_STRING(ButtonNameStr); - - - DECLARE_DEF_STRING(CheckBoxNameStr); - - - DECLARE_DEF_STRING(ChoiceNameStr); - - - DECLARE_DEF_STRING(ComboBoxNameStr); - - - DECLARE_DEF_STRING(GaugeNameStr); - - - DECLARE_DEF_STRING(StaticBitmapNameStr); - DECLARE_DEF_STRING(StaticBoxNameStr); - DECLARE_DEF_STRING(StaticTextNameStr); - + static const wxString wxPyPanelNameStr(wxPanelNameStr); + static const wxString wxPyEmptyString(wxEmptyString); + static const wxString wxPyControlNameStr(wxControlNameStr); + static const wxString wxPyButtonNameStr(wxButtonNameStr); + static const wxString wxPyCheckBoxNameStr(wxCheckBoxNameStr); + static const wxString wxPyChoiceNameStr(wxChoiceNameStr); + static const wxString wxPyComboBoxNameStr(wxComboBoxNameStr); + static const wxString wxPyGaugeNameStr(wxGaugeNameStr); + static const wxString wxPyStaticBitmapNameStr(wxStaticBitmapNameStr); + static const wxString wxPyStaticBoxNameStr(wxStaticBoxNameStr); + static const wxString wxPyStaticTextNameStr(wxStaticTextNameStr); #include - DECLARE_DEF_STRING(ListBoxNameStr); + static const wxString wxPyListBoxNameStr(wxListBoxNameStr); void wxListBox_Insert(wxListBox *self,wxString const &item,int pos,PyObject *clientData){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); @@ -353,9 +339,7 @@ PyObject *wxListBox_GetSelections(wxListBox *self){ } return tup; } - - DECLARE_DEF_STRING(TextCtrlNameStr); - + static const wxString wxPyTextCtrlNameStr(wxTextCtrlNameStr); static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -389,32 +373,22 @@ void wxTextCtrl_write(wxTextCtrl *self,wxString const &text){ wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to){ return self->GetValue().Mid(from, to - from); } - - DECLARE_DEF_STRING(ScrollBarNameStr); - - - DECLARE_DEF_STRING(SPIN_BUTTON_NAME); - wxChar* wxSpinCtrlNameStr = _T("wxSpinCtrl"); - DECLARE_DEF_STRING(SpinCtrlNameStr); - + static const wxString wxPyScrollBarNameStr(wxScrollBarNameStr); + static const wxString wxPySPIN_BUTTON_NAME(wxSPIN_BUTTON_NAME); + static const wxString wxPySpinCtrlNameStr(wxT(_T("wxSpinCtrl"))); void wxSpinCtrl_SetSelection(wxSpinCtrl *self,long from,long to){ } - - DECLARE_DEF_STRING(RadioBoxNameStr); - DECLARE_DEF_STRING(RadioButtonNameStr); - + static const wxString wxPyRadioBoxNameStr(wxRadioBoxNameStr); + static const wxString wxPyRadioButtonNameStr(wxRadioButtonNameStr); int wxRadioBox_GetColumnCount(wxRadioBox const *self){ return -1; } int wxRadioBox_GetRowCount(wxRadioBox const *self){ return -1; } int wxRadioBox_GetNextItem(wxRadioBox const *self,int item,wxDirection dir,long style){ return -1; } #include - DECLARE_DEF_STRING(SliderNameStr); - - - wxChar* wxToggleButtonNameStr = _T("wxToggleButton"); - DECLARE_DEF_STRING(ToggleButtonNameStr); + static const wxString wxPySliderNameStr(wxSliderNameStr); + static const wxString wxPyToggleButtonNameStr(wxT(_T("wxToggleButton"))); #ifdef __WXMAC__ // implement dummy classes and such for wxMac @@ -434,12 +408,8 @@ public: }; #endif - - DECLARE_DEF_STRING(NOTEBOOK_NAME); - - - DECLARE_DEF_STRING(ToolBarNameStr); - + static const wxString wxPyNOTEBOOK_NAME(wxNOTEBOOK_NAME); + static const wxString wxPyToolBarNameStr(wxToolBarNameStr); PyObject *wxToolBarToolBase_GetClientData(wxToolBarToolBase *self){ wxPyUserData* udata = (wxPyUserData*)self->GetClientData(); if (udata) { @@ -483,9 +453,8 @@ void wxToolBarBase_SetToolClientData(wxToolBarBase *self,int id,PyObject *client #include - const wxChar* wxListCtrlNameStr = _T("wxListCtrl"); - DECLARE_DEF_STRING(ListCtrlNameStr); + static const wxString wxPyListCtrlNameStr(wxT(_T("wxListCtrl"))); void wxListItemAttr_Destroy(wxListItemAttr *self){ delete self; } // Python aware sorting function for wxPyListCtrl static int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { @@ -588,10 +557,8 @@ wxWindow *wxPyListCtrl_GetMainWindow(wxPyListCtrl *self){ #include #include "wx/wxPython/pytree.h" - - const wxChar* wx_TreeCtrlNameStr = _T("wxTreeCtrl"); - DECLARE_DEF_STRING(_TreeCtrlNameStr); + static const wxString wxPyTreeCtrlNameStr(wxT(_T("wxTreeCtrl"))); bool wxTreeItemId_operator_ee___(wxTreeItemId *self,wxTreeItemId const *other){ if (!other) return False; return *self == *other; @@ -723,9 +690,7 @@ PyObject *wxPyTreeCtrl_GetBoundingRect(wxPyTreeCtrl *self,wxTreeItemId const &it else RETURN_NONE(); } - - DECLARE_DEF_STRING(DirDialogDefaultFolderStr); - + static const wxString wxPyDirDialogDefaultFolderStr(wxDirDialogDefaultFolderStr); // C++ version of Python aware wxControl class wxPyControl : public wxControl { @@ -804,6 +769,26 @@ void wxHelpProvider_Destroy(wxHelpProvider *self){ delete self; } #ifdef __cplusplus extern "C" { #endif +static int _wrap_ButtonNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ButtonNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ButtonNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyButtonNameStr)->c_str(), (&wxPyButtonNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyButtonNameStr)->c_str(), (&wxPyButtonNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_Button(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -1582,6 +1567,26 @@ static PyObject * BitmapButton_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_CheckBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable CheckBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_CheckBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyCheckBoxNameStr)->c_str(), (&wxPyCheckBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyCheckBoxNameStr)->c_str(), (&wxPyCheckBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_CheckBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -1974,6 +1979,26 @@ static PyObject * CheckBox_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ChoiceNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ChoiceNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ChoiceNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyChoiceNameStr)->c_str(), (&wxPyChoiceNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyChoiceNameStr)->c_str(), (&wxPyChoiceNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_Choice(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -2344,6 +2369,26 @@ static PyObject * Choice_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ComboBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ComboBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ComboBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyComboBoxNameStr)->c_str(), (&wxPyComboBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyComboBoxNameStr)->c_str(), (&wxPyComboBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_ComboBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -2985,6 +3030,26 @@ static PyObject * ComboBox_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_GaugeNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable GaugeNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_GaugeNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyGaugeNameStr)->c_str(), (&wxPyGaugeNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyGaugeNameStr)->c_str(), (&wxPyGaugeNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_Gauge(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -3394,6 +3459,66 @@ static PyObject * Gauge_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_StaticBitmapNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable StaticBitmapNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_StaticBitmapNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyStaticBitmapNameStr)->c_str(), (&wxPyStaticBitmapNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyStaticBitmapNameStr)->c_str(), (&wxPyStaticBitmapNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_StaticBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable StaticBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_StaticBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyStaticBoxNameStr)->c_str(), (&wxPyStaticBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyStaticBoxNameStr)->c_str(), (&wxPyStaticBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_StaticTextNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable StaticTextNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_StaticTextNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyStaticTextNameStr)->c_str(), (&wxPyStaticTextNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyStaticTextNameStr)->c_str(), (&wxPyStaticTextNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_StaticBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -4266,6 +4391,26 @@ static PyObject * StaticBitmap_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ListBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ListBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ListBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyListBoxNameStr)->c_str(), (&wxPyListBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyListBoxNameStr)->c_str(), (&wxPyListBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_ListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -5338,6 +5483,26 @@ static PyObject * CheckListBox_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_TextCtrlNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable TextCtrlNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_TextCtrlNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyTextCtrlNameStr)->c_str(), (&wxPyTextCtrlNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyTextCtrlNameStr)->c_str(), (&wxPyTextCtrlNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_TextAttr__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj; wxTextAttr *result; @@ -7988,6 +8153,26 @@ static PyObject * TextUrlEvent_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ScrollBarNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ScrollBarNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ScrollBarNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyScrollBarNameStr)->c_str(), (&wxPyScrollBarNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyScrollBarNameStr)->c_str(), (&wxPyScrollBarNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_ScrollBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -8354,6 +8539,46 @@ static PyObject * ScrollBar_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_SPIN_BUTTON_NAME_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SPIN_BUTTON_NAME is read-only."); + return 1; +} + + +static PyObject *_wrap_SPIN_BUTTON_NAME_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySPIN_BUTTON_NAME)->c_str(), (&wxPySPIN_BUTTON_NAME)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySPIN_BUTTON_NAME)->c_str(), (&wxPySPIN_BUTTON_NAME)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_SpinCtrlNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SpinCtrlNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_SpinCtrlNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySpinCtrlNameStr)->c_str(), (&wxPySpinCtrlNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySpinCtrlNameStr)->c_str(), (&wxPySpinCtrlNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_SpinButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -9119,6 +9344,46 @@ static PyObject * SpinCtrl_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_RadioBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable RadioBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_RadioBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyRadioBoxNameStr)->c_str(), (&wxPyRadioBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyRadioBoxNameStr)->c_str(), (&wxPyRadioBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_RadioButtonNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable RadioButtonNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_RadioButtonNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyRadioButtonNameStr)->c_str(), (&wxPyRadioButtonNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyRadioButtonNameStr)->c_str(), (&wxPyRadioButtonNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_RadioBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -10035,6 +10300,26 @@ static PyObject * RadioButton_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_SliderNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SliderNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_SliderNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySliderNameStr)->c_str(), (&wxPySliderNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySliderNameStr)->c_str(), (&wxPySliderNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_Slider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -10749,6 +11034,26 @@ static PyObject * Slider_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ToggleButtonNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ToggleButtonNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ToggleButtonNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyToggleButtonNameStr)->c_str(), (&wxPyToggleButtonNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyToggleButtonNameStr)->c_str(), (&wxPyToggleButtonNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_ToggleButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -11056,6 +11361,26 @@ static PyObject * ToggleButton_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_NOTEBOOK_NAME_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable NOTEBOOK_NAME is read-only."); + return 1; +} + + +static PyObject *_wrap_NOTEBOOK_NAME_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyNOTEBOOK_NAME)->c_str(), (&wxPyNOTEBOOK_NAME)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyNOTEBOOK_NAME)->c_str(), (&wxPyNOTEBOOK_NAME)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_BookCtrl_GetPageCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBookCtrl *arg1 = (wxBookCtrl *) 0 ; @@ -15062,6 +15387,26 @@ static PyObject * ToolBar_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ListCtrlNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ListCtrlNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ListCtrlNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyListCtrlNameStr)->c_str(), (&wxPyListCtrlNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyListCtrlNameStr)->c_str(), (&wxPyListCtrlNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_ListItemAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour const &arg1_defvalue = wxNullColour ; @@ -19776,6 +20121,26 @@ static PyObject * ListView_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_TreeCtrlNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable TreeCtrlNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_TreeCtrlNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyTreeCtrlNameStr)->c_str(), (&wxPyTreeCtrlNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyTreeCtrlNameStr)->c_str(), (&wxPyTreeCtrlNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_TreeItemId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxTreeItemId *result; @@ -20590,7 +20955,7 @@ static PyObject *_wrap_new_TreeCtrl(PyObject *self, PyObject *args, PyObject *kw long arg5 = (long) wxTR_DEFAULT_STYLE ; wxValidator const &arg6_defvalue = wxDefaultValidator ; wxValidator *arg6 = (wxValidator *) &arg6_defvalue ; - wxString const &arg7_defvalue = wxPy_TreeCtrlNameStr ; + wxString const &arg7_defvalue = wxPyTreeCtrlNameStr ; wxString *arg7 = (wxString *) &arg7_defvalue ; wxPyTreeCtrl *result; wxPoint temp3 ; @@ -20639,7 +21004,9 @@ static PyObject *_wrap_new_TreeCtrl(PyObject *self, PyObject *args, PyObject *kw wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxPyTreeCtrl, 1); + { + resultobj = wxPyMake_wxObject(result); + } { if (temp7) delete arg7; @@ -20669,7 +21036,9 @@ static PyObject *_wrap_new_PreTreeCtrl(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxPyTreeCtrl, 1); + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -20688,7 +21057,7 @@ static PyObject *_wrap_TreeCtrl_Create(PyObject *self, PyObject *args, PyObject long arg6 = (long) wxTR_DEFAULT_STYLE ; wxValidator const &arg7_defvalue = wxDefaultValidator ; wxValidator *arg7 = (wxValidator *) &arg7_defvalue ; - wxString const &arg8_defvalue = wxPy_TreeCtrlNameStr ; + wxString const &arg8_defvalue = wxPyTreeCtrlNameStr ; wxString *arg8 = (wxString *) &arg8_defvalue ; bool result; wxPoint temp4 ; @@ -23031,6 +23400,26 @@ static PyObject * TreeCtrl_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_DirDialogDefaultFolderStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DirDialogDefaultFolderStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DirDialogDefaultFolderStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDirDialogDefaultFolderStr)->c_str(), (&wxPyDirDialogDefaultFolderStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDirDialogDefaultFolderStr)->c_str(), (&wxPyDirDialogDefaultFolderStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_GenericDirCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -23045,7 +23434,7 @@ static PyObject *_wrap_new_GenericDirCtrl(PyObject *self, PyObject *args, PyObje wxString const &arg7_defvalue = wxPyEmptyString ; wxString *arg7 = (wxString *) &arg7_defvalue ; int arg8 = (int) 0 ; - wxString const &arg9_defvalue = wxPy_TreeCtrlNameStr ; + wxString const &arg9_defvalue = wxPyTreeCtrlNameStr ; wxString *arg9 = (wxString *) &arg9_defvalue ; wxGenericDirCtrl *result; bool temp3 = False ; @@ -23173,7 +23562,7 @@ static PyObject *_wrap_GenericDirCtrl_Create(PyObject *self, PyObject *args, PyO wxString const &arg8_defvalue = wxPyEmptyString ; wxString *arg8 = (wxString *) &arg8_defvalue ; int arg9 = (int) 0 ; - wxString const &arg10_defvalue = wxPy_TreeCtrlNameStr ; + wxString const &arg10_defvalue = wxPyTreeCtrlNameStr ; wxString *arg10 = (wxString *) &arg10_defvalue ; bool result; bool temp4 = False ; @@ -23686,7 +24075,7 @@ static PyObject *_wrap_GenericDirCtrl_GetRootId(PyObject *self, PyObject *args, static PyObject *_wrap_GenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGenericDirCtrl *arg1 = (wxGenericDirCtrl *) 0 ; - wxTreeCtrl *result; + wxPyTreeCtrl *result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -23696,7 +24085,7 @@ static PyObject *_wrap_GenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *args if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGenericDirCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxTreeCtrl *)((wxGenericDirCtrl const *)arg1)->GetTreeCtrl(); + result = (wxPyTreeCtrl *)((wxGenericDirCtrl const *)arg1)->GetTreeCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -28130,16 +28519,36 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"ButtonNameStr",_wrap_ButtonNameStr_get, _wrap_ButtonNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"CheckBoxNameStr",_wrap_CheckBoxNameStr_get, _wrap_CheckBoxNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"ChoiceNameStr",_wrap_ChoiceNameStr_get, _wrap_ChoiceNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"ComboBoxNameStr",_wrap_ComboBoxNameStr_get, _wrap_ComboBoxNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"GaugeNameStr",_wrap_GaugeNameStr_get, _wrap_GaugeNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"StaticBitmapNameStr",_wrap_StaticBitmapNameStr_get, _wrap_StaticBitmapNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"StaticBoxNameStr",_wrap_StaticBoxNameStr_get, _wrap_StaticBoxNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"StaticTextNameStr",_wrap_StaticTextNameStr_get, _wrap_StaticTextNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"ListBoxNameStr",_wrap_ListBoxNameStr_get, _wrap_ListBoxNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"TextCtrlNameStr",_wrap_TextCtrlNameStr_get, _wrap_TextCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_TEXT_UPDATED", PyInt_FromLong(wxEVT_COMMAND_TEXT_UPDATED)); PyDict_SetItemString(d, "wxEVT_COMMAND_TEXT_ENTER", PyInt_FromLong(wxEVT_COMMAND_TEXT_ENTER)); PyDict_SetItemString(d, "wxEVT_COMMAND_TEXT_URL", PyInt_FromLong(wxEVT_COMMAND_TEXT_URL)); PyDict_SetItemString(d, "wxEVT_COMMAND_TEXT_MAXLEN", PyInt_FromLong(wxEVT_COMMAND_TEXT_MAXLEN)); + SWIG_addvarlink(SWIG_globals,(char*)"ScrollBarNameStr",_wrap_ScrollBarNameStr_get, _wrap_ScrollBarNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"SPIN_BUTTON_NAME",_wrap_SPIN_BUTTON_NAME_get, _wrap_SPIN_BUTTON_NAME_set); + SWIG_addvarlink(SWIG_globals,(char*)"SpinCtrlNameStr",_wrap_SpinCtrlNameStr_get, _wrap_SpinCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_SPINCTRL_UPDATED", PyInt_FromLong(wxEVT_COMMAND_SPINCTRL_UPDATED)); + SWIG_addvarlink(SWIG_globals,(char*)"RadioBoxNameStr",_wrap_RadioBoxNameStr_get, _wrap_RadioBoxNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"RadioButtonNameStr",_wrap_RadioButtonNameStr_get, _wrap_RadioButtonNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"SliderNameStr",_wrap_SliderNameStr_get, _wrap_SliderNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"ToggleButtonNameStr",_wrap_ToggleButtonNameStr_get, _wrap_ToggleButtonNameStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_TOGGLEBUTTON_CLICKED", PyInt_FromLong(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED)); + SWIG_addvarlink(SWIG_globals,(char*)"NOTEBOOK_NAME",_wrap_NOTEBOOK_NAME_get, _wrap_NOTEBOOK_NAME_set); PyDict_SetItemString(d, "wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); PyDict_SetItemString(d, "wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); PyDict_SetItemString(d, "wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED", PyInt_FromLong(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED)); PyDict_SetItemString(d, "wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING", PyInt_FromLong(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING)); + SWIG_addvarlink(SWIG_globals,(char*)"ListCtrlNameStr",_wrap_ListCtrlNameStr_get, _wrap_ListCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_LIST_BEGIN_DRAG", PyInt_FromLong(wxEVT_COMMAND_LIST_BEGIN_DRAG)); PyDict_SetItemString(d, "wxEVT_COMMAND_LIST_BEGIN_RDRAG", PyInt_FromLong(wxEVT_COMMAND_LIST_BEGIN_RDRAG)); PyDict_SetItemString(d, "wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT", PyInt_FromLong(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)); @@ -28166,6 +28575,7 @@ SWIGEXPORT(void) SWIG_init(void) { // Map renamed classes back to their common name for OOR wxPyPtrTypeMap_Add("wxListCtrl", "wxPyListCtrl"); + SWIG_addvarlink(SWIG_globals,(char*)"TreeCtrlNameStr",_wrap_TreeCtrlNameStr_get, _wrap_TreeCtrlNameStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_BEGIN_DRAG", PyInt_FromLong(wxEVT_COMMAND_TREE_BEGIN_DRAG)); PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_BEGIN_RDRAG", PyInt_FromLong(wxEVT_COMMAND_TREE_BEGIN_RDRAG)); PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT", PyInt_FromLong(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)); @@ -28191,6 +28601,7 @@ SWIGEXPORT(void) SWIG_init(void) { wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl"); + SWIG_addvarlink(SWIG_globals,(char*)"DirDialogDefaultFolderStr",_wrap_DirDialogDefaultFolderStr_get, _wrap_DirDialogDefaultFolderStr_set); PyDict_SetItemString(d, "wxEVT_HELP", PyInt_FromLong(wxEVT_HELP)); PyDict_SetItemString(d, "wxEVT_DETAILED_HELP", PyInt_FromLong(wxEVT_DETAILED_HELP)); diff --git a/wxPython/src/gtk/core.py b/wxPython/src/gtk/core.py index 6d8462e4a4..494bcc6d3f 100644 --- a/wxPython/src/gtk/core.py +++ b/wxPython/src/gtk/core.py @@ -6747,7 +6747,7 @@ class Control(Window): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, - String name=wxPyControlNameStr) -> Control + String name=ControlNameStr) -> Control """ newobj = _core.new_Control(*args, **kwargs) self.this = newobj.this @@ -6759,7 +6759,7 @@ class Control(Window): """ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, - String name=wxPyControlNameStr) -> bool + String name=ControlNameStr) -> bool """ return _core.Control_Create(*args, **kwargs) @@ -6782,6 +6782,7 @@ class ControlPtr(Control): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Control _core.Control_swigregister(ControlPtr) +ControlNameStr = cvar.ControlNameStr def PreControl(*args, **kwargs): """PreControl() -> Control""" diff --git a/wxPython/src/gtk/core_wrap.cpp b/wxPython/src/gtk/core_wrap.cpp index 4c0da785ce..dccfecb599 100644 --- a/wxPython/src/gtk/core_wrap.cpp +++ b/wxPython/src/gtk/core_wrap.cpp @@ -1029,9 +1029,7 @@ PyObject *wxMenu_GetMenuItems(wxMenu *self){ return wxPy_ConvertList(&list); } int MenuItem_GetDefaultMarginWidth(){ return 0; } - - DECLARE_DEF_STRING(ControlNameStr); - + static const wxString wxPyControlNameStr(wxControlNameStr); int wxItemContainer_Append(wxItemContainer *self,wxString const &item,PyObject *clientData){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); @@ -28659,6 +28657,26 @@ static PyObject * MenuItem_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_ControlNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ControlNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ControlNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyControlNameStr)->c_str(), (&wxPyControlNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyControlNameStr)->c_str(), (&wxPyControlNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_Control(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -38348,6 +38366,7 @@ SWIGEXPORT(void) SWIG_init(void) { SWIG_addvarlink(SWIG_globals,(char*)"NullAcceleratorTable",_wrap_NullAcceleratorTable_get, _wrap_NullAcceleratorTable_set); SWIG_addvarlink(SWIG_globals,(char*)"PanelNameStr",_wrap_PanelNameStr_get, _wrap_PanelNameStr_set); SWIG_addvarlink(SWIG_globals,(char*)"DefaultValidator",_wrap_DefaultValidator_get, _wrap_DefaultValidator_set); + SWIG_addvarlink(SWIG_globals,(char*)"ControlNameStr",_wrap_ControlNameStr_get, _wrap_ControlNameStr_set); SWIG_addvarlink(SWIG_globals,(char*)"DefaultSpan",_wrap_DefaultSpan_get, _wrap_DefaultSpan_set); // Initialize threading, some globals and such diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 031d471fd6..5078116c6c 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -1283,7 +1283,7 @@ class FontMapper(object): GetEncodingDescription = staticmethod(GetEncodingDescription) def SetConfig(*args, **kwargs): - """SetConfig(wxConfigBase config)""" + """SetConfig(ConfigBase config)""" return _gdi.FontMapper_SetConfig(*args, **kwargs) def SetConfigPath(*args, **kwargs): diff --git a/wxPython/src/gtk/gdi_wrap.cpp b/wxPython/src/gtk/gdi_wrap.cpp index fc55ff675e..192c5ee3b5 100644 --- a/wxPython/src/gtk/gdi_wrap.cpp +++ b/wxPython/src/gtk/gdi_wrap.cpp @@ -279,8 +279,8 @@ static swig_type_info *swig_types[56]; #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - DECLARE_DEF_STRING(EmptyString); + static const wxString wxPyEmptyString(wxEmptyString); PyObject *wxColour_Get(wxColour *self){ PyObject* rv = PyTuple_New(3); int red = -1; diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index 7658820a81..79aaf7c929 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -58,6 +58,7 @@ class GridCellRendererPtr(GridCellRenderer): self.__class__ = GridCellRenderer _grid.GridCellRenderer_swigregister(GridCellRendererPtr) cvar = _grid.cvar +DateTimeFormatStr = cvar.DateTimeFormatStr GridNoCellCoords = cvar.GridNoCellCoords GridNoCellRect = cvar.GridNoCellRect @@ -184,7 +185,7 @@ class GridCellDateTimeRenderer(GridCellStringRenderer): def __repr__(self): return "<%s.%s; proxy of C++ wxGridCellDateTimeRenderer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(String outformat=wxPyDateTimeFormatStr, String informat=wxPyDateTimeFormatStr) -> GridCellDateTimeRenderer""" + """__init__(String outformat=DateTimeFormatStr, String informat=DateTimeFormatStr) -> GridCellDateTimeRenderer""" newobj = _grid.new_GridCellDateTimeRenderer(*args, **kwargs) self.this = newobj.this self.thisown = 1 diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index 098a647334..208dc260ee 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -279,10 +279,10 @@ static swig_type_info *swig_types[52]; #include #include - DECLARE_DEF_STRING(PanelNameStr); - DECLARE_DEF_STRING2(DateTimeFormatStr, wxT("%c")); - static const wxString wxPyEmptyString(wxT("")); + static const wxString wxPyEmptyString(wxEmptyString); + static const wxString wxPyPanelNameStr(wxPanelNameStr); + static const wxString wxPyDateTimeFormatStr(wxT(wxT("%c"))); #define wxPyMake_TEMPLATE(TYPE) \ @@ -1204,6 +1204,26 @@ wxGridCellCoords wxGrid_XYToCell(wxGrid *self,int x,int y){ #ifdef __cplusplus extern "C" { #endif +static int _wrap_DateTimeFormatStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DateTimeFormatStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DateTimeFormatStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDateTimeFormatStr)->c_str(), (&wxPyDateTimeFormatStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDateTimeFormatStr)->c_str(), (&wxPyDateTimeFormatStr)->Len()); +#endif + } + return pyobj; +} + + static int _wrap_GridNoCellCoords_set(PyObject *_val) { PyErr_SetString(PyExc_TypeError,"Variable GridNoCellCoords is read-only."); return 1; @@ -15333,6 +15353,7 @@ SWIGEXPORT(void) SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"DateTimeFormatStr",_wrap_DateTimeFormatStr_get, _wrap_DateTimeFormatStr_set); SWIG_addvarlink(SWIG_globals,(char*)"GridNoCellCoords",_wrap_GridNoCellCoords_get, _wrap_GridNoCellCoords_set); SWIG_addvarlink(SWIG_globals,(char*)"GridNoCellRect",_wrap_GridNoCellRect_get, _wrap_GridNoCellRect_set); PyDict_SetItemString(d, "wxEVT_GRID_CELL_LEFT_CLICK", PyInt_FromLong(wxEVT_GRID_CELL_LEFT_CLICK)); diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index b84f54ac5a..2792f04539 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -84,6 +84,10 @@ class HtmlLinkInfoPtr(HtmlLinkInfo): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = HtmlLinkInfo _html.HtmlLinkInfo_swigregister(HtmlLinkInfoPtr) +cvar = _html.cvar +HtmlWindowNameStr = cvar.HtmlWindowNameStr +HtmlPrintoutTitleStr = cvar.HtmlPrintoutTitleStr +HtmlPrintingTitleStr = cvar.HtmlPrintingTitleStr class HtmlTag(core.Object): def __init__(self): raise RuntimeError, "No constructor defined" @@ -162,7 +166,7 @@ class HtmlParser(core.Object): return _html.HtmlParser_StopParsing(*args, **kwargs) def AddTagHandler(*args, **kwargs): - """AddTagHandler(wxHtmlTagHandler handler)""" + """AddTagHandler(HtmlTagHandler handler)""" return _html.HtmlParser_AddTagHandler(*args, **kwargs) def GetSource(*args, **kwargs): @@ -170,7 +174,7 @@ class HtmlParser(core.Object): return _html.HtmlParser_GetSource(*args, **kwargs) def PushTagHandler(*args, **kwargs): - """PushTagHandler(wxHtmlTagHandler handler, String tags)""" + """PushTagHandler(HtmlTagHandler handler, String tags)""" return _html.HtmlParser_PushTagHandler(*args, **kwargs) def PopTagHandler(*args, **kwargs): @@ -923,7 +927,7 @@ class HtmlWindow(windows.ScrolledWindow): """ __init__(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, int style=HW_DEFAULT_STYLE, - String name=wxPyHtmlWindowNameStr) -> HtmlWindow + String name=HtmlWindowNameStr) -> HtmlWindow """ newobj = _html.new_HtmlWindow(*args, **kwargs) self.this = newobj.this @@ -935,7 +939,7 @@ class HtmlWindow(windows.ScrolledWindow): """ Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, int style=HW_SCROLLBAR_AUTO, - String name=wxPyHtmlWindowNameStr) -> bool + String name=HtmlWindowNameStr) -> bool """ return _html.HtmlWindow_Create(*args, **kwargs) @@ -996,11 +1000,11 @@ class HtmlWindow(windows.ScrolledWindow): return _html.HtmlWindow_SetBorders(*args, **kwargs) def ReadCustomization(*args, **kwargs): - """ReadCustomization(wxConfigBase cfg, String path=EmptyString)""" + """ReadCustomization(ConfigBase cfg, String path=EmptyString)""" return _html.HtmlWindow_ReadCustomization(*args, **kwargs) def WriteCustomization(*args, **kwargs): - """WriteCustomization(wxConfigBase cfg, String path=EmptyString)""" + """WriteCustomization(ConfigBase cfg, String path=EmptyString)""" return _html.HtmlWindow_WriteCustomization(*args, **kwargs) def HistoryBack(*args, **kwargs): @@ -1137,7 +1141,7 @@ class HtmlPrintout(windows.Printout): def __repr__(self): return "<%s.%s; proxy of C++ wxHtmlPrintout instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(String title=wxPyHtmlPrintoutTitleStr) -> HtmlPrintout""" + """__init__(String title=HtmlPrintoutTitleStr) -> HtmlPrintout""" newobj = _html.new_HtmlPrintout(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -1199,7 +1203,7 @@ class HtmlEasyPrinting(core.Object): def __repr__(self): return "<%s.%s; proxy of C++ wxHtmlEasyPrinting instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(String name=wxPyHtmlPrintingTitleStr, Window parentWindow=None) -> HtmlEasyPrinting""" + """__init__(String name=HtmlPrintingTitleStr, Window parentWindow=None) -> HtmlEasyPrinting""" newobj = _html.new_HtmlEasyPrinting(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -1495,15 +1499,15 @@ class HtmlHelpFrame(windows.Frame): return _html.HtmlHelpFrame_KeywordSearch(*args, **kwargs) def UseConfig(*args, **kwargs): - """UseConfig(wxConfigBase config, String rootpath=EmptyString)""" + """UseConfig(ConfigBase config, String rootpath=EmptyString)""" return _html.HtmlHelpFrame_UseConfig(*args, **kwargs) def ReadCustomization(*args, **kwargs): - """ReadCustomization(wxConfigBase cfg, String path=EmptyString)""" + """ReadCustomization(ConfigBase cfg, String path=EmptyString)""" return _html.HtmlHelpFrame_ReadCustomization(*args, **kwargs) def WriteCustomization(*args, **kwargs): - """WriteCustomization(wxConfigBase cfg, String path=EmptyString)""" + """WriteCustomization(ConfigBase cfg, String path=EmptyString)""" return _html.HtmlHelpFrame_WriteCustomization(*args, **kwargs) @@ -1573,15 +1577,15 @@ class HtmlHelpController(core.EvtHandler): return _html.HtmlHelpController_KeywordSearch(*args, **kwargs) def UseConfig(*args, **kwargs): - """UseConfig(wxConfigBase config, String rootpath=EmptyString)""" + """UseConfig(ConfigBase config, String rootpath=EmptyString)""" return _html.HtmlHelpController_UseConfig(*args, **kwargs) def ReadCustomization(*args, **kwargs): - """ReadCustomization(wxConfigBase cfg, String path=EmptyString)""" + """ReadCustomization(ConfigBase cfg, String path=EmptyString)""" return _html.HtmlHelpController_ReadCustomization(*args, **kwargs) def WriteCustomization(*args, **kwargs): - """WriteCustomization(wxConfigBase cfg, String path=EmptyString)""" + """WriteCustomization(ConfigBase cfg, String path=EmptyString)""" return _html.HtmlHelpController_WriteCustomization(*args, **kwargs) def GetFrame(*args, **kwargs): diff --git a/wxPython/src/gtk/html_wrap.cpp b/wxPython/src/gtk/html_wrap.cpp index 84542ae7a5..c2413f7fdb 100644 --- a/wxPython/src/gtk/html_wrap.cpp +++ b/wxPython/src/gtk/html_wrap.cpp @@ -282,15 +282,10 @@ static swig_type_info *swig_types[52]; #include - DECLARE_DEF_STRING(EmptyString); - static const wxChar* wxHtmlWindowNameStr = wxT("htmlWindow"); - DECLARE_DEF_STRING(HtmlWindowNameStr); - static const wxChar* wxHtmlPrintoutTitleStr = wxT("Printout"); - DECLARE_DEF_STRING(HtmlPrintoutTitleStr); - static const wxChar* wxHtmlPrintingTitleStr = wxT("Printing"); - DECLARE_DEF_STRING(HtmlPrintingTitleStr); - - + static const wxString wxPyEmptyString(wxEmptyString); + static const wxString wxPyHtmlWindowNameStr(wxT("htmlWindow")); + static const wxString wxPyHtmlPrintoutTitleStr(wxT("Printout")); + static const wxString wxPyHtmlPrintingTitleStr(wxT("Printing")); void wxHtmlWinParser_SetFonts(wxHtmlWinParser *self,wxString normal_face,wxString fixed_face,PyObject *sizes){ int* temp = NULL; if (sizes) temp = int_LIST_helper(sizes); @@ -598,6 +593,66 @@ wxHtmlBookRecord *wxHtmlContentsItem_GetBook(wxHtmlContentsItem *self){ return s #ifdef __cplusplus extern "C" { #endif +static int _wrap_HtmlWindowNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable HtmlWindowNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_HtmlWindowNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyHtmlWindowNameStr)->c_str(), (&wxPyHtmlWindowNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyHtmlWindowNameStr)->c_str(), (&wxPyHtmlWindowNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_HtmlPrintoutTitleStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable HtmlPrintoutTitleStr is read-only."); + return 1; +} + + +static PyObject *_wrap_HtmlPrintoutTitleStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyHtmlPrintoutTitleStr)->c_str(), (&wxPyHtmlPrintoutTitleStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyHtmlPrintoutTitleStr)->c_str(), (&wxPyHtmlPrintoutTitleStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_HtmlPrintingTitleStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable HtmlPrintingTitleStr is read-only."); + return 1; +} + + +static PyObject *_wrap_HtmlPrintingTitleStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyHtmlPrintingTitleStr)->c_str(), (&wxPyHtmlPrintingTitleStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyHtmlPrintingTitleStr)->c_str(), (&wxPyHtmlPrintingTitleStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_HtmlLinkInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxString *arg1 = 0 ; @@ -10725,6 +10780,10 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"HtmlWindowNameStr",_wrap_HtmlWindowNameStr_get, _wrap_HtmlWindowNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"HtmlPrintoutTitleStr",_wrap_HtmlPrintoutTitleStr_get, _wrap_HtmlPrintoutTitleStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"HtmlPrintingTitleStr",_wrap_HtmlPrintingTitleStr_get, _wrap_HtmlPrintingTitleStr_set); wxPyPtrTypeMap_Add("wxHtmlTagHandler", "wxPyHtmlTagHandler"); wxPyPtrTypeMap_Add("wxHtmlWinTagHandler", "wxPyHtmlWinTagHandler"); diff --git a/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py index 2dc11f9765..18c0553f9d 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -350,12 +350,12 @@ def Trap(*args, **kwargs): def FileSelector(*args, **kwargs): """ - FileSelector(String message=wxPyFileSelectorPromptStr, String default_path=EmptyString, + FileSelector(String message=FileSelectorPromptStr, String default_path=EmptyString, String default_filename=EmptyString, String default_extension=EmptyString, - String wildcard=wxPyFileSelectorDefaultWildcardStr, - int flags=0, Window parent=None, - int x=-1, int y=-1) -> String + String wildcard=FileSelectorDefaultWildcardStr, + int flags=0, Window parent=None, int x=-1, + int y=-1) -> String """ return _misc.FileSelector(*args, **kwargs) @@ -375,7 +375,7 @@ def SaveFileSelector(*args, **kwargs): def DirSelector(*args, **kwargs): """ - DirSelector(String message=wxPyDirSelectorPromptStr, String defaultPath=EmptyString, + DirSelector(String message=DirSelectorPromptStr, String defaultPath=EmptyString, long style=DD_DEFAULT_STYLE, Point pos=DefaultPosition, Window parent=None) -> String """ @@ -521,6 +521,10 @@ class MutexGuiLockerPtr(MutexGuiLocker): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MutexGuiLocker _misc.MutexGuiLocker_swigregister(MutexGuiLockerPtr) +cvar = _misc.cvar +FileSelectorPromptStr = cvar.FileSelectorPromptStr +FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr +DirSelectorPromptStr = cvar.DirSelectorPromptStr def Thread_IsMain(*args, **kwargs): @@ -2158,7 +2162,7 @@ class FileType(object): return _misc.FileType_GetExtensions(*args, **kwargs) def GetIcon(*args, **kwargs): - """GetIcon() -> wxIcon""" + """GetIcon() -> Icon""" return _misc.FileType_GetIcon(*args, **kwargs) def GetIconInfo(*args, **kwargs): @@ -2277,7 +2281,6 @@ class MimeTypesManagerPtr(MimeTypesManager): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MimeTypesManager _misc.MimeTypesManager_swigregister(MimeTypesManagerPtr) -cvar = _misc.cvar TheMimeTypesManager = cvar.TheMimeTypesManager def MimeTypesManager_IsOfType(*args, **kwargs): @@ -2341,7 +2344,7 @@ class ArtProvider(object): GetBitmap = staticmethod(GetBitmap) def GetIcon(*args, **kwargs): """ - ArtProvider.GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> wxIcon + ArtProvider.GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon Query the providers for icon with given ID and return it. Return wx.NullIcon if no provider provides it. @@ -2435,7 +2438,7 @@ def ArtProvider_GetBitmap(*args, **kwargs): def ArtProvider_GetIcon(*args, **kwargs): """ - ArtProvider_GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> wxIcon + ArtProvider_GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon Query the providers for icon with given ID and return it. Return wx.NullIcon if no provider provides it. @@ -3332,7 +3335,7 @@ class DateTime(object): return _misc.DateTime_ParseRfc822Date(*args, **kwargs) def ParseFormat(*args, **kwargs): - """ParseFormat(String date, String format=wxPyDateFormatStr, DateTime dateDef=wxDefaultDateTime) -> int""" + """ParseFormat(String date, String format=DateFormatStr, DateTime dateDef=wxDefaultDateTime) -> int""" return _misc.DateTime_ParseFormat(*args, **kwargs) def ParseDateTime(*args, **kwargs): @@ -3348,7 +3351,7 @@ class DateTime(object): return _misc.DateTime_ParseTime(*args, **kwargs) def Format(*args, **kwargs): - """Format(String format=wxPyDateFormatStr, wxDateTime::TimeZone tz=LOCAL_TZ) -> String""" + """Format(String format=DateFormatStr, wxDateTime::TimeZone tz=LOCAL_TZ) -> String""" return _misc.DateTime_Format(*args, **kwargs) def FormatDate(*args, **kwargs): @@ -3379,6 +3382,8 @@ class DateTimePtr(DateTime): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = DateTime _misc.DateTime_swigregister(DateTimePtr) +DateFormatStr = cvar.DateFormatStr +TimeSpanFormatStr = cvar.TimeSpanFormatStr def DateTime_SetCountry(*args, **kwargs): """DateTime_SetCountry(int country)""" @@ -3677,7 +3682,7 @@ class TimeSpan(object): return _misc.TimeSpan_GetMilliseconds(*args, **kwargs) def Format(*args, **kwargs): - """Format(String format=wxPyTimeSpanFormatStr) -> String""" + """Format(String format=TimeSpanFormatStr) -> String""" return _misc.TimeSpan_Format(*args, **kwargs) def __repr__(self): @@ -4354,8 +4359,8 @@ class DropSource(object): return "<%s.%s; proxy of C++ wxPyDropSource instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window win=None, wxIcon copy=wxNullIcon, wxIcon move=wxNullIcon, - wxIcon none=wxNullIcon) -> DropSource + __init__(Window win=None, Icon copy=wxNullIcon, Icon move=wxNullIcon, + Icon none=wxNullIcon) -> DropSource """ newobj = _misc.new_DropSource(*args, **kwargs) self.this = newobj.this diff --git a/wxPython/src/gtk/misc_wrap.cpp b/wxPython/src/gtk/misc_wrap.cpp index 76811cd207..3e8cc2dc38 100644 --- a/wxPython/src/gtk/misc_wrap.cpp +++ b/wxPython/src/gtk/misc_wrap.cpp @@ -307,16 +307,13 @@ static swig_type_info *swig_types[83]; #include "wx/wxPython/pyclasses.h" #include "wx/wxPython/pyistream.h" - DECLARE_DEF_STRING(EmptyString); - - - + static const wxString wxPyEmptyString(wxEmptyString); - DECLARE_DEF_STRING(FileSelectorPromptStr); - DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr); - DECLARE_DEF_STRING(DirSelectorPromptStr); + static const wxString wxPyFileSelectorPromptStr(wxFileSelectorPromptStr); + static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr); + static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -845,10 +842,9 @@ bool wxConfigBase_ReadBool(wxConfigBase *self,wxString const &key,bool defaultVa #include - DECLARE_DEF_STRING2(DateFormatStr, wxT("%c")); - DECLARE_DEF_STRING2(TimeSpanFormatStr, wxT("%H:%M:%S")); - + static const wxString wxPyDateFormatStr(wxT(wxT("%c"))); + static const wxString wxPyTimeSpanFormatStr(wxT(wxT("%H:%M:%S"))); #define LOCAL_TZ wxDateTime::Local @@ -1523,6 +1519,66 @@ static PyObject * SystemOptions_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_FileSelectorPromptStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable FileSelectorPromptStr is read-only."); + return 1; +} + + +static PyObject *_wrap_FileSelectorPromptStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_FileSelectorDefaultWildcardStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable FileSelectorDefaultWildcardStr is read-only."); + return 1; +} + + +static PyObject *_wrap_FileSelectorDefaultWildcardStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_DirSelectorPromptStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DirSelectorPromptStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DirSelectorPromptStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; long result; @@ -15158,6 +15214,46 @@ static PyObject *_wrap_ExpandEnvVars(PyObject *self, PyObject *args, PyObject *k } +static int _wrap_DateFormatStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DateFormatStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DateFormatStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDateFormatStr)->c_str(), (&wxPyDateFormatStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDateFormatStr)->c_str(), (&wxPyDateFormatStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_TimeSpanFormatStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable TimeSpanFormatStr is read-only."); + return 1; +} + + +static PyObject *_wrap_TimeSpanFormatStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyTimeSpanFormatStr)->c_str(), (&wxPyTimeSpanFormatStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyTimeSpanFormatStr)->c_str(), (&wxPyTimeSpanFormatStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_DateTime_SetCountry(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int arg1 ; @@ -26249,6 +26345,10 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorPromptStr",_wrap_FileSelectorPromptStr_get, _wrap_FileSelectorPromptStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorDefaultWildcardStr",_wrap_FileSelectorDefaultWildcardStr_get, _wrap_FileSelectorDefaultWildcardStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"DirSelectorPromptStr",_wrap_DirSelectorPromptStr_get, _wrap_DirSelectorPromptStr_set); PyDict_SetItemString(d, "wxEVT_TIMER", PyInt_FromLong(wxEVT_TIMER)); PyDict_SetItemString(d, "wxEVT_END_PROCESS", PyInt_FromLong(wxEVT_END_PROCESS)); @@ -26258,7 +26358,6 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_JOY_BUTTON_UP", PyInt_FromLong(wxEVT_JOY_BUTTON_UP)); PyDict_SetItemString(d, "wxEVT_JOY_MOVE", PyInt_FromLong(wxEVT_JOY_MOVE)); PyDict_SetItemString(d, "wxEVT_JOY_ZMOVE", PyInt_FromLong(wxEVT_JOY_ZMOVE)); - PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,(char*)"TheMimeTypesManager",_wrap_TheMimeTypesManager_get, _wrap_TheMimeTypesManager_set); SWIG_addvarlink(SWIG_globals,(char*)"ART_TOOLBAR",_wrap_ART_TOOLBAR_get, _wrap_ART_TOOLBAR_set); SWIG_addvarlink(SWIG_globals,(char*)"ART_MENU",_wrap_ART_MENU_get, _wrap_ART_MENU_set); @@ -26301,6 +26400,8 @@ SWIGEXPORT(void) SWIG_init(void) { wxPyPtrTypeMap_Add("wxArtProvider", "wxPyArtProvider"); + SWIG_addvarlink(SWIG_globals,(char*)"DateFormatStr",_wrap_DateFormatStr_get, _wrap_DateFormatStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"TimeSpanFormatStr",_wrap_TimeSpanFormatStr_get, _wrap_TimeSpanFormatStr_set); SWIG_addvarlink(SWIG_globals,(char*)"FormatInvalid",_wrap_FormatInvalid_get, _wrap_FormatInvalid_set); wxPyPtrTypeMap_Add("wxDropSource", "wxPyDropSource"); diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 53fe632613..aaaa0903a9 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -210,11 +210,11 @@ class TopLevelWindow(core.Window): return _windows.TopLevelWindow_IsIconized(*args, **kwargs) def GetIcon(*args, **kwargs): - """GetIcon() -> wxIcon""" + """GetIcon() -> Icon""" return _windows.TopLevelWindow_GetIcon(*args, **kwargs) def SetIcon(*args, **kwargs): - """SetIcon(wxIcon icon)""" + """SetIcon(Icon icon)""" return _windows.TopLevelWindow_SetIcon(*args, **kwargs) def SetIcons(*args, **kwargs): @@ -248,6 +248,11 @@ class TopLevelWindowPtr(TopLevelWindow): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = TopLevelWindow _windows.TopLevelWindow_swigregister(TopLevelWindowPtr) +cvar = _windows.cvar +FrameNameStr = cvar.FrameNameStr +DialogNameStr = cvar.DialogNameStr +StatusLineNameStr = cvar.StatusLineNameStr +ToolBarNameStr = cvar.ToolBarNameStr #--------------------------------------------------------------------------- @@ -258,7 +263,7 @@ class Frame(TopLevelWindow): """ __init__(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=wxPyFrameNameStr) -> Frame + String name=FrameNameStr) -> Frame """ newobj = _windows.new_Frame(*args, **kwargs) self.this = newobj.this @@ -270,7 +275,7 @@ class Frame(TopLevelWindow): """ Create(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=wxPyFrameNameStr) -> bool + String name=FrameNameStr) -> bool """ return _windows.Frame_Create(*args, **kwargs) @@ -298,7 +303,7 @@ class Frame(TopLevelWindow): def CreateStatusBar(*args, **kwargs): """ CreateStatusBar(int number=1, long style=ST_SIZEGRIP, int winid=0, - String name=wxPyStatusLineNameStr) -> StatusBar + String name=StatusLineNameStr) -> StatusBar """ return _windows.Frame_CreateStatusBar(*args, **kwargs) @@ -335,7 +340,7 @@ class Frame(TopLevelWindow): return _windows.Frame_GetStatusBarPane(*args, **kwargs) def CreateToolBar(*args, **kwargs): - """CreateToolBar(long style=-1, int winid=-1, String name=wxPyToolBarNameStr) -> wxToolBar""" + """CreateToolBar(long style=-1, int winid=-1, String name=ToolBarNameStr) -> wxToolBar""" return _windows.Frame_CreateToolBar(*args, **kwargs) def GetToolBar(*args, **kwargs): @@ -377,7 +382,7 @@ class Dialog(TopLevelWindow): """ __init__(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=wxPyDialogNameStr) -> Dialog + String name=DialogNameStr) -> Dialog """ newobj = _windows.new_Dialog(*args, **kwargs) self.this = newobj.this @@ -389,7 +394,7 @@ class Dialog(TopLevelWindow): """ Create(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=wxPyDialogNameStr) -> bool + String name=DialogNameStr) -> bool """ return _windows.Dialog_Create(*args, **kwargs) @@ -452,7 +457,7 @@ class MiniFrame(Frame): """ __init__(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=wxPyFrameNameStr) -> MiniFrame + String name=FrameNameStr) -> MiniFrame """ newobj = _windows.new_MiniFrame(*args, **kwargs) self.this = newobj.this @@ -464,7 +469,7 @@ class MiniFrame(Frame): """ Create(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=wxPyFrameNameStr) -> bool + String name=FrameNameStr) -> bool """ return _windows.MiniFrame_Create(*args, **kwargs) @@ -560,7 +565,7 @@ class StatusBar(core.Window): def __repr__(self): return "<%s.%s; proxy of C++ wxStatusBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(Window parent, int id=-1, long style=ST_SIZEGRIP, String name=wxPyStatusLineNameStr) -> StatusBar""" + """__init__(Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> StatusBar""" newobj = _windows.new_StatusBar(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -568,7 +573,7 @@ class StatusBar(core.Window): self._setOORInfo(self) def Create(*args, **kwargs): - """Create(Window parent, int id, long style=ST_SIZEGRIP, String name=wxPyStatusLineNameStr) -> bool""" + """Create(Window parent, int id, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" return _windows.StatusBar_Create(*args, **kwargs) def SetFieldsCount(*args, **kwargs): @@ -650,7 +655,7 @@ class SplitterWindow(core.Window): def __init__(self, *args, **kwargs): """ __init__(Window parent, int id, Point point=DefaultPosition, - Size size=DefaultSize, long style=SP_3D, String name=wxPySplitterNameStr) -> SplitterWindow + Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> SplitterWindow """ newobj = _windows.new_SplitterWindow(*args, **kwargs) self.this = newobj.this @@ -661,7 +666,7 @@ class SplitterWindow(core.Window): def Create(*args, **kwargs): """ Create(Window parent, int id, Point point=DefaultPosition, - Size size=DefaultSize, long style=SP_3D, String name=wxPySplitterNameStr) -> bool + Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> bool """ return _windows.SplitterWindow_Create(*args, **kwargs) @@ -760,6 +765,7 @@ class SplitterWindowPtr(SplitterWindow): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = SplitterWindow _windows.SplitterWindow_swigregister(SplitterWindowPtr) +SplitterNameStr = cvar.SplitterNameStr def PreSplitterWindow(*args, **kwargs): """PreSplitterWindow() -> SplitterWindow""" @@ -835,7 +841,7 @@ class SashWindow(core.Window): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, - String name=wxPySashNameStr) -> SashWindow + String name=SashNameStr) -> SashWindow """ newobj = _windows.new_SashWindow(*args, **kwargs) self.this = newobj.this @@ -847,7 +853,7 @@ class SashWindow(core.Window): """ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, - String name=wxPySashNameStr) -> bool + String name=SashNameStr) -> bool """ return _windows.SashWindow_Create(*args, **kwargs) @@ -934,6 +940,8 @@ class SashWindowPtr(SashWindow): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = SashWindow _windows.SashWindow_swigregister(SashWindowPtr) +SashNameStr = cvar.SashNameStr +SashLayoutNameStr = cvar.SashLayoutNameStr def PreSashWindow(*args, **kwargs): """PreSashWindow() -> SashWindow""" @@ -1103,7 +1111,7 @@ class SashLayoutWindow(SashWindow): """ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, - String name=wxPySashLayoutNameStr) -> SashLayoutWindow + String name=SashLayoutNameStr) -> SashLayoutWindow """ newobj = _windows.new_SashLayoutWindow(*args, **kwargs) self.this = newobj.this @@ -1115,7 +1123,7 @@ class SashLayoutWindow(SashWindow): """ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, - String name=wxPySashLayoutNameStr) -> bool + String name=SashLayoutNameStr) -> bool """ return _windows.SashLayoutWindow_Create(*args, **kwargs) @@ -1390,7 +1398,7 @@ class VListBox(VScrolledWindow): def __init__(self, *args, **kwargs): """ __init__(Window parent, int id=ID_ANY, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, String name=wxPyVListBoxNameStr) -> VListBox + Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> VListBox """ newobj = _windows.new_VListBox(*args, **kwargs) self.this = newobj.this @@ -1405,7 +1413,7 @@ class VListBox(VScrolledWindow): def Create(*args, **kwargs): """ Create(Window parent, int id=ID_ANY, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, String name=wxPyVListBoxNameStr) -> bool + Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> bool """ return _windows.VListBox_Create(*args, **kwargs) @@ -1500,6 +1508,7 @@ class VListBoxPtr(VListBox): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = VListBox _windows.VListBox_swigregister(VListBoxPtr) +VListBoxNameStr = cvar.VListBoxNameStr def PreVListBox(*args, **kwargs): """PreVListBox() -> VListBox""" @@ -1513,7 +1522,7 @@ class HtmlListBox(VListBox): def __init__(self, *args, **kwargs): """ __init__(Window parent, int id=ID_ANY, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, String name=wxPyVListBoxNameStr) -> HtmlListBox + Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> HtmlListBox """ newobj = _windows.new_HtmlListBox(*args, **kwargs) self.this = newobj.this @@ -1528,7 +1537,7 @@ class HtmlListBox(VListBox): def Create(*args, **kwargs): """ Create(Window parent, int id=ID_ANY, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, String name=wxPyVListBoxNameStr) -> bool + Size size=DefaultSize, long style=0, String name=VListBoxNameStr) -> bool """ return _windows.HtmlListBox_Create(*args, **kwargs) @@ -1580,7 +1589,7 @@ class TaskBarIcon(core.EvtHandler): return _windows.TaskBarIcon_IsIconInstalled(*args, **kwargs) def SetIcon(*args, **kwargs): - """SetIcon(wxIcon icon, String tooltip=EmptyString) -> bool""" + """SetIcon(Icon icon, String tooltip=EmptyString) -> bool""" return _windows.TaskBarIcon_SetIcon(*args, **kwargs) def RemoveIcon(*args, **kwargs): @@ -1679,6 +1688,12 @@ class ColourDataPtr(ColourData): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ColourData _windows.ColourData_swigregister(ColourDataPtr) +FileSelectorPromptStr = cvar.FileSelectorPromptStr +DirSelectorPromptStr = cvar.DirSelectorPromptStr +DirDialogNameStr = cvar.DirDialogNameStr +FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr +GetTextFromUserPromptStr = cvar.GetTextFromUserPromptStr +MessageBoxCaptionStr = cvar.MessageBoxCaptionStr class ColourDialog(Dialog): def __repr__(self): @@ -1712,10 +1727,10 @@ class DirDialog(Dialog): return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, String message=wxPyDirSelectorPromptStr, + __init__(Window parent, String message=DirSelectorPromptStr, String defaultPath=EmptyString, long style=0, Point pos=DefaultPosition, Size size=DefaultSize, - String name=wxPyDirDialogNameStr) -> DirDialog + String name=DirDialogNameStr) -> DirDialog """ newobj = _windows.new_DirDialog(*args, **kwargs) self.this = newobj.this @@ -1760,11 +1775,10 @@ class FileDialog(Dialog): return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, String message=wxPyFileSelectorPromptStr, + __init__(Window parent, String message=FileSelectorPromptStr, String defaultDir=EmptyString, String defaultFile=EmptyString, - String wildcard=wxPyFileSelectorDefaultWildcardStr, - long style=0, - Point pos=DefaultPosition) -> FileDialog + String wildcard=FileSelectorDefaultWildcardStr, + long style=0, Point pos=DefaultPosition) -> FileDialog """ newobj = _windows.new_FileDialog(*args, **kwargs) self.this = newobj.this @@ -1920,10 +1934,9 @@ class TextEntryDialog(Dialog): return "<%s.%s; proxy of C++ wxTextEntryDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, String message, String caption=wxPyGetTextFromUserPromptStr, + __init__(Window parent, String message, String caption=GetTextFromUserPromptStr, String defaultValue=EmptyString, - long style=wxOK|wxCANCEL|wxCENTRE, - Point pos=DefaultPosition) -> TextEntryDialog + long style=wxOK|wxCANCEL|wxCENTRE, Point pos=DefaultPosition) -> TextEntryDialog """ newobj = _windows.new_TextEntryDialog(*args, **kwargs) self.this = newobj.this @@ -2058,7 +2071,7 @@ class MessageDialog(Dialog): return "<%s.%s; proxy of C++ wxMessageDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, String message, String caption=wxPyMessageBoxCaptionStr, + __init__(Window parent, String message, String caption=MessageBoxCaptionStr, long style=wxOK|wxCANCEL|wxCENTRE, Point pos=DefaultPosition) -> MessageDialog """ @@ -2287,7 +2300,7 @@ class MDIParentFrame(Frame): """ __init__(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, - String name=wxPyFrameNameStr) -> MDIParentFrame + String name=FrameNameStr) -> MDIParentFrame """ newobj = _windows.new_MDIParentFrame(*args, **kwargs) self.this = newobj.this @@ -2299,7 +2312,7 @@ class MDIParentFrame(Frame): """ Create(Window parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, - String name=wxPyFrameNameStr) -> bool + String name=FrameNameStr) -> bool """ return _windows.MDIParentFrame_Create(*args, **kwargs) @@ -2356,7 +2369,7 @@ class MDIChildFrame(Frame): """ __init__(MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=wxPyFrameNameStr) -> MDIChildFrame + String name=FrameNameStr) -> MDIChildFrame """ newobj = _windows.new_MDIChildFrame(*args, **kwargs) self.this = newobj.this @@ -2368,7 +2381,7 @@ class MDIChildFrame(Frame): """ Create(MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=wxPyFrameNameStr) -> bool + String name=FrameNameStr) -> bool """ return _windows.MDIChildFrame_Create(*args, **kwargs) @@ -2683,7 +2696,7 @@ class PrintData(core.Object): return _windows.PrintData_GetPaperSize(*args, **kwargs) def GetQuality(*args, **kwargs): - """GetQuality() -> wxPrintQuality""" + """GetQuality() -> int""" return _windows.PrintData_GetQuality(*args, **kwargs) def SetNoCopies(*args, **kwargs): @@ -2719,7 +2732,7 @@ class PrintData(core.Object): return _windows.PrintData_SetPaperSize(*args, **kwargs) def SetQuality(*args, **kwargs): - """SetQuality(wxPrintQuality quality)""" + """SetQuality(int quality)""" return _windows.PrintData_SetQuality(*args, **kwargs) def GetPrinterCommand(*args, **kwargs): @@ -2818,6 +2831,8 @@ class PrintDataPtr(PrintData): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = PrintData _windows.PrintData_swigregister(PrintDataPtr) +PrintoutTitleStr = cvar.PrintoutTitleStr +PreviewCanvasNameStr = cvar.PreviewCanvasNameStr class PageSetupDialogData(core.Object): def __repr__(self): @@ -3232,7 +3247,7 @@ class Printout(core.Object): def __repr__(self): return "<%s.%s; proxy of C++ wxPyPrintout instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(String title=wxPyPrintoutTitleStr) -> Printout""" + """__init__(String title=PrintoutTitleStr) -> Printout""" newobj = _windows.new_Printout(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -3338,7 +3353,7 @@ class PreviewCanvas(ScrolledWindow): """ __init__(PrintPreview preview, Window parent, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, - String name=wxPyPreviewCanvasNameStr) -> PreviewCanvas + String name=PreviewCanvasNameStr) -> PreviewCanvas """ newobj = _windows.new_PreviewCanvas(*args, **kwargs) self.this = newobj.this @@ -3361,7 +3376,7 @@ class PreviewFrame(Frame): """ __init__(PrintPreview preview, Frame parent, String title, Point pos=DefaultPosition, Size size=DefaultSize, - long style=DEFAULT_FRAME_STYLE, String name=wxPyFrameNameStr) -> PreviewFrame + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> PreviewFrame """ newobj = _windows.new_PreviewFrame(*args, **kwargs) self.this = newobj.this @@ -3628,7 +3643,7 @@ class PyPreviewFrame(PreviewFrame): """ __init__(PrintPreview preview, Frame parent, String title, Point pos=DefaultPosition, Size size=DefaultSize, - long style=DEFAULT_FRAME_STYLE, String name=wxPyFrameNameStr) -> PyPreviewFrame + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> PyPreviewFrame """ newobj = _windows.new_PyPreviewFrame(*args, **kwargs) self.this = newobj.this diff --git a/wxPython/src/gtk/windows_wrap.cpp b/wxPython/src/gtk/windows_wrap.cpp index 7a1bb8fb19..6704d67cfb 100644 --- a/wxPython/src/gtk/windows_wrap.cpp +++ b/wxPython/src/gtk/windows_wrap.cpp @@ -285,14 +285,13 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_wxPrintDialog swig_types[73] #define SWIGTYPE_p_wxBitmap swig_types[74] #define SWIGTYPE_p_wxCommandEvent swig_types[75] -#define SWIGTYPE_p_wxPrintQuality swig_types[76] -#define SWIGTYPE_p_wxPreviewControlBar swig_types[77] -#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[78] -#define SWIGTYPE_p_wxColour swig_types[79] -#define SWIGTYPE_p_wxToolBar swig_types[80] +#define SWIGTYPE_p_wxPreviewControlBar swig_types[76] +#define SWIGTYPE_p_wxPyPreviewControlBar swig_types[77] +#define SWIGTYPE_p_wxColour swig_types[78] +#define SWIGTYPE_p_wxToolBar swig_types[79] +#define SWIGTYPE_p_wxPrintDialogData swig_types[80] #define SWIGTYPE_p_wxPageSetupDialogData swig_types[81] -#define SWIGTYPE_p_wxPrintDialogData swig_types[82] -static swig_type_info *swig_types[84]; +static swig_type_info *swig_types[83]; /* -------- TYPES TABLE (END) -------- */ @@ -307,10 +306,9 @@ static swig_type_info *swig_types[84]; #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - DECLARE_DEF_STRING(PanelNameStr); - DECLARE_DEF_STRING(EmptyString); - + static const wxString wxPyEmptyString(wxEmptyString); + static const wxString wxPyPanelNameStr(wxPanelNameStr); @@ -340,13 +338,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } - - // Put some wx default wxChar* values into wxStrings. - DECLARE_DEF_STRING(FrameNameStr); - DECLARE_DEF_STRING(DialogNameStr); - DECLARE_DEF_STRING(StatusLineNameStr); - DECLARE_DEF_STRING(ToolBarNameStr); - + static const wxString wxPyFrameNameStr(wxFrameNameStr); + static const wxString wxPyDialogNameStr(wxDialogNameStr); + static const wxString wxPyStatusLineNameStr(wxStatusLineNameStr); + static const wxString wxPyToolBarNameStr(wxToolBarNameStr); bool wxDialog_IsModalShowing(wxDialog *self){ return self->m_modalShowing; @@ -361,16 +356,9 @@ wxRect wxStatusBar_GetFieldRect(wxStatusBar *self,int i){ self->GetFieldRect(i, r); return r; } - - static const wxChar* wxSplitterNameStr = wxT("splitter"); - DECLARE_DEF_STRING(SplitterNameStr); - - - static const wxChar* wxSashNameStr = wxT("sashWindow"); - DECLARE_DEF_STRING(SashNameStr); - static const wxChar* wxSashLayoutNameStr = wxT("layoutWindow"); - DECLARE_DEF_STRING(SashLayoutNameStr); - + static const wxString wxPySplitterNameStr(wxT(wxT("splitter"))); + static const wxString wxPySashNameStr(wxT(wxT("sashWindow"))); + static const wxString wxPySashLayoutNameStr(wxT(wxT("layoutWindow"))); #include @@ -480,8 +468,8 @@ IMP_PYCALLBACK_COORD_const (wxPyVScrolledWindow, wxVScrolledWindow, Est #include -DECLARE_DEF_STRING(VListBoxNameStr); + static const wxString wxPyVListBoxNameStr(wxVListBoxNameStr); class wxPyVListBox : public wxVListBox { @@ -628,16 +616,12 @@ enum { }; #endif - - - DECLARE_DEF_STRING(FileSelectorPromptStr); - DECLARE_DEF_STRING(DirSelectorPromptStr); - DECLARE_DEF_STRING(DirDialogNameStr); - DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr); - DECLARE_DEF_STRING(GetTextFromUserPromptStr); - DECLARE_DEF_STRING(MessageBoxCaptionStr); - - + static const wxString wxPyFileSelectorPromptStr(wxFileSelectorPromptStr); + static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); + static const wxString wxPyDirDialogNameStr(wxDirDialogNameStr); + static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr); + static const wxString wxPyGetTextFromUserPromptStr(wxGetTextFromUserPromptStr); + static const wxString wxPyMessageBoxCaptionStr(wxMessageBoxCaptionStr); PyObject *wxFileDialog_GetFilenames(wxFileDialog *self){ wxArrayString arr; self->GetFilenames(arr); @@ -797,12 +781,9 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild); #include "wx/wxPython/printfw.h" - static const wxChar* wxPrintoutTitleStr = wxT("Printout"); - DECLARE_DEF_STRING(PrintoutTitleStr); - static const wxChar* wxPreviewCanvasNameStr = wxT("previewcanvas"); - DECLARE_DEF_STRING(PreviewCanvasNameStr); - + static const wxString wxPyPrintoutTitleStr(wxT(wxT("Printout"))); + static const wxString wxPyPreviewCanvasNameStr(wxT(wxT("previewcanvas"))); @@ -2036,6 +2017,86 @@ static PyObject * ScrolledWindow_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_FrameNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable FrameNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_FrameNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyFrameNameStr)->c_str(), (&wxPyFrameNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyFrameNameStr)->c_str(), (&wxPyFrameNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_DialogNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DialogNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DialogNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDialogNameStr)->c_str(), (&wxPyDialogNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDialogNameStr)->c_str(), (&wxPyDialogNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_StatusLineNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable StatusLineNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_StatusLineNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyStatusLineNameStr)->c_str(), (&wxPyStatusLineNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyStatusLineNameStr)->c_str(), (&wxPyStatusLineNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_ToolBarNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable ToolBarNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_ToolBarNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyToolBarNameStr)->c_str(), (&wxPyToolBarNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyToolBarNameStr)->c_str(), (&wxPyToolBarNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_TopLevelWindow_Maximize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ; @@ -4585,6 +4646,26 @@ static PyObject * StatusBar_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_SplitterNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SplitterNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_SplitterNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySplitterNameStr)->c_str(), (&wxPySplitterNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySplitterNameStr)->c_str(), (&wxPySplitterNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_SplitterWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -5503,6 +5584,46 @@ static PyObject * SplitterEvent_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_SashNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SashNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_SashNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySashNameStr)->c_str(), (&wxPySashNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySashNameStr)->c_str(), (&wxPySashNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_SashLayoutNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable SashLayoutNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_SashLayoutNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPySashLayoutNameStr)->c_str(), (&wxPySashLayoutNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPySashLayoutNameStr)->c_str(), (&wxPySashLayoutNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_SashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -8142,6 +8263,26 @@ static PyObject * VScrolledWindow_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_VListBoxNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable VListBoxNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_VListBoxNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyVListBoxNameStr)->c_str(), (&wxPyVListBoxNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyVListBoxNameStr)->c_str(), (&wxPyVListBoxNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_VListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -9409,6 +9550,126 @@ static PyObject * TaskBarIconEvent_swigregister(PyObject *self, PyObject *args) Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_FileSelectorPromptStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable FileSelectorPromptStr is read-only."); + return 1; +} + + +static PyObject *_wrap_FileSelectorPromptStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_DirSelectorPromptStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DirSelectorPromptStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DirSelectorPromptStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_DirDialogNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable DirDialogNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_DirDialogNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyDirDialogNameStr)->c_str(), (&wxPyDirDialogNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyDirDialogNameStr)->c_str(), (&wxPyDirDialogNameStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_FileSelectorDefaultWildcardStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable FileSelectorDefaultWildcardStr is read-only."); + return 1; +} + + +static PyObject *_wrap_FileSelectorDefaultWildcardStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_GetTextFromUserPromptStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable GetTextFromUserPromptStr is read-only."); + return 1; +} + + +static PyObject *_wrap_GetTextFromUserPromptStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyGetTextFromUserPromptStr)->c_str(), (&wxPyGetTextFromUserPromptStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyGetTextFromUserPromptStr)->c_str(), (&wxPyGetTextFromUserPromptStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_MessageBoxCaptionStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable MessageBoxCaptionStr is read-only."); + return 1; +} + + +static PyObject *_wrap_MessageBoxCaptionStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyMessageBoxCaptionStr)->c_str(), (&wxPyMessageBoxCaptionStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyMessageBoxCaptionStr)->c_str(), (&wxPyMessageBoxCaptionStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_ColourData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColourData *result; @@ -14609,6 +14870,46 @@ static PyObject * PyPanel_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } +static int _wrap_PrintoutTitleStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable PrintoutTitleStr is read-only."); + return 1; +} + + +static PyObject *_wrap_PrintoutTitleStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyPrintoutTitleStr)->c_str(), (&wxPyPrintoutTitleStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyPrintoutTitleStr)->c_str(), (&wxPyPrintoutTitleStr)->Len()); +#endif + } + return pyobj; +} + + +static int _wrap_PreviewCanvasNameStr_set(PyObject *_val) { + PyErr_SetString(PyExc_TypeError,"Variable PreviewCanvasNameStr is read-only."); + return 1; +} + + +static PyObject *_wrap_PreviewCanvasNameStr_get() { + PyObject *pyobj; + + { +#if wxUSE_UNICODE + pyobj = PyUnicode_FromWideChar((&wxPyPreviewCanvasNameStr)->c_str(), (&wxPyPreviewCanvasNameStr)->Len()); +#else + pyobj = PyString_FromStringAndSize((&wxPyPreviewCanvasNameStr)->c_str(), (&wxPyPreviewCanvasNameStr)->Len()); +#endif + } + return pyobj; +} + + static PyObject *_wrap_new_PrintData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPrintData *result; @@ -14895,7 +15196,7 @@ static PyObject *_wrap_PrintData_GetPaperSize(PyObject *self, PyObject *args, Py static PyObject *_wrap_PrintData_GetQuality(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPrintData *arg1 = (wxPrintData *) 0 ; - wxPrintQuality result; + int result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -14905,16 +15206,12 @@ static PyObject *_wrap_PrintData_GetQuality(PyObject *self, PyObject *args, PyOb if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->GetQuality(); + result = (int)(arg1)->GetQuality(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - { - wxPrintQuality * resultptr; - resultptr = new wxPrintQuality((wxPrintQuality &) result); - resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_wxPrintQuality, 1); - } + resultobj = PyInt_FromLong((long)result); return resultobj; fail: return NULL; @@ -15151,18 +15448,14 @@ static PyObject *_wrap_PrintData_SetPaperSize(PyObject *self, PyObject *args, Py static PyObject *_wrap_PrintData_SetQuality(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPrintData *arg1 = (wxPrintData *) 0 ; - wxPrintQuality arg2 ; - wxPrintQuality *argp2 ; + int arg2 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; char *kwnames[] = { (char *) "self",(char *) "quality", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetQuality",kwnames,&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:PrintData_SetQuality",kwnames,&obj0,&arg2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **) &argp2, SWIGTYPE_p_wxPrintQuality,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail; - arg2 = *argp2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetQuality(arg2); @@ -22369,13 +22662,12 @@ static swig_type_info _swigt__p_wxPanel[] = {{"_p_wxPanel", 0, "wxPanel *", 0},{ static swig_type_info _swigt__p_wxPrintDialog[] = {{"_p_wxPrintDialog", 0, "wxPrintDialog *", 0},{"_p_wxPrintDialog"},{0}}; static swig_type_info _swigt__p_wxBitmap[] = {{"_p_wxBitmap", 0, "wxBitmap *", 0},{"_p_wxBitmap"},{0}}; static swig_type_info _swigt__p_wxCommandEvent[] = {{"_p_wxCommandEvent", 0, "wxCommandEvent *", 0},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxCommandEvent},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxCommandEvent},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxCommandEvent},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxCommandEvent},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxCommandEvent},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxCommandEvent},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxCommandEvent},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxCommandEvent},{"_p_wxCommandEvent"},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxCommandEvent},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxCommandEvent},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxCommandEvent},{0}}; -static swig_type_info _swigt__p_wxPrintQuality[] = {{"_p_wxPrintQuality", 0, "wxPrintQuality *", 0},{"_p_wxPrintQuality"},{0}}; static swig_type_info _swigt__p_wxPreviewControlBar[] = {{"_p_wxPreviewControlBar", 0, "wxPreviewControlBar *", 0},{"_p_wxPreviewControlBar"},{"_p_wxPyPreviewControlBar", _p_wxPyPreviewControlBarTo_p_wxPreviewControlBar},{0}}; static swig_type_info _swigt__p_wxPyPreviewControlBar[] = {{"_p_wxPyPreviewControlBar", 0, "wxPyPreviewControlBar *", 0},{"_p_wxPyPreviewControlBar"},{0}}; static swig_type_info _swigt__p_wxColour[] = {{"_p_wxColour", 0, "wxColour *", 0},{"_p_wxColour"},{0}}; static swig_type_info _swigt__p_wxToolBar[] = {{"_p_wxToolBar", 0, "wxToolBar *", 0},{"_p_wxToolBar"},{0}}; -static swig_type_info _swigt__p_wxPageSetupDialogData[] = {{"_p_wxPageSetupDialogData", 0, "wxPageSetupDialogData *", 0},{"_p_wxPageSetupDialogData"},{0}}; static swig_type_info _swigt__p_wxPrintDialogData[] = {{"_p_wxPrintDialogData", 0, "wxPrintDialogData *", 0},{"_p_wxPrintDialogData"},{0}}; +static swig_type_info _swigt__p_wxPageSetupDialogData[] = {{"_p_wxPageSetupDialogData", 0, "wxPageSetupDialogData *", 0},{"_p_wxPageSetupDialogData"},{0}}; static swig_type_info *swig_types_initial[] = { _swigt__p_wxQueryLayoutInfoEvent, @@ -22454,13 +22746,12 @@ _swigt__p_wxPanel, _swigt__p_wxPrintDialog, _swigt__p_wxBitmap, _swigt__p_wxCommandEvent, -_swigt__p_wxPrintQuality, _swigt__p_wxPreviewControlBar, _swigt__p_wxPyPreviewControlBar, _swigt__p_wxColour, _swigt__p_wxToolBar, -_swigt__p_wxPageSetupDialogData, _swigt__p_wxPrintDialogData, +_swigt__p_wxPageSetupDialogData, 0 }; @@ -22603,13 +22894,22 @@ SWIGEXPORT(void) SWIG_init(void) { } SWIG_InstallConstants(d,swig_const_table); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals); + SWIG_addvarlink(SWIG_globals,(char*)"FrameNameStr",_wrap_FrameNameStr_get, _wrap_FrameNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"DialogNameStr",_wrap_DialogNameStr_get, _wrap_DialogNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"StatusLineNameStr",_wrap_StatusLineNameStr_get, _wrap_StatusLineNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"ToolBarNameStr",_wrap_ToolBarNameStr_get, _wrap_ToolBarNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"SplitterNameStr",_wrap_SplitterNameStr_get, _wrap_SplitterNameStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED", PyInt_FromLong(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED)); PyDict_SetItemString(d, "wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING", PyInt_FromLong(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING)); PyDict_SetItemString(d, "wxEVT_COMMAND_SPLITTER_DOUBLECLICKED", PyInt_FromLong(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)); PyDict_SetItemString(d, "wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong(wxEVT_COMMAND_SPLITTER_UNSPLIT)); + SWIG_addvarlink(SWIG_globals,(char*)"SashNameStr",_wrap_SashNameStr_get, _wrap_SashNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"SashLayoutNameStr",_wrap_SashLayoutNameStr_get, _wrap_SashLayoutNameStr_set); PyDict_SetItemString(d, "wxEVT_SASH_DRAGGED", PyInt_FromLong(wxEVT_SASH_DRAGGED)); PyDict_SetItemString(d, "wxEVT_QUERY_LAYOUT_INFO", PyInt_FromLong(wxEVT_QUERY_LAYOUT_INFO)); PyDict_SetItemString(d, "wxEVT_CALCULATE_LAYOUT", PyInt_FromLong(wxEVT_CALCULATE_LAYOUT)); + SWIG_addvarlink(SWIG_globals,(char*)"VListBoxNameStr",_wrap_VListBoxNameStr_get, _wrap_VListBoxNameStr_set); // Map renamed classes back to their common name for OOR wxPyPtrTypeMap_Add("wxHtmlListBox", "wxPyHtmlListBox"); @@ -22623,11 +22923,19 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_UP", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_UP)); PyDict_SetItemString(d, "wxEVT_TASKBAR_LEFT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_LEFT_DCLICK)); PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_DCLICK)); + SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorPromptStr",_wrap_FileSelectorPromptStr_get, _wrap_FileSelectorPromptStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"DirSelectorPromptStr",_wrap_DirSelectorPromptStr_get, _wrap_DirSelectorPromptStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"DirDialogNameStr",_wrap_DirDialogNameStr_get, _wrap_DirDialogNameStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorDefaultWildcardStr",_wrap_FileSelectorDefaultWildcardStr_get, _wrap_FileSelectorDefaultWildcardStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"GetTextFromUserPromptStr",_wrap_GetTextFromUserPromptStr_get, _wrap_GetTextFromUserPromptStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"MessageBoxCaptionStr",_wrap_MessageBoxCaptionStr_get, _wrap_MessageBoxCaptionStr_set); PyDict_SetItemString(d, "wxEVT_COMMAND_FIND", PyInt_FromLong(wxEVT_COMMAND_FIND)); PyDict_SetItemString(d, "wxEVT_COMMAND_FIND_NEXT", PyInt_FromLong(wxEVT_COMMAND_FIND_NEXT)); PyDict_SetItemString(d, "wxEVT_COMMAND_FIND_REPLACE", PyInt_FromLong(wxEVT_COMMAND_FIND_REPLACE)); PyDict_SetItemString(d, "wxEVT_COMMAND_FIND_REPLACE_ALL", PyInt_FromLong(wxEVT_COMMAND_FIND_REPLACE_ALL)); PyDict_SetItemString(d, "wxEVT_COMMAND_FIND_CLOSE", PyInt_FromLong(wxEVT_COMMAND_FIND_CLOSE)); + SWIG_addvarlink(SWIG_globals,(char*)"PrintoutTitleStr",_wrap_PrintoutTitleStr_get, _wrap_PrintoutTitleStr_set); + SWIG_addvarlink(SWIG_globals,(char*)"PreviewCanvasNameStr",_wrap_PreviewCanvasNameStr_get, _wrap_PreviewCanvasNameStr_set); wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout"); diff --git a/wxPython/src/gtk/wizard.py b/wxPython/src/gtk/wizard.py index 04629bb764..04d3225f77 100644 --- a/wxPython/src/gtk/wizard.py +++ b/wxPython/src/gtk/wizard.py @@ -236,7 +236,7 @@ class Wizard(windows.Dialog): return "<%s.%s; proxy of C++ wxWizard instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, int id=-1, String title=wxEmptyString, + __init__(Window parent, int id=-1, String title=EmptyString, Bitmap bitmap=wxNullBitmap, Point pos=DefaultPosition, long style=DEFAULT_DIALOG_STYLE) -> Wizard """ @@ -248,7 +248,7 @@ class Wizard(windows.Dialog): def Create(*args, **kwargs): """ - Create(Window parent, int id=-1, String title=wxEmptyString, + Create(Window parent, int id=-1, String title=EmptyString, Bitmap bitmap=wxNullBitmap, Point pos=DefaultPosition) -> bool """ return _wizard.Wizard_Create(*args, **kwargs) diff --git a/wxPython/src/gtk/wizard_wrap.cpp b/wxPython/src/gtk/wizard_wrap.cpp index 0e71e04262..8280099062 100644 --- a/wxPython/src/gtk/wizard_wrap.cpp +++ b/wxPython/src/gtk/wizard_wrap.cpp @@ -246,8 +246,8 @@ static swig_type_info *swig_types[20]; #include - static const wxString wxPyEmptyString(wxT("")); + static const wxString wxPyEmptyString(wxEmptyString); bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap,wxString const &resource){ wxChar* res = NULL; if (resource.Length()) @@ -1489,7 +1489,7 @@ static PyObject *_wrap_new_Wizard(PyObject *self, PyObject *args, PyObject *kwar PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 = (int) -1 ; - wxString const &arg3_defvalue = wxEmptyString ; + wxString const &arg3_defvalue = wxPyEmptyString ; wxString *arg3 = (wxString *) &arg3_defvalue ; wxBitmap const &arg4_defvalue = wxNullBitmap ; wxBitmap *arg4 = (wxBitmap *) &arg4_defvalue ; @@ -1577,7 +1577,7 @@ static PyObject *_wrap_Wizard_Create(PyObject *self, PyObject *args, PyObject *k wxWizard *arg1 = (wxWizard *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; int arg3 = (int) -1 ; - wxString const &arg4_defvalue = wxEmptyString ; + wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; wxBitmap const &arg5_defvalue = wxNullBitmap ; wxBitmap *arg5 = (wxBitmap *) &arg5_defvalue ; diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 970911807b..9b1efac4c7 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -23,17 +23,9 @@ #include #include - - DECLARE_DEF_STRING(EmptyString); - static const wxChar* wxHtmlWindowNameStr = wxT("htmlWindow"); - DECLARE_DEF_STRING(HtmlWindowNameStr); - static const wxChar* wxHtmlPrintoutTitleStr = wxT("Printout"); - DECLARE_DEF_STRING(HtmlPrintoutTitleStr); - static const wxChar* wxHtmlPrintingTitleStr = wxT("Printing"); - DECLARE_DEF_STRING(HtmlPrintingTitleStr); - %} + //--------------------------------------------------------------------------- %import windows.i @@ -42,6 +34,12 @@ %include _html_rename.i +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); +MAKE_CONST_WXSTRING2(HtmlWindowNameStr, "htmlWindow") +MAKE_CONST_WXSTRING2(HtmlPrintoutTitleStr, "Printout") +MAKE_CONST_WXSTRING2(HtmlPrintingTitleStr, "Printing") + + // TODO: Split this file into multiple %included files that coresponds to the // wx/html include files (more or less.) diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 7c91999f13..41ea0d02ed 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -20,8 +20,6 @@ #include "wx/wxPython/pyclasses.h" #include "wx/wxPython/pyistream.h" - DECLARE_DEF_STRING(EmptyString); - %} //--------------------------------------------------------------------------- @@ -32,6 +30,8 @@ %include _misc_rename.i +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); + // Include all the files that make up this module %include _settings.i diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index 8e5898332d..07ca2e32dc 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -373,6 +373,7 @@ %typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1); } %typemap(out) wxToolBarBase* { $result = wxPyMake_wxObject($1); } %typemap(out) wxTreeCtrl* { $result = wxPyMake_wxObject($1); } +%typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1); } %typemap(out) wxWindow* { $result = wxPyMake_wxObject($1); } %typemap(out) wxHtmlWindow* { $result = wxPyMake_wxObject($1); } %typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1); } diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 33e3d5dca1..4510c4f996 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -19,9 +19,6 @@ #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - DECLARE_DEF_STRING(PanelNameStr); - DECLARE_DEF_STRING(EmptyString); - %} //--------------------------------------------------------------------------- @@ -32,6 +29,10 @@ %include _windows_rename.i +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); +MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); + + // Include all the files that make up this module %include _panel.i %include _toplvl.i diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index b7e7653bbd..0eac0cdb21 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -19,7 +19,6 @@ #include - static const wxString wxPyEmptyString(wxT("")); %} //---------------------------------------------------------------------- @@ -29,6 +28,8 @@ %include _wizard_rename.i +MAKE_CONST_WXSTRING_NOSWIG(EmptyString); + //---------------------------------------------------------------------- enum { @@ -310,7 +311,7 @@ public: // ctor wxWizard(wxWindow *parent, int id = -1, - const wxString& title = wxEmptyString, + const wxString& title = wxPyEmptyString, const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE); @@ -318,7 +319,7 @@ public: bool Create(wxWindow *parent, int id = -1, - const wxString& title = wxEmptyString, + const wxString& title = wxPyEmptyString, const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition); diff --git a/wxPython/wxPython/calendar.py b/wxPython/wxPython/calendar.py index 51660af88a..a9d3af2401 100644 --- a/wxPython/wxPython/calendar.py +++ b/wxPython/wxPython/calendar.py @@ -46,6 +46,7 @@ wxEVT_CALENDAR_DAY_CHANGED = wx.calendar.wxEVT_CALENDAR_DAY_CHANGED wxEVT_CALENDAR_MONTH_CHANGED = wx.calendar.wxEVT_CALENDAR_MONTH_CHANGED wxEVT_CALENDAR_YEAR_CHANGED = wx.calendar.wxEVT_CALENDAR_YEAR_CHANGED wxEVT_CALENDAR_WEEKDAY_CLICKED = wx.calendar.wxEVT_CALENDAR_WEEKDAY_CLICKED +wxCalendarNameStr = wx.calendar.CalendarNameStr wxCalendarCtrl = wx.calendar.CalendarCtrl wxCalendarCtrlPtr = wx.calendar.CalendarCtrlPtr wxPreCalendarCtrl = wx.calendar.PreCalendarCtrl diff --git a/wxPython/wxPython/controls.py b/wxPython/wxPython/controls.py index d7b9421d89..d0885b76ad 100644 --- a/wxPython/wxPython/controls.py +++ b/wxPython/wxPython/controls.py @@ -19,6 +19,7 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxButtonNameStr = wx.controls.ButtonNameStr wxBU_LEFT = wx.controls.BU_LEFT wxBU_TOP = wx.controls.BU_TOP wxBU_RIGHT = wx.controls.BU_RIGHT @@ -32,6 +33,7 @@ wxButton_GetDefaultSize = wx.controls.Button_GetDefaultSize wxBitmapButton = wx.controls.BitmapButton wxBitmapButtonPtr = wx.controls.BitmapButtonPtr wxPreBitmapButton = wx.controls.PreBitmapButton +wxCheckBoxNameStr = wx.controls.CheckBoxNameStr wxCHK_2STATE = wx.controls.CHK_2STATE wxCHK_3STATE = wx.controls.CHK_3STATE wxCHK_ALLOW_3RD_STATE_FOR_USER = wx.controls.CHK_ALLOW_3RD_STATE_FOR_USER @@ -41,12 +43,15 @@ wxCHK_UNDETERMINED = wx.controls.CHK_UNDETERMINED wxCheckBox = wx.controls.CheckBox wxCheckBoxPtr = wx.controls.CheckBoxPtr wxPreCheckBox = wx.controls.PreCheckBox +wxChoiceNameStr = wx.controls.ChoiceNameStr wxChoice = wx.controls.Choice wxChoicePtr = wx.controls.ChoicePtr wxPreChoice = wx.controls.PreChoice +wxComboBoxNameStr = wx.controls.ComboBoxNameStr wxComboBox = wx.controls.ComboBox wxComboBoxPtr = wx.controls.ComboBoxPtr wxPreComboBox = wx.controls.PreComboBox +wxGaugeNameStr = wx.controls.GaugeNameStr wxGA_HORIZONTAL = wx.controls.GA_HORIZONTAL wxGA_VERTICAL = wx.controls.GA_VERTICAL wxGA_SMOOTH = wx.controls.GA_SMOOTH @@ -54,6 +59,9 @@ wxGA_PROGRESSBAR = wx.controls.GA_PROGRESSBAR wxGauge = wx.controls.Gauge wxGaugePtr = wx.controls.GaugePtr wxPreGauge = wx.controls.PreGauge +wxStaticBitmapNameStr = wx.controls.StaticBitmapNameStr +wxStaticBoxNameStr = wx.controls.StaticBoxNameStr +wxStaticTextNameStr = wx.controls.StaticTextNameStr wxStaticBox = wx.controls.StaticBox wxStaticBoxPtr = wx.controls.StaticBoxPtr wxPreStaticBox = wx.controls.PreStaticBox @@ -67,12 +75,14 @@ wxPreStaticText = wx.controls.PreStaticText wxStaticBitmap = wx.controls.StaticBitmap wxStaticBitmapPtr = wx.controls.StaticBitmapPtr wxPreStaticBitmap = wx.controls.PreStaticBitmap +wxListBoxNameStr = wx.controls.ListBoxNameStr wxListBox = wx.controls.ListBox wxListBoxPtr = wx.controls.ListBoxPtr wxPreListBox = wx.controls.PreListBox wxCheckListBox = wx.controls.CheckListBox wxCheckListBoxPtr = wx.controls.CheckListBoxPtr wxPreCheckListBox = wx.controls.PreCheckListBox +wxTextCtrlNameStr = wx.controls.TextCtrlNameStr wxTE_NO_VSCROLL = wx.controls.TE_NO_VSCROLL wxTE_AUTO_SCROLL = wx.controls.TE_AUTO_SCROLL wxTE_READONLY = wx.controls.TE_READONLY @@ -121,9 +131,12 @@ wxEVT_COMMAND_TEXT_URL = wx.controls.wxEVT_COMMAND_TEXT_URL wxEVT_COMMAND_TEXT_MAXLEN = wx.controls.wxEVT_COMMAND_TEXT_MAXLEN wxTextUrlEvent = wx.controls.TextUrlEvent wxTextUrlEventPtr = wx.controls.TextUrlEventPtr +wxScrollBarNameStr = wx.controls.ScrollBarNameStr wxScrollBar = wx.controls.ScrollBar wxScrollBarPtr = wx.controls.ScrollBarPtr wxPreScrollBar = wx.controls.PreScrollBar +wxSPIN_BUTTON_NAME = wx.controls.SPIN_BUTTON_NAME +wxSpinCtrlNameStr = wx.controls.SpinCtrlNameStr wxSP_HORIZONTAL = wx.controls.SP_HORIZONTAL wxSP_VERTICAL = wx.controls.SP_VERTICAL wxSP_ARROW_KEYS = wx.controls.SP_ARROW_KEYS @@ -135,19 +148,24 @@ wxSpinCtrl = wx.controls.SpinCtrl wxSpinCtrlPtr = wx.controls.SpinCtrlPtr wxPreSpinCtrl = wx.controls.PreSpinCtrl wxEVT_COMMAND_SPINCTRL_UPDATED = wx.controls.wxEVT_COMMAND_SPINCTRL_UPDATED +wxRadioBoxNameStr = wx.controls.RadioBoxNameStr +wxRadioButtonNameStr = wx.controls.RadioButtonNameStr wxRadioBox = wx.controls.RadioBox wxRadioBoxPtr = wx.controls.RadioBoxPtr wxPreRadioBox = wx.controls.PreRadioBox wxRadioButton = wx.controls.RadioButton wxRadioButtonPtr = wx.controls.RadioButtonPtr wxPreRadioButton = wx.controls.PreRadioButton +wxSliderNameStr = wx.controls.SliderNameStr wxSlider = wx.controls.Slider wxSliderPtr = wx.controls.SliderPtr wxPreSlider = wx.controls.PreSlider +wxToggleButtonNameStr = wx.controls.ToggleButtonNameStr wxEVT_COMMAND_TOGGLEBUTTON_CLICKED = wx.controls.wxEVT_COMMAND_TOGGLEBUTTON_CLICKED wxToggleButton = wx.controls.ToggleButton wxToggleButtonPtr = wx.controls.ToggleButtonPtr wxPreToggleButton = wx.controls.PreToggleButton +wxNOTEBOOK_NAME = wx.controls.NOTEBOOK_NAME wxBookCtrl = wx.controls.BookCtrl wxBookCtrlPtr = wx.controls.BookCtrlPtr wxBookCtrlEvent = wx.controls.BookCtrlEvent @@ -207,6 +225,7 @@ wxToolBarBasePtr = wx.controls.ToolBarBasePtr wxToolBar = wx.controls.ToolBar wxToolBarPtr = wx.controls.ToolBarPtr wxPreToolBar = wx.controls.PreToolBar +wxListCtrlNameStr = wx.controls.ListCtrlNameStr wxLC_VRULES = wx.controls.LC_VRULES wxLC_HRULES = wx.controls.LC_HRULES wxLC_ICON = wx.controls.LC_ICON @@ -309,6 +328,7 @@ wxPreListCtrl = wx.controls.PreListCtrl wxListView = wx.controls.ListView wxListViewPtr = wx.controls.ListViewPtr wxPreListView = wx.controls.PreListView +wxTreeCtrlNameStr = wx.controls.TreeCtrlNameStr wxTR_NO_BUTTONS = wx.controls.TR_NO_BUTTONS wxTR_HAS_BUTTONS = wx.controls.TR_HAS_BUTTONS wxTR_NO_LINES = wx.controls.TR_NO_LINES @@ -373,6 +393,7 @@ wxTreeEventPtr = wx.controls.TreeEventPtr wxTreeCtrl = wx.controls.TreeCtrl wxTreeCtrlPtr = wx.controls.TreeCtrlPtr wxPreTreeCtrl = wx.controls.PreTreeCtrl +wxDirDialogDefaultFolderStr = wx.controls.DirDialogDefaultFolderStr wxDIRCTRL_DIR_ONLY = wx.controls.DIRCTRL_DIR_ONLY wxDIRCTRL_SELECT_FIRST = wx.controls.DIRCTRL_SELECT_FIRST wxDIRCTRL_SHOW_FILTERS = wx.controls.DIRCTRL_SHOW_FILTERS diff --git a/wxPython/wxPython/core.py b/wxPython/wxPython/core.py index 0d83bea09c..6c051f9af4 100644 --- a/wxPython/wxPython/core.py +++ b/wxPython/wxPython/core.py @@ -991,6 +991,7 @@ wxMenuItem = wx.core.MenuItem wxMenuItemPtr = wx.core.MenuItemPtr wxMenuItem_GetLabelFromText = wx.core.MenuItem_GetLabelFromText wxMenuItem_GetDefaultMarginWidth = wx.core.MenuItem_GetDefaultMarginWidth +wxControlNameStr = wx.core.ControlNameStr wxControl = wx.core.Control wxControlPtr = wx.core.ControlPtr wxPreControl = wx.core.PreControl diff --git a/wxPython/wxPython/gizmos.py b/wxPython/wxPython/gizmos.py index 961564c708..a715b71580 100644 --- a/wxPython/wxPython/gizmos.py +++ b/wxPython/wxPython/gizmos.py @@ -19,6 +19,9 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxDynamicSashNameStr = wx.gizmos.DynamicSashNameStr +wxEditableListBoxNameStr = wx.gizmos.EditableListBoxNameStr +wxTreeListCtrlNameStr = wx.gizmos.TreeListCtrlNameStr wxEVT_DYNAMIC_SASH_SPLIT = wx.gizmos.wxEVT_DYNAMIC_SASH_SPLIT wxEVT_DYNAMIC_SASH_UNIFY = wx.gizmos.wxEVT_DYNAMIC_SASH_UNIFY wxDS_MANAGE_SCROLLBARS = wx.gizmos.DS_MANAGE_SCROLLBARS diff --git a/wxPython/wxPython/glcanvas.py b/wxPython/wxPython/glcanvas.py index 96e43a818d..2b26aa38c2 100644 --- a/wxPython/wxPython/glcanvas.py +++ b/wxPython/wxPython/glcanvas.py @@ -19,6 +19,7 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxGLCanvasNameStr = wx.glcanvas.GLCanvasNameStr wxGLContext = wx.glcanvas.GLContext wxGLContextPtr = wx.glcanvas.GLContextPtr WX_GL_RGBA = wx.glcanvas.WX_GL_RGBA diff --git a/wxPython/wxPython/grid.py b/wxPython/wxPython/grid.py index 49a3596435..043da3b1aa 100644 --- a/wxPython/wxPython/grid.py +++ b/wxPython/wxPython/grid.py @@ -19,6 +19,7 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxDateTimeFormatStr = wx.grid.DateTimeFormatStr wxGRID_VALUE_STRING = wx.grid.GRID_VALUE_STRING wxGRID_VALUE_BOOL = wx.grid.GRID_VALUE_BOOL wxGRID_VALUE_NUMBER = wx.grid.GRID_VALUE_NUMBER diff --git a/wxPython/wxPython/html.py b/wxPython/wxPython/html.py index 135964f52c..9a923d0d15 100644 --- a/wxPython/wxPython/html.py +++ b/wxPython/wxPython/html.py @@ -19,6 +19,9 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxHtmlWindowNameStr = wx.html.HtmlWindowNameStr +wxHtmlPrintoutTitleStr = wx.html.HtmlPrintoutTitleStr +wxHtmlPrintingTitleStr = wx.html.HtmlPrintingTitleStr wxHTML_ALIGN_LEFT = wx.html.HTML_ALIGN_LEFT wxHTML_ALIGN_CENTER = wx.html.HTML_ALIGN_CENTER wxHTML_ALIGN_RIGHT = wx.html.HTML_ALIGN_RIGHT diff --git a/wxPython/wxPython/misc.py b/wxPython/wxPython/misc.py index acd2db4db0..1cf059882e 100644 --- a/wxPython/wxPython/misc.py +++ b/wxPython/wxPython/misc.py @@ -125,6 +125,9 @@ wxSystemOptions_SetOptionInt = wx.misc.SystemOptions_SetOptionInt wxSystemOptions_GetOption = wx.misc.SystemOptions_GetOption wxSystemOptions_GetOptionInt = wx.misc.SystemOptions_GetOptionInt wxSystemOptions_HasOption = wx.misc.SystemOptions_HasOption +wxFileSelectorPromptStr = wx.misc.FileSelectorPromptStr +wxFileSelectorDefaultWildcardStr = wx.misc.FileSelectorDefaultWildcardStr +wxDirSelectorPromptStr = wx.misc.DirSelectorPromptStr wxNewId = wx.misc.NewId wxRegisterId = wx.misc.RegisterId wxGetCurrentId = wx.misc.GetCurrentId @@ -432,6 +435,8 @@ wxConfigPtr = wx.misc.ConfigPtr wxFileConfig = wx.misc.FileConfig wxFileConfigPtr = wx.misc.FileConfigPtr wxExpandEnvVars = wx.misc.ExpandEnvVars +wxDateFormatStr = wx.misc.DateFormatStr +wxTimeSpanFormatStr = wx.misc.TimeSpanFormatStr wxDateTime = wx.misc.DateTime wxDateTimePtr = wx.misc.DateTimePtr wxDateTime_SetCountry = wx.misc.DateTime_SetCountry diff --git a/wxPython/wxPython/stc.py b/wxPython/wxPython/stc.py index ead2805d38..019872660a 100644 --- a/wxPython/wxPython/stc.py +++ b/wxPython/wxPython/stc.py @@ -19,6 +19,7 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxSTCNameStr = wx.stc.STCNameStr STC_USE_DND = wx.stc.STC_USE_DND wxSTC_USE_POPUP = wx.stc.STC_USE_POPUP wxSTC_INVALID_POSITION = wx.stc.STC_INVALID_POSITION diff --git a/wxPython/wxPython/windows.py b/wxPython/wxPython/windows.py index 6f30ee2b65..bbe71b1f6d 100644 --- a/wxPython/wxPython/windows.py +++ b/wxPython/wxPython/windows.py @@ -25,6 +25,10 @@ wxPrePanel = wx.windows.PrePanel wxScrolledWindow = wx.windows.ScrolledWindow wxScrolledWindowPtr = wx.windows.ScrolledWindowPtr wxPreScrolledWindow = wx.windows.PreScrolledWindow +wxFrameNameStr = wx.windows.FrameNameStr +wxDialogNameStr = wx.windows.DialogNameStr +wxStatusLineNameStr = wx.windows.StatusLineNameStr +wxToolBarNameStr = wx.windows.ToolBarNameStr wxFULLSCREEN_NOMENUBAR = wx.windows.FULLSCREEN_NOMENUBAR wxFULLSCREEN_NOTOOLBAR = wx.windows.FULLSCREEN_NOTOOLBAR wxFULLSCREEN_NOSTATUSBAR = wx.windows.FULLSCREEN_NOSTATUSBAR @@ -55,6 +59,7 @@ wxSplashScreenPtr = wx.windows.SplashScreenPtr wxStatusBar = wx.windows.StatusBar wxStatusBarPtr = wx.windows.StatusBarPtr wxPreStatusBar = wx.windows.PreStatusBar +wxSplitterNameStr = wx.windows.SplitterNameStr wxSP_NOBORDER = wx.windows.SP_NOBORDER wxSP_NOSASH = wx.windows.SP_NOSASH wxSP_PERMIT_UNSPLIT = wx.windows.SP_PERMIT_UNSPLIT @@ -77,6 +82,8 @@ wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED = wx.windows.wxEVT_COMMAND_SPLITTER_SASH wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING = wx.windows.wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wx.windows.wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_COMMAND_SPLITTER_UNSPLIT = wx.windows.wxEVT_COMMAND_SPLITTER_UNSPLIT +wxSashNameStr = wx.windows.SashNameStr +wxSashLayoutNameStr = wx.windows.SashLayoutNameStr wxSASH_DRAG_NONE = wx.windows.SASH_DRAG_NONE wxSASH_DRAG_DRAGGING = wx.windows.SASH_DRAG_DRAGGING wxSASH_DRAG_LEFT_DOWN = wx.windows.SASH_DRAG_LEFT_DOWN @@ -131,6 +138,7 @@ wxTipWindowPtr = wx.windows.TipWindowPtr wxVScrolledWindow = wx.windows.VScrolledWindow wxVScrolledWindowPtr = wx.windows.VScrolledWindowPtr wxPreVScrolledWindow = wx.windows.PreVScrolledWindow +wxVListBoxNameStr = wx.windows.VListBoxNameStr wxVListBox = wx.windows.VListBox wxVListBoxPtr = wx.windows.VListBoxPtr wxPreVListBox = wx.windows.PreVListBox @@ -148,6 +156,12 @@ wxEVT_TASKBAR_RIGHT_DOWN = wx.windows.wxEVT_TASKBAR_RIGHT_DOWN wxEVT_TASKBAR_RIGHT_UP = wx.windows.wxEVT_TASKBAR_RIGHT_UP wxEVT_TASKBAR_LEFT_DCLICK = wx.windows.wxEVT_TASKBAR_LEFT_DCLICK wxEVT_TASKBAR_RIGHT_DCLICK = wx.windows.wxEVT_TASKBAR_RIGHT_DCLICK +wxFileSelectorPromptStr = wx.windows.FileSelectorPromptStr +wxDirSelectorPromptStr = wx.windows.DirSelectorPromptStr +wxDirDialogNameStr = wx.windows.DirDialogNameStr +wxFileSelectorDefaultWildcardStr = wx.windows.FileSelectorDefaultWildcardStr +wxGetTextFromUserPromptStr = wx.windows.GetTextFromUserPromptStr +wxMessageBoxCaptionStr = wx.windows.MessageBoxCaptionStr wxColourData = wx.windows.ColourData wxColourDataPtr = wx.windows.ColourDataPtr wxColourDialog = wx.windows.ColourDialog @@ -211,6 +225,8 @@ wxPyWindow = wx.windows.PyWindow wxPyWindowPtr = wx.windows.PyWindowPtr wxPyPanel = wx.windows.PyPanel wxPyPanelPtr = wx.windows.PyPanelPtr +wxPrintoutTitleStr = wx.windows.PrintoutTitleStr +wxPreviewCanvasNameStr = wx.windows.PreviewCanvasNameStr wxPRINT_MODE_NONE = wx.windows.PRINT_MODE_NONE wxPRINT_MODE_PREVIEW = wx.windows.PRINT_MODE_PREVIEW wxPRINT_MODE_FILE = wx.windows.PRINT_MODE_FILE diff --git a/wxPython/wxPython/xrc.py b/wxPython/wxPython/xrc.py index 50fc1b33bb..222c3f0aeb 100644 --- a/wxPython/wxPython/xrc.py +++ b/wxPython/wxPython/xrc.py @@ -19,6 +19,13 @@ del sys, _wx # Now assign all the reverse-renamed names: +wxUTF8String = wx.xrc.UTF8String +wxStyleString = wx.xrc.StyleString +wxSizeString = wx.xrc.SizeString +wxPosString = wx.xrc.PosString +wxBitmapString = wx.xrc.BitmapString +wxIconString = wx.xrc.IconString +wxFontString = wx.xrc.FontString WX_XMLRES_CURRENT_VERSION_MAJOR = wx.xrc.WX_XMLRES_CURRENT_VERSION_MAJOR WX_XMLRES_CURRENT_VERSION_MINOR = wx.xrc.WX_XMLRES_CURRENT_VERSION_MINOR WX_XMLRES_CURRENT_VERSION_RELEASE = wx.xrc.WX_XMLRES_CURRENT_VERSION_RELEASE -- 2.45.2