From 68320e40cde2ceaac4645db9ae2989e3101fde45 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 15 Jan 2002 04:54:19 +0000 Subject: [PATCH] Added wxGenericDirCtrl and other varioius updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/CHANGES.txt | 5 +- wxPython/contrib/ogl/oglbasic.cpp | 38 +- wxPython/contrib/stc/msw/stc_.cpp | 2 +- wxPython/demo/Main.py | 30 +- wxPython/demo/SplitTree.py | 6 +- wxPython/demo/wxFontDialog.py | 4 + wxPython/src/.cvsignore | 3 + wxPython/src/_defs.i | 2 + wxPython/src/_extras.py | 11 +- wxPython/src/cmndlgs.i | 1 + wxPython/src/controls.i | 9 +- wxPython/src/controls2.i | 116 ++ wxPython/src/gdi.i | 3 + wxPython/src/image.i | 11 + wxPython/src/misc2.i | 8 +- wxPython/src/msw/controls.cpp | 43 +- wxPython/src/msw/controls.py | 3 + wxPython/src/msw/controls2.cpp | 1649 +++++++++++++++++++++++++++++ wxPython/src/msw/controls2.py | 149 +++ wxPython/src/msw/gdi.cpp | 29 + wxPython/src/msw/gdi.py | 3 + wxPython/src/msw/image.cpp | 135 +++ wxPython/src/msw/image.py | 28 + wxPython/src/msw/misc2.cpp | 93 +- wxPython/src/msw/misc2.py | 15 +- wxPython/src/msw/wx.cpp | 2 + wxPython/src/msw/wx.py | 13 +- wxPython/src/my_typemaps.i | 17 + 28 files changed, 2280 insertions(+), 148 deletions(-) diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 616d2afb16..7417c75b3a 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -4,14 +4,15 @@ CHANGES.txt for wxPython 2.3.3 ----- - Added wxSplashScreen. +Added wxGenericDirCtrl. + + 2.3.2.1 ------- - Changed (again) how the Python global interpreter lock is handled as well as the Python thread state. This time it works on SMP machines without barfing and is also still compatible with Python debuggers. diff --git a/wxPython/contrib/ogl/oglbasic.cpp b/wxPython/contrib/ogl/oglbasic.cpp index 2a7878393a..540dc1c332 100644 --- a/wxPython/contrib/ogl/oglbasic.cpp +++ b/wxPython/contrib/ogl/oglbasic.cpp @@ -3801,14 +3801,20 @@ static PyObject *_wrap_wxPyShape_GetFixedSize(PyObject *self, PyObject *args, Py PyObject * _resultobj; wxPyShape * _arg0; bool * _arg1; + int temp; bool * _arg2; + int temp0; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","OUTPUT","OUTPUT", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShape_GetFixedSize",_kwnames,&_argo0,&_argo1,&_argo2)) +{ + _arg1 = (bool*)&temp; +} +{ + _arg2 = (bool*)&temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetFixedSize",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3817,20 +3823,6 @@ static PyObject *_wrap_wxPyShape_GetFixedSize(PyObject *self, PyObject *args, Py return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_bool_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyShape_GetFixedSize. Expected _bool_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_bool_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyShape_GetFixedSize. Expected _bool_p."); - return NULL; - } - } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyShape_GetFixedSize(_arg0,_arg1,_arg2); @@ -3839,6 +3831,16 @@ static PyObject *_wrap_wxPyShape_GetFixedSize(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} return _resultobj; } diff --git a/wxPython/contrib/stc/msw/stc_.cpp b/wxPython/contrib/stc/msw/stc_.cpp index a5c713cd5a..facac9ce89 100644 --- a/wxPython/contrib/stc/msw/stc_.cpp +++ b/wxPython/contrib/stc/msw/stc_.cpp @@ -11328,7 +11328,7 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_NNCRONTAB_STRING", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"wxSTC_NNCRONTAB_ENVIRONMENT", PyInt_FromLong((long) 9)); PyDict_SetItemString(d,"wxSTC_NNCRONTAB_IDENTIFIER", PyInt_FromLong((long) 10)); - PyDict_SetItemString(d,"wxSTC_MASK_FOLDERS", PyInt_FromLong((long) ((1<<(30))|(1<<(31))))); + PyDict_SetItemString(d,"wxSTC_MASK_FOLDERS", PyInt_FromLong((long) ((1<<(30))|(1<<(31))|(1<<(29))|(1<<(28))|(1<<(27))|(1<<(26))|(1<<(25))))); PyDict_SetItemString(d,"wxSTCNameStr", PyString_FromString("wxSTCNameStr")); PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE)); PyDict_SetItemString(d,"wxEVT_STC_STYLENEEDED", PyInt_FromLong((long) wxEVT_STC_STYLENEEDED)); diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index b3ff2f716f..4ee72f29a1 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -22,25 +22,7 @@ import images _treeList = [ - ('New since last release', ['ContextHelp', - 'PyCrust', - 'PyCrustWithFilling', - 'VirtualListCtrl', - 'wxListCtrl', - 'TablePrint', - 'OOR', - 'wxFindReplaceDialog', - 'DrawXXXList', - 'ErrorDialogs', - 'wxRightTextCtrl', - 'URLDragAndDrop', - 'wxMimeTypesManager', - 'wxPopupWindow', - 'wxDynamicSashWindow', - 'wxEditableListBox', - 'SplitTree', - 'wxLEDNumberCtrl', - 'wxEditor', + ('New since last release', ['wxGenericDirCtrl', ]), ('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame', @@ -60,7 +42,8 @@ _treeList = [ ]), ('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice', - 'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl', + 'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'VirtualListCtrl', + 'wxTextCtrl', 'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText', 'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar', 'wxCalendarCtrl', 'wxToggleButton', @@ -77,7 +60,7 @@ _treeList = [ 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE', 'wxDragImage', "wxProcess", "FancyText", "OOR", "wxWave", 'wxJoystick', 'DrawXXXList', 'ErrorDialogs', 'wxMimeTypesManager', - 'SplitTree', + 'ContextHelp', 'SplitTree', ]), ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', @@ -85,7 +68,8 @@ _treeList = [ 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow', 'FileBrowseButton', 'GenericButtons', 'wxEditor', 'ColourSelect', 'ImageBrowser', - 'infoframe', 'ColourDB', 'PyCrust', 'TablePrint', + 'infoframe', 'ColourDB', 'PyCrust', 'PyCrustWithFilling', + 'TablePrint', 'wxRightTextCtrl', ]), @@ -511,7 +495,7 @@ class MySplashScreen(wxSplashScreen): class MyApp(wxApp): def OnInit(self): """ - Create and show the splash screen. It will then create and show + Create and show the splash screen. It will then create and show the main frame when it is time to do so. """ wxInitAllImageHandlers() diff --git a/wxPython/demo/SplitTree.py b/wxPython/demo/SplitTree.py index a7abb1ab9b..afdccb9e2e 100644 --- a/wxPython/demo/SplitTree.py +++ b/wxPython/demo/SplitTree.py @@ -65,7 +65,7 @@ class TestPanel(wxPanel): wxPanel.__init__(self, parent, -1) self.log = log - scroller = wxSplitterScrolledWindow(self, -1, (50,50), (350, 250), + scroller = wxSplitterScrolledWindow(self, -1, #(50,50), (350, 250), style=wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL) splitter = wxThinSplitterWindow(scroller, -1, style=wxSP_3DBORDER | wxCLIP_CHILDREN) splitter.SetSashSize(2) @@ -83,6 +83,10 @@ class TestPanel(wxPanel): valueWindow.SetTreeCtrl(tree) tree.SetCompanionWindow(valueWindow) + sizer = wxBoxSizer(wxVERTICAL) + sizer.Add(scroller, 1, wxEXPAND|wxALL, 25) + self.SetAutoLayout(true) + self.SetSizer(sizer) #---------------------------------------------------------------------- diff --git a/wxPython/demo/wxFontDialog.py b/wxPython/demo/wxFontDialog.py index f4c623feae..551dc97dc5 100644 --- a/wxPython/demo/wxFontDialog.py +++ b/wxPython/demo/wxFontDialog.py @@ -5,6 +5,10 @@ from wxPython.wx import * def runTest(frame, nb, log): data = wxFontData() + data.EnableEffects(true) + font_colour = wxColour(255, 0, 0) # colour of font (red) + data.SetColour(font_colour) # set colour + print data.GetColour() dlg = wxFontDialog(frame, data) if dlg.ShowModal() == wxID_OK: data = dlg.GetFontData() diff --git a/wxPython/src/.cvsignore b/wxPython/src/.cvsignore index d7e8d6a963..ab935db4fd 100644 --- a/wxPython/src/.cvsignore +++ b/wxPython/src/.cvsignore @@ -20,6 +20,9 @@ libwxPyHelpers.2.2.so.1.0.0 libwxPyHelpers.2.2.so.2.0.0 make.bat makefile.test +mt-try1 +mt-try2-works +mt-try3 sedscript templates tests___Win32_Debug diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 329a05f0d2..420719fac1 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -268,6 +268,7 @@ enum { wxTE_MULTILINE, wxTE_PROCESS_TAB, wxTE_RICH, + wxTE_RICH2, wxTE_NO_VSCROLL, wxTE_AUTO_SCROLL, wxTE_PROCESS_ENTER, @@ -716,6 +717,7 @@ enum wxBitmapType wxBITMAP_TYPE_PICT_RESOURCE, wxBITMAP_TYPE_ICON, wxBITMAP_TYPE_ICON_RESOURCE, + wxBITMAP_TYPE_ANI, wxBITMAP_TYPE_MACCURSOR, wxBITMAP_TYPE_MACCURSOR_RESOURCE, wxBITMAP_TYPE_ANY = 50 diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index f841b51f64..c8da773691 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -570,12 +570,6 @@ class wxTimer(wxPyTimer): wxPyTimer.__init__(self, None) self.SetOwner(evtHandler, id) -#---------------------------------------------------------------------- - -NULL = None # For backwards compatibility only. You should really be - # using None now. - - #---------------------------------------------------------------------- # aliases @@ -587,7 +581,10 @@ wxPen = wxPyPen wxNoRefBitmap = wxBitmap wxPyDefaultPosition = wxDefaultPosition wxPyDefaultSize = wxDefaultSize - +NULL = None +wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour +wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont +wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric #---------------------------------------------------------------------- # wxGTK sets the locale when initialized. Doing this at the Python diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index 402f5b7c1d..02ebd4eff9 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -83,6 +83,7 @@ public: int ShowModal(); }; + //---------------------------------------------------------------------- class wxFileDialog : public wxDialog { diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index d4d73bba7d..7bce7b911b 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -30,7 +30,6 @@ #ifdef __WXGTK__ #include #endif - %} //---------------------------------------------------------------------- @@ -740,6 +739,8 @@ public: wxString GetValue() const; void SetValue(const wxString& value); + wxString GetRange(long from, long to); + int GetLineLength(long lineNo) const; wxString GetLineText(long lineNo) const; int GetNumberOfLines() const; @@ -782,7 +783,10 @@ public: // considering all its contents as a single strings) and (x, y) coordinates // which represent column and line. long XYToPosition(long x, long y) const; - bool PositionToXY(long pos, long *OUTPUT, long *OUTPUT) const; + void PositionToXY(long pos, long *OUTPUT, long *OUTPUT) const; + + //bool PositionToXY(long pos, long *OUTPUT, long *OUTPUT) const; + // TODO: check return value, raise exception. void ShowPosition(long pos); @@ -1119,6 +1123,7 @@ public: }; #endif + //---------------------------------------------------------------------- //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index b6aadf0328..5f1dc0cc45 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -20,6 +20,7 @@ #include #include #include +#include %} //---------------------------------------------------------------------- @@ -1281,6 +1282,121 @@ public: //---------------------------------------------------------------------- + +enum { + wxDIRCTRL_DIR_ONLY, + wxDIRCTRL_SELECT_FIRST, + wxDIRCTRL_SHOW_FILTERS, + wxDIRCTRL_3D_INTERNAL, +}; + + +class wxDirItemData : public wxObject // wxTreeItemData +{ +public: + wxDirItemData(const wxString& path, const wxString& name, bool isDir); +// ~wxDirItemDataEx(); + void SetNewDirName( wxString path ); + wxString m_path, m_name; + bool m_isHidden; + bool m_isExpanded; + bool m_isDir; +}; + + +class wxGenericDirCtrl: public wxControl +{ +public: + wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = -1, + const wxString &dir = wxDirDialogDefaultFolderStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, + const wxString& filter = wxEmptyString, + int defaultFilter = 0, + const wxString& name = "dirCtrl" ); + %name(wxPreGenericDirCtrl)wxGenericDirCtrl(); + + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" + %pragma(python) addtomethod = "wxPreGenericDirCtrl:val._setOORInfo(val)" + + bool Create(wxWindow *parent, const wxWindowID id = -1, + const wxString &dir = wxDirDialogDefaultFolderStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, + const wxString& filter = wxEmptyString, + int defaultFilter = 0, + const wxString& name = "treeCtrl" ); + + + // Try to expand as much of the given path as possible. + bool ExpandPath(const wxString& path); + + // Accessors + + inline wxString GetDefaultPath() const; + void SetDefaultPath(const wxString& path); + + // Get dir or filename + wxString GetPath() const ; + + // Get selected filename path only (else empty string). + // I.e. don't count a directory as a selection + wxString GetFilePath() const ; + void SetPath(const wxString& path) ; + + void ShowHidden( bool show ); + bool GetShowHidden(); + + wxString GetFilter() const; + void SetFilter(const wxString& filter); + + int GetFilterIndex() const; + void SetFilterIndex(int n) ; + + wxTreeItemId GetRootId(); + + wxTreeCtrl* GetTreeCtrl() const; + wxDirFilterListCtrl* GetFilterListCtrl() const; + +// //// Helpers +// void SetupSections(); +// // Parse the filter into an array of filters and an array of descriptions +// int ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions); +// // Find the child that matches the first part of 'path'. +// // E.g. if a child path is "/usr" and 'path' is "/usr/include" +// // then the child for /usr is returned. +// // If the path string has been used (we're at the leaf), done is set to TRUE +// wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done); +}; + + +class wxDirFilterListCtrl: public wxChoice +{ +public: + wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + %name(wxPreDirFilterListCtrl)wxDirFilterListCtrl(); + + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" + %pragma(python) addtomethod = "wxPreDirFilterListCtrl:val._setOORInfo(val)" + + bool Create(wxGenericDirCtrl* parent, const wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + +//// Operations + void FillFilterList(const wxString& filter, int defaultFilter); +}; + + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- + %init %{ // Map renamed classes back to their common name for OOR wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index e0d67e8c1e..079792271a 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -554,6 +554,9 @@ public: bool GetUnderlined() const; wxString GetFaceName() const; wxFontEncoding GetEncoding() const; + + bool IsFixedWidth(); + wxNativeFontInfo* GetNativeFontInfo() const; wxString GetNativeFontInfoDesc() const; wxString GetNativeFontInfoUserDesc() const; diff --git a/wxPython/src/image.i b/wxPython/src/image.i index adcf9ebaa6..93afd3115c 100644 --- a/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -75,6 +75,16 @@ public: wxICOHandler(); }; +class wxCURHandler : public wxICOHandler { +public: + wxCURHandler(); +}; + +class wxANIHandler : public wxCURHandler { +public: + wxANIHandler(); +}; + class wxGIFHandler : public wxImageHandler { public: wxGIFHandler(); @@ -96,6 +106,7 @@ public: }; + //--------------------------------------------------------------------------- class wxImage : public wxObject { diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 31fb8758ce..dfdefeda5d 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -285,13 +285,6 @@ public: // return true if the port has certain feature static bool HasFeature(wxSystemFeature index); - - // the backwards compatible versions, don't use these methods in the new - // code! - static wxColour GetSystemColour(int index); - static wxFont GetSystemFont(int index); - static int GetSystemMetric(int index); - }; @@ -541,6 +534,7 @@ class wxStopWatch public: // ctor starts the stop watch wxStopWatch(); + ~wxStopWatch(); void Start(long t = 0); void Pause(); void Resume(); diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index 3d987a3d74..203a3de872 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -74,7 +74,6 @@ extern PyObject *SWIG_newvarlink(void); #endif - static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; @@ -6273,6 +6272,41 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxTextCtrl_GetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTextCtrl * _arg0; + long _arg1; + long _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","from","to", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_GetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetRange. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + #define wxTextCtrl_GetLineLength(_swigobj,_swigarg0) (_swigobj->GetLineLength(_swigarg0)) static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7024,7 +7058,6 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P #define wxTextCtrl_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxTextCtrl * _arg0; long _arg1; long * _arg2; @@ -7052,11 +7085,12 @@ static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); @@ -11289,6 +11323,7 @@ static PyMethodDef controlscMethods[] = { { "wxTextCtrl_GetNumberOfLines", (PyCFunction) _wrap_wxTextCtrl_GetNumberOfLines, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineText", (PyCFunction) _wrap_wxTextCtrl_GetLineText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineLength", (PyCFunction) _wrap_wxTextCtrl_GetLineLength, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetRange", (PyCFunction) _wrap_wxTextCtrl_GetRange, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetValue", (PyCFunction) _wrap_wxTextCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetValue", (PyCFunction) _wrap_wxTextCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index 663b480b5a..fc97236349 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -617,6 +617,9 @@ class wxTextCtrlPtr(wxControlPtr): def SetValue(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_SetValue,(self,) + _args, _kwargs) return val + def GetRange(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_GetRange,(self,) + _args, _kwargs) + return val def GetLineLength(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_GetLineLength,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 65b7fd5fbd..54d328444e 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -62,6 +62,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include static PyObject* t_output_helper(PyObject* target, PyObject* o) { @@ -9504,7 +9505,1640 @@ static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args return _resultobj; } +static void *SwigwxDirItemDataTowxObject(void *ptr) { + wxDirItemData *src; + wxObject *dest; + src = (wxDirItemData *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxDirItemData(_swigarg0,_swigarg1,_swigarg2) (new wxDirItemData(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxDirItemData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDirItemData * _result; + wxString * _arg0; + wxString * _arg1; + bool _arg2; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + int tempbool2; + char *_kwnames[] = { "path","name","isDir", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:new_wxDirItemData",_kwnames,&_obj0,&_obj1,&tempbool2)) + return NULL; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg0 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj0)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); +#endif +} +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} + _arg2 = (bool ) tempbool2; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxDirItemData *)new_wxDirItemData(*_arg0,*_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDirItemData_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDirItemData_SetNewDirName(_swigobj,_swigarg0) (_swigobj->SetNewDirName(_swigarg0)) +static PyObject *_wrap_wxDirItemData_SetNewDirName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDirItemData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDirItemData_SetNewDirName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_SetNewDirName. Expected _wxDirItemData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDirItemData_SetNewDirName(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDirItemData_m_path_set(_swigobj,_swigval) (_swigobj->m_path = *(_swigval),_swigval) +static PyObject *_wrap_wxDirItemData_m_path_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDirItemData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","m_path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDirItemData_m_path_set",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_path_set. Expected _wxDirItemData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxString *)wxDirItemData_m_path_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDirItemData_m_path_get(_swigobj) (&_swigobj->m_path) +static PyObject *_wrap_wxDirItemData_m_path_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDirItemData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDirItemData_m_path_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_path_get. Expected _wxDirItemData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxString *)wxDirItemData_m_path_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxDirItemData_m_name_set(_swigobj,_swigval) (_swigobj->m_name = *(_swigval),_swigval) +static PyObject *_wrap_wxDirItemData_m_name_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDirItemData * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","m_name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDirItemData_m_name_set",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_name_set. Expected _wxDirItemData_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxString *)wxDirItemData_m_name_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDirItemData_m_name_get(_swigobj) (&_swigobj->m_name) +static PyObject *_wrap_wxDirItemData_m_name_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxDirItemData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDirItemData_m_name_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_name_get. Expected _wxDirItemData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxString *)wxDirItemData_m_name_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} + return _resultobj; +} + +#define wxDirItemData_m_isHidden_set(_swigobj,_swigval) (_swigobj->m_isHidden = _swigval,_swigval) +static PyObject *_wrap_wxDirItemData_m_isHidden_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirItemData * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_isHidden", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDirItemData_m_isHidden_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_isHidden_set. Expected _wxDirItemData_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirItemData_m_isHidden_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDirItemData_m_isHidden_get(_swigobj) ((bool ) _swigobj->m_isHidden) +static PyObject *_wrap_wxDirItemData_m_isHidden_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirItemData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDirItemData_m_isHidden_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_isHidden_get. Expected _wxDirItemData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirItemData_m_isHidden_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDirItemData_m_isExpanded_set(_swigobj,_swigval) (_swigobj->m_isExpanded = _swigval,_swigval) +static PyObject *_wrap_wxDirItemData_m_isExpanded_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirItemData * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_isExpanded", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDirItemData_m_isExpanded_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_isExpanded_set. Expected _wxDirItemData_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirItemData_m_isExpanded_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDirItemData_m_isExpanded_get(_swigobj) ((bool ) _swigobj->m_isExpanded) +static PyObject *_wrap_wxDirItemData_m_isExpanded_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirItemData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDirItemData_m_isExpanded_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_isExpanded_get. Expected _wxDirItemData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirItemData_m_isExpanded_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDirItemData_m_isDir_set(_swigobj,_swigval) (_swigobj->m_isDir = _swigval,_swigval) +static PyObject *_wrap_wxDirItemData_m_isDir_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirItemData * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","m_isDir", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDirItemData_m_isDir_set",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_isDir_set. Expected _wxDirItemData_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirItemData_m_isDir_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDirItemData_m_isDir_get(_swigobj) ((bool ) _swigobj->m_isDir) +static PyObject *_wrap_wxDirItemData_m_isDir_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirItemData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDirItemData_m_isDir_get",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirItemData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirItemData_m_isDir_get. Expected _wxDirItemData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirItemData_m_isDir_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static void *SwigwxGenericDirCtrlTowxControl(void *ptr) { + wxGenericDirCtrl *src; + wxControl *dest; + src = (wxGenericDirCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxGenericDirCtrlTowxWindow(void *ptr) { + wxGenericDirCtrl *src; + wxWindow *dest; + src = (wxGenericDirCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxGenericDirCtrlTowxEvtHandler(void *ptr) { + wxGenericDirCtrl *src; + wxEvtHandler *dest; + src = (wxGenericDirCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxGenericDirCtrlTowxObject(void *ptr) { + wxGenericDirCtrl *src; + wxObject *dest; + src = (wxGenericDirCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxGenericDirCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (new wxGenericDirCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_new_wxGenericDirCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _result; + wxWindow * _arg0; + wxWindowID _arg1 = (wxWindowID ) -1; + wxString * _arg2 = (wxString *) &wxDirDialogDefaultFolderStr; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) (wxDIRCTRL_3D_INTERNAL)|wxSUNKEN_BORDER; + wxString * _arg6 = (wxString *) &wxEmptyString; + int _arg7 = (int ) 0; + wxString * _arg8 = (wxString *) &"dirCtrl"; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + PyObject * _obj6 = 0; + PyObject * _obj8 = 0; + char *_kwnames[] = { "parent","id","dir","pos","size","style","filter","defaultFilter","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOlOiO:new_wxGenericDirCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6,&_arg7,&_obj8)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxGenericDirCtrl. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj2) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj6) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj6) && !PyUnicode_Check(_obj6)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj6, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg6 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj6)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg6 = new wxString(PyString_AS_STRING(_obj6), PyString_GET_SIZE(_obj6)); +#endif +} + if (_obj8) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj8) && !PyUnicode_Check(_obj8)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj8, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg8 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj8)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg8 = new wxString(PyString_AS_STRING(_obj8), PyString_GET_SIZE(_obj8)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGenericDirCtrl *)new_wxGenericDirCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7,*_arg8); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDirCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj6) + delete _arg6; +} +{ + if (_obj8) + delete _arg8; +} + return _resultobj; +} + +#define new_wxPreGenericDirCtrl() (new wxGenericDirCtrl()) +static PyObject *_wrap_new_wxPreGenericDirCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreGenericDirCtrl",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGenericDirCtrl *)new_wxPreGenericDirCtrl(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxGenericDirCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGenericDirCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7,_swigarg8)) +static PyObject *_wrap_wxGenericDirCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDirCtrl * _arg0; + wxWindow * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxString * _arg3 = (wxString *) &wxDirDialogDefaultFolderStr; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) (wxDIRCTRL_3D_INTERNAL)|wxSUNKEN_BORDER; + wxString * _arg7 = (wxString *) &wxEmptyString; + int _arg8 = (int ) 0; + wxString * _arg9 = (wxString *) &"treeCtrl"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _obj7 = 0; + PyObject * _obj9 = 0; + char *_kwnames[] = { "self","parent","id","dir","pos","size","style","filter","defaultFilter","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOOlOiO:wxGenericDirCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_obj7,&_arg8,&_obj9)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_Create. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGenericDirCtrl_Create. Expected _wxWindow_p."); + return NULL; + } + } + if (_obj3) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_obj7) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj7) && !PyUnicode_Check(_obj7)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj7, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg7 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj7)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg7 = new wxString(PyString_AS_STRING(_obj7), PyString_GET_SIZE(_obj7)); +#endif +} + if (_obj9) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj9) && !PyUnicode_Check(_obj9)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj9, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg9 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj9)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg9 = new wxString(PyString_AS_STRING(_obj9), PyString_GET_SIZE(_obj9)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGenericDirCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8,*_arg9); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} +{ + if (_obj7) + delete _arg7; +} +{ + if (_obj9) + delete _arg9; +} + return _resultobj; +} + +#define wxGenericDirCtrl_ExpandPath(_swigobj,_swigarg0) (_swigobj->ExpandPath(_swigarg0)) +static PyObject *_wrap_wxGenericDirCtrl_ExpandPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDirCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGenericDirCtrl_ExpandPath",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_ExpandPath. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGenericDirCtrl_ExpandPath(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGenericDirCtrl_GetDefaultPath(_swigobj) (_swigobj->GetDefaultPath()) +static PyObject *_wrap_wxGenericDirCtrl_GetDefaultPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetDefaultPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetDefaultPath. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGenericDirCtrl_GetDefaultPath(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGenericDirCtrl_SetDefaultPath(_swigobj,_swigarg0) (_swigobj->SetDefaultPath(_swigarg0)) +static PyObject *_wrap_wxGenericDirCtrl_SetDefaultPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGenericDirCtrl_SetDefaultPath",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_SetDefaultPath. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGenericDirCtrl_SetDefaultPath(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGenericDirCtrl_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxGenericDirCtrl_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetPath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetPath. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGenericDirCtrl_GetPath(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGenericDirCtrl_GetFilePath(_swigobj) (_swigobj->GetFilePath()) +static PyObject *_wrap_wxGenericDirCtrl_GetFilePath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetFilePath",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetFilePath. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGenericDirCtrl_GetFilePath(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGenericDirCtrl_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) +static PyObject *_wrap_wxGenericDirCtrl_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGenericDirCtrl_SetPath",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_SetPath. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGenericDirCtrl_SetPath(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGenericDirCtrl_ShowHidden(_swigobj,_swigarg0) (_swigobj->ShowHidden(_swigarg0)) +static PyObject *_wrap_wxGenericDirCtrl_ShowHidden(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGenericDirCtrl_ShowHidden",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_ShowHidden. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGenericDirCtrl_ShowHidden(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGenericDirCtrl_GetShowHidden(_swigobj) (_swigobj->GetShowHidden()) +static PyObject *_wrap_wxGenericDirCtrl_GetShowHidden(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetShowHidden",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetShowHidden. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGenericDirCtrl_GetShowHidden(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGenericDirCtrl_GetFilter(_swigobj) (_swigobj->GetFilter()) +static PyObject *_wrap_wxGenericDirCtrl_GetFilter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetFilter",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetFilter. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGenericDirCtrl_GetFilter(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGenericDirCtrl_SetFilter(_swigobj,_swigarg0) (_swigobj->SetFilter(_swigarg0)) +static PyObject *_wrap_wxGenericDirCtrl_SetFilter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","filter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGenericDirCtrl_SetFilter",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_SetFilter. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGenericDirCtrl_SetFilter(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxGenericDirCtrl_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) +static PyObject *_wrap_wxGenericDirCtrl_GetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetFilterIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetFilterIndex. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGenericDirCtrl_GetFilterIndex(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxGenericDirCtrl_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) +static PyObject *_wrap_wxGenericDirCtrl_SetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGenericDirCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","n", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGenericDirCtrl_SetFilterIndex",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_SetFilterIndex. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGenericDirCtrl_SetFilterIndex(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGenericDirCtrl_GetRootId(_swigobj) (_swigobj->GetRootId()) +static PyObject *_wrap_wxGenericDirCtrl_GetRootId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTreeItemId * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetRootId",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetRootId. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxTreeItemId (wxGenericDirCtrl_GetRootId(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxGenericDirCtrl_GetTreeCtrl(_swigobj) (_swigobj->GetTreeCtrl()) +static PyObject *_wrap_wxGenericDirCtrl_GetTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTreeCtrl * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetTreeCtrl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetTreeCtrl. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxTreeCtrl *)wxGenericDirCtrl_GetTreeCtrl(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxGenericDirCtrl_GetFilterListCtrl(_swigobj) (_swigobj->GetFilterListCtrl()) +static PyObject *_wrap_wxGenericDirCtrl_GetFilterListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDirFilterListCtrl * _result; + wxGenericDirCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGenericDirCtrl_GetFilterListCtrl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGenericDirCtrl_GetFilterListCtrl. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxDirFilterListCtrl *)wxGenericDirCtrl_GetFilterListCtrl(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDirFilterListCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxDirFilterListCtrlTowxChoice(void *ptr) { + wxDirFilterListCtrl *src; + wxChoice *dest; + src = (wxDirFilterListCtrl *) ptr; + dest = (wxChoice *) src; + return (void *) dest; +} + +static void *SwigwxDirFilterListCtrlTowxControlWithItems(void *ptr) { + wxDirFilterListCtrl *src; + wxControlWithItems *dest; + src = (wxDirFilterListCtrl *) ptr; + dest = (wxControlWithItems *) src; + return (void *) dest; +} + +static void *SwigwxDirFilterListCtrlTowxControl(void *ptr) { + wxDirFilterListCtrl *src; + wxControl *dest; + src = (wxDirFilterListCtrl *) ptr; + dest = (wxControl *) src; + return (void *) dest; +} + +static void *SwigwxDirFilterListCtrlTowxWindow(void *ptr) { + wxDirFilterListCtrl *src; + wxWindow *dest; + src = (wxDirFilterListCtrl *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxDirFilterListCtrlTowxEvtHandler(void *ptr) { + wxDirFilterListCtrl *src; + wxEvtHandler *dest; + src = (wxDirFilterListCtrl *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxDirFilterListCtrlTowxObject(void *ptr) { + wxDirFilterListCtrl *src; + wxObject *dest; + src = (wxDirFilterListCtrl *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxDirFilterListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxDirFilterListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_new_wxDirFilterListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDirFilterListCtrl * _result; + wxGenericDirCtrl * _arg0; + wxWindowID _arg1 = (wxWindowID ) -1; + wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg3 = (wxSize *) &wxDefaultSize; + long _arg4 = (long ) 0; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj2 = 0; + wxSize temp0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","id","pos","size","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOl:new_wxDirFilterListCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDirFilterListCtrl. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = &temp; + if (! wxPoint_helper(_obj2, &_arg2)) + return NULL; +} + if (_obj3) +{ + _arg3 = &temp0; + if (! wxSize_helper(_obj3, &_arg3)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxDirFilterListCtrl *)new_wxDirFilterListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDirFilterListCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPreDirFilterListCtrl() (new wxDirFilterListCtrl()) +static PyObject *_wrap_new_wxPreDirFilterListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDirFilterListCtrl * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreDirFilterListCtrl",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxDirFilterListCtrl *)new_wxPreDirFilterListCtrl(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDirFilterListCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDirFilterListCtrl_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxDirFilterListCtrl_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDirFilterListCtrl * _arg0; + wxGenericDirCtrl * _arg1; + wxWindowID _arg2 = (wxWindowID ) -1; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) 0; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","parent","id","pos","size","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOl:wxDirFilterListCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirFilterListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirFilterListCtrl_Create. Expected _wxDirFilterListCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGenericDirCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDirFilterListCtrl_Create. Expected _wxGenericDirCtrl_p."); + return NULL; + } + } + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxDirFilterListCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxDirFilterListCtrl_FillFilterList(_swigobj,_swigarg0,_swigarg1) (_swigobj->FillFilterList(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDirFilterListCtrl_FillFilterList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDirFilterListCtrl * _arg0; + wxString * _arg1; + int _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","filter","defaultFilter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi:wxDirFilterListCtrl_FillFilterList",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDirFilterListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDirFilterListCtrl_FillFilterList. Expected _wxDirFilterListCtrl_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDirFilterListCtrl_FillFilterList(_arg0,*_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + static PyMethodDef controls2cMethods[] = { + { "wxDirFilterListCtrl_FillFilterList", (PyCFunction) _wrap_wxDirFilterListCtrl_FillFilterList, METH_VARARGS | METH_KEYWORDS }, + { "wxDirFilterListCtrl_Create", (PyCFunction) _wrap_wxDirFilterListCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreDirFilterListCtrl", (PyCFunction) _wrap_new_wxPreDirFilterListCtrl, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDirFilterListCtrl", (PyCFunction) _wrap_new_wxDirFilterListCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetFilterListCtrl", (PyCFunction) _wrap_wxGenericDirCtrl_GetFilterListCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetTreeCtrl", (PyCFunction) _wrap_wxGenericDirCtrl_GetTreeCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetRootId", (PyCFunction) _wrap_wxGenericDirCtrl_GetRootId, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_SetFilterIndex", (PyCFunction) _wrap_wxGenericDirCtrl_SetFilterIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetFilterIndex", (PyCFunction) _wrap_wxGenericDirCtrl_GetFilterIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_SetFilter", (PyCFunction) _wrap_wxGenericDirCtrl_SetFilter, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetFilter", (PyCFunction) _wrap_wxGenericDirCtrl_GetFilter, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetShowHidden", (PyCFunction) _wrap_wxGenericDirCtrl_GetShowHidden, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_ShowHidden", (PyCFunction) _wrap_wxGenericDirCtrl_ShowHidden, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_SetPath", (PyCFunction) _wrap_wxGenericDirCtrl_SetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetFilePath", (PyCFunction) _wrap_wxGenericDirCtrl_GetFilePath, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetPath", (PyCFunction) _wrap_wxGenericDirCtrl_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_SetDefaultPath", (PyCFunction) _wrap_wxGenericDirCtrl_SetDefaultPath, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_GetDefaultPath", (PyCFunction) _wrap_wxGenericDirCtrl_GetDefaultPath, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_ExpandPath", (PyCFunction) _wrap_wxGenericDirCtrl_ExpandPath, METH_VARARGS | METH_KEYWORDS }, + { "wxGenericDirCtrl_Create", (PyCFunction) _wrap_wxGenericDirCtrl_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreGenericDirCtrl", (PyCFunction) _wrap_new_wxPreGenericDirCtrl, METH_VARARGS | METH_KEYWORDS }, + { "new_wxGenericDirCtrl", (PyCFunction) _wrap_new_wxGenericDirCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_isDir_get", (PyCFunction) _wrap_wxDirItemData_m_isDir_get, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_isDir_set", (PyCFunction) _wrap_wxDirItemData_m_isDir_set, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_isExpanded_get", (PyCFunction) _wrap_wxDirItemData_m_isExpanded_get, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_isExpanded_set", (PyCFunction) _wrap_wxDirItemData_m_isExpanded_set, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_isHidden_get", (PyCFunction) _wrap_wxDirItemData_m_isHidden_get, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_isHidden_set", (PyCFunction) _wrap_wxDirItemData_m_isHidden_set, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_name_get", (PyCFunction) _wrap_wxDirItemData_m_name_get, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_name_set", (PyCFunction) _wrap_wxDirItemData_m_name_set, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_path_get", (PyCFunction) _wrap_wxDirItemData_m_path_get, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_m_path_set", (PyCFunction) _wrap_wxDirItemData_m_path_set, METH_VARARGS | METH_KEYWORDS }, + { "wxDirItemData_SetNewDirName", (PyCFunction) _wrap_wxDirItemData_SetNewDirName, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDirItemData", (PyCFunction) _wrap_new_wxDirItemData, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemDropHighlight", (PyCFunction) _wrap_wxTreeCtrl_SetItemDropHighlight, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS }, @@ -9787,6 +11421,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent}, { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent}, { "_byte","_unsigned_char",0}, + { "_wxChoice","_wxDirFilterListCtrl",SwigwxDirFilterListCtrlTowxChoice}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_size_t","_wxCoord",0}, @@ -9825,6 +11460,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, + { "_wxObject","_wxDirFilterListCtrl",SwigwxDirFilterListCtrlTowxObject}, + { "_wxObject","_wxGenericDirCtrl",SwigwxGenericDirCtrlTowxObject}, + { "_wxObject","_wxDirItemData",SwigwxDirItemDataTowxObject}, { "_wxObject","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject}, { "_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject}, { "_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject}, @@ -9835,6 +11473,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, { "_unsigned_char","_byte",0}, + { "_wxControl","_wxDirFilterListCtrl",SwigwxDirFilterListCtrlTowxControl}, + { "_wxControl","_wxGenericDirCtrl",SwigwxGenericDirCtrlTowxControl}, { "_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl}, { "_wxControl","_wxListView",SwigwxListViewTowxControl}, { "_wxControl","_wxPyListCtrl",SwigwxPyListCtrlTowxControl}, @@ -9848,6 +11488,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_short","_WXTYPE",0}, { "_short","_unsigned_short",0}, { "_short","_signed_short",0}, + { "_wxControlWithItems","_wxDirFilterListCtrl",SwigwxDirFilterListCtrlTowxControlWithItems}, { "_wxWindowID","_wxCoord",0}, { "_wxWindowID","_wxPrintQuality",0}, { "_wxWindowID","_time_t",0}, @@ -9883,9 +11524,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, { "_wxPyListCtrl","_wxListView",SwigwxListViewTowxPyListCtrl}, + { "_wxEvtHandler","_wxDirFilterListCtrl",SwigwxDirFilterListCtrlTowxEvtHandler}, + { "_wxEvtHandler","_wxGenericDirCtrl",SwigwxGenericDirCtrlTowxEvtHandler}, { "_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler}, { "_wxEvtHandler","_wxListView",SwigwxListViewTowxEvtHandler}, { "_wxEvtHandler","_wxPyListCtrl",SwigwxPyListCtrlTowxEvtHandler}, + { "_wxWindow","_wxDirFilterListCtrl",SwigwxDirFilterListCtrlTowxWindow}, + { "_wxWindow","_wxGenericDirCtrl",SwigwxGenericDirCtrlTowxWindow}, { "_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow}, { "_wxWindow","_wxListView",SwigwxListViewTowxWindow}, { "_wxWindow","_wxPyListCtrl",SwigwxPyListCtrlTowxWindow}, @@ -10039,6 +11684,10 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)); PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)); PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_DRAG)); + PyDict_SetItemString(d,"wxDIRCTRL_DIR_ONLY", PyInt_FromLong((long) wxDIRCTRL_DIR_ONLY)); + PyDict_SetItemString(d,"wxDIRCTRL_SELECT_FIRST", PyInt_FromLong((long) wxDIRCTRL_SELECT_FIRST)); + PyDict_SetItemString(d,"wxDIRCTRL_SHOW_FILTERS", PyInt_FromLong((long) wxDIRCTRL_SHOW_FILTERS)); + PyDict_SetItemString(d,"wxDIRCTRL_3D_INTERNAL", PyInt_FromLong((long) wxDIRCTRL_3D_INTERNAL)); // Map renamed classes back to their common name for OOR wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index b22e04c377..66a0e5ea88 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -1119,6 +1119,151 @@ def wxPreTreeCtrl(*_args,**_kwargs): return val +class wxDirItemDataPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def SetNewDirName(self, *_args, **_kwargs): + val = apply(controls2c.wxDirItemData_SetNewDirName,(self,) + _args, _kwargs) + return val + def __setattr__(self,name,value): + if name == "m_path" : + controls2c.wxDirItemData_m_path_set(self,value) + return + if name == "m_name" : + controls2c.wxDirItemData_m_name_set(self,value) + return + if name == "m_isHidden" : + controls2c.wxDirItemData_m_isHidden_set(self,value) + return + if name == "m_isExpanded" : + controls2c.wxDirItemData_m_isExpanded_set(self,value) + return + if name == "m_isDir" : + controls2c.wxDirItemData_m_isDir_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_path" : + return controls2c.wxDirItemData_m_path_get(self) + if name == "m_name" : + return controls2c.wxDirItemData_m_name_get(self) + if name == "m_isHidden" : + return controls2c.wxDirItemData_m_isHidden_get(self) + if name == "m_isExpanded" : + return controls2c.wxDirItemData_m_isExpanded_get(self) + if name == "m_isDir" : + return controls2c.wxDirItemData_m_isDir_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) +class wxDirItemData(wxDirItemDataPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controls2c.new_wxDirItemData,_args,_kwargs) + self.thisown = 1 + + + + +class wxGenericDirCtrlPtr(wxControlPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_Create,(self,) + _args, _kwargs) + return val + def ExpandPath(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_ExpandPath,(self,) + _args, _kwargs) + return val + def GetDefaultPath(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetDefaultPath,(self,) + _args, _kwargs) + return val + def SetDefaultPath(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_SetDefaultPath,(self,) + _args, _kwargs) + return val + def GetPath(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetPath,(self,) + _args, _kwargs) + return val + def GetFilePath(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetFilePath,(self,) + _args, _kwargs) + return val + def SetPath(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_SetPath,(self,) + _args, _kwargs) + return val + def ShowHidden(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_ShowHidden,(self,) + _args, _kwargs) + return val + def GetShowHidden(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetShowHidden,(self,) + _args, _kwargs) + return val + def GetFilter(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetFilter,(self,) + _args, _kwargs) + return val + def SetFilter(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_SetFilter,(self,) + _args, _kwargs) + return val + def GetFilterIndex(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetFilterIndex,(self,) + _args, _kwargs) + return val + def SetFilterIndex(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_SetFilterIndex,(self,) + _args, _kwargs) + return val + def GetRootId(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetRootId,(self,) + _args, _kwargs) + if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 + return val + def GetTreeCtrl(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetTreeCtrl,(self,) + _args, _kwargs) + if val: val = wxTreeCtrlPtr(val) + return val + def GetFilterListCtrl(self, *_args, **_kwargs): + val = apply(controls2c.wxGenericDirCtrl_GetFilterListCtrl,(self,) + _args, _kwargs) + if val: val = wxDirFilterListCtrlPtr(val) + return val + def __repr__(self): + return "" % (self.this,) +class wxGenericDirCtrl(wxGenericDirCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controls2c.new_wxGenericDirCtrl,_args,_kwargs) + self.thisown = 1 + self._setOORInfo(self) + + + +def wxPreGenericDirCtrl(*_args,**_kwargs): + val = wxGenericDirCtrlPtr(apply(controls2c.new_wxPreGenericDirCtrl,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(val) + return val + + +class wxDirFilterListCtrlPtr(wxChoicePtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(controls2c.wxDirFilterListCtrl_Create,(self,) + _args, _kwargs) + return val + def FillFilterList(self, *_args, **_kwargs): + val = apply(controls2c.wxDirFilterListCtrl_FillFilterList,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxDirFilterListCtrl(wxDirFilterListCtrlPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(controls2c.new_wxDirFilterListCtrl,_args,_kwargs) + self.thisown = 1 + self._setOORInfo(self) + + + +def wxPreDirFilterListCtrl(*_args,**_kwargs): + val = wxDirFilterListCtrlPtr(apply(controls2c.new_wxPreDirFilterListCtrl,_args,_kwargs)) + val.thisown = 1 + val._setOORInfo(val) + return val + + #-------------- FUNCTION WRAPPERS ------------------ @@ -1266,3 +1411,7 @@ wxEVT_COMMAND_TREE_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_TREE_ITEM_ACTIVATED wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK wxEVT_COMMAND_TREE_END_DRAG = controls2c.wxEVT_COMMAND_TREE_END_DRAG +wxDIRCTRL_DIR_ONLY = controls2c.wxDIRCTRL_DIR_ONLY +wxDIRCTRL_SELECT_FIRST = controls2c.wxDIRCTRL_SELECT_FIRST +wxDIRCTRL_SHOW_FILTERS = controls2c.wxDIRCTRL_SHOW_FILTERS +wxDIRCTRL_3D_INTERNAL = controls2c.wxDIRCTRL_3D_INTERNAL diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 87d66fe070..292a556789 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -4695,6 +4695,34 @@ static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxFont_IsFixedWidth(_swigobj) (_swigobj->IsFixedWidth()) +static PyObject *_wrap_wxFont_IsFixedWidth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFont * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_IsFixedWidth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_IsFixedWidth. Expected _wxFont_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxFont_IsFixedWidth(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxFont_GetNativeFontInfo(_swigobj) (_swigobj->GetNativeFontInfo()) static PyObject *_wrap_wxFont_GetNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -13125,6 +13153,7 @@ static PyMethodDef gdicMethods[] = { { "wxFont_GetNativeFontInfoUserDesc", (PyCFunction) _wrap_wxFont_GetNativeFontInfoUserDesc, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetNativeFontInfoDesc", (PyCFunction) _wrap_wxFont_GetNativeFontInfoDesc, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetNativeFontInfo", (PyCFunction) _wrap_wxFont_GetNativeFontInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_IsFixedWidth", (PyCFunction) _wrap_wxFont_IsFixedWidth, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetEncoding", (PyCFunction) _wrap_wxFont_GetEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetFaceName", (PyCFunction) _wrap_wxFont_GetFaceName, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetUnderlined", (PyCFunction) _wrap_wxFont_GetUnderlined, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index f7eaf8cbc5..31baa67ba2 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -387,6 +387,9 @@ class wxFontPtr(wxGDIObjectPtr): def GetEncoding(self, *_args, **_kwargs): val = apply(gdic.wxFont_GetEncoding,(self,) + _args, _kwargs) return val + def IsFixedWidth(self, *_args, **_kwargs): + val = apply(gdic.wxFont_IsFixedWidth,(self,) + _args, _kwargs) + return val def GetNativeFontInfo(self, *_args, **_kwargs): val = apply(gdic.wxFont_GetNativeFontInfo,(self,) + _args, _kwargs) if val: val = wxNativeFontInfoPtr(val) diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index 6c2b5b5e4c..4a4115c10b 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -916,6 +916,130 @@ static PyObject *_wrap_new_wxICOHandler(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxCURHandlerTowxICOHandler(void *ptr) { + wxCURHandler *src; + wxICOHandler *dest; + src = (wxCURHandler *) ptr; + dest = (wxICOHandler *) src; + return (void *) dest; +} + +static void *SwigwxCURHandlerTowxBMPHandler(void *ptr) { + wxCURHandler *src; + wxBMPHandler *dest; + src = (wxCURHandler *) ptr; + dest = (wxBMPHandler *) src; + return (void *) dest; +} + +static void *SwigwxCURHandlerTowxImageHandler(void *ptr) { + wxCURHandler *src; + wxImageHandler *dest; + src = (wxCURHandler *) ptr; + dest = (wxImageHandler *) src; + return (void *) dest; +} + +static void *SwigwxCURHandlerTowxObject(void *ptr) { + wxCURHandler *src; + wxObject *dest; + src = (wxCURHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxCURHandler() (new wxCURHandler()) +static PyObject *_wrap_new_wxCURHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCURHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxCURHandler",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCURHandler *)new_wxCURHandler(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCURHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static void *SwigwxANIHandlerTowxCURHandler(void *ptr) { + wxANIHandler *src; + wxCURHandler *dest; + src = (wxANIHandler *) ptr; + dest = (wxCURHandler *) src; + return (void *) dest; +} + +static void *SwigwxANIHandlerTowxICOHandler(void *ptr) { + wxANIHandler *src; + wxICOHandler *dest; + src = (wxANIHandler *) ptr; + dest = (wxICOHandler *) src; + return (void *) dest; +} + +static void *SwigwxANIHandlerTowxBMPHandler(void *ptr) { + wxANIHandler *src; + wxBMPHandler *dest; + src = (wxANIHandler *) ptr; + dest = (wxBMPHandler *) src; + return (void *) dest; +} + +static void *SwigwxANIHandlerTowxImageHandler(void *ptr) { + wxANIHandler *src; + wxImageHandler *dest; + src = (wxANIHandler *) ptr; + dest = (wxImageHandler *) src; + return (void *) dest; +} + +static void *SwigwxANIHandlerTowxObject(void *ptr) { + wxANIHandler *src; + wxObject *dest; + src = (wxANIHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxANIHandler() (new wxANIHandler()) +static PyObject *_wrap_new_wxANIHandler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxANIHandler * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxANIHandler",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxANIHandler *)new_wxANIHandler(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxANIHandler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxGIFHandlerTowxImageHandler(void *ptr) { wxGIFHandler *src; wxImageHandler *dest; @@ -2891,6 +3015,8 @@ static PyMethodDef imagecMethods[] = { { "new_wxPCXHandler", (PyCFunction) _wrap_new_wxPCXHandler, METH_VARARGS | METH_KEYWORDS }, { "new_wxPNMHandler", (PyCFunction) _wrap_new_wxPNMHandler, METH_VARARGS | METH_KEYWORDS }, { "new_wxGIFHandler", (PyCFunction) _wrap_new_wxGIFHandler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxANIHandler", (PyCFunction) _wrap_new_wxANIHandler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxCURHandler", (PyCFunction) _wrap_new_wxCURHandler, METH_VARARGS | METH_KEYWORDS }, { "new_wxICOHandler", (PyCFunction) _wrap_new_wxICOHandler, METH_VARARGS | METH_KEYWORDS }, { "new_wxBMPHandler", (PyCFunction) _wrap_new_wxBMPHandler, METH_VARARGS | METH_KEYWORDS }, { "new_wxJPEGHandler", (PyCFunction) _wrap_new_wxJPEGHandler, METH_VARARGS | METH_KEYWORDS }, @@ -2920,7 +3046,11 @@ static PyMethodDef imagecMethods[] = { */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_signed_long","_long",0}, + { "_wxBMPHandler","_wxANIHandler",SwigwxANIHandlerTowxBMPHandler}, + { "_wxBMPHandler","_wxCURHandler",SwigwxCURHandlerTowxBMPHandler}, { "_wxBMPHandler","_wxICOHandler",SwigwxICOHandlerTowxBMPHandler}, + { "_wxICOHandler","_wxANIHandler",SwigwxANIHandlerTowxICOHandler}, + { "_wxICOHandler","_wxCURHandler",SwigwxCURHandlerTowxICOHandler}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, { "_wxPrintQuality","_signed_int",0}, @@ -2934,6 +3064,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxImageHandler","_wxPCXHandler",SwigwxPCXHandlerTowxImageHandler}, { "_wxImageHandler","_wxPNMHandler",SwigwxPNMHandlerTowxImageHandler}, { "_wxImageHandler","_wxGIFHandler",SwigwxGIFHandlerTowxImageHandler}, + { "_wxImageHandler","_wxANIHandler",SwigwxANIHandlerTowxImageHandler}, + { "_wxImageHandler","_wxCURHandler",SwigwxCURHandlerTowxImageHandler}, { "_wxImageHandler","_wxICOHandler",SwigwxICOHandlerTowxImageHandler}, { "_wxImageHandler","_wxBMPHandler",SwigwxBMPHandlerTowxImageHandler}, { "_wxImageHandler","_wxJPEGHandler",SwigwxJPEGHandlerTowxImageHandler}, @@ -2980,6 +3112,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxPCXHandler",SwigwxPCXHandlerTowxObject}, { "_wxObject","_wxPNMHandler",SwigwxPNMHandlerTowxObject}, { "_wxObject","_wxGIFHandler",SwigwxGIFHandlerTowxObject}, + { "_wxObject","_wxANIHandler",SwigwxANIHandlerTowxObject}, + { "_wxObject","_wxCURHandler",SwigwxCURHandlerTowxObject}, { "_wxObject","_wxICOHandler",SwigwxICOHandlerTowxObject}, { "_wxObject","_wxBMPHandler",SwigwxBMPHandlerTowxObject}, { "_wxObject","_wxJPEGHandler",SwigwxJPEGHandlerTowxObject}, @@ -2987,6 +3121,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxImageHandler",SwigwxImageHandlerTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, + { "_wxCURHandler","_wxANIHandler",SwigwxANIHandlerTowxCURHandler}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, diff --git a/wxPython/src/msw/image.py b/wxPython/src/msw/image.py index d2200ceafb..227aa78dcd 100644 --- a/wxPython/src/msw/image.py +++ b/wxPython/src/msw/image.py @@ -100,6 +100,34 @@ class wxICOHandler(wxICOHandlerPtr): +class wxCURHandlerPtr(wxICOHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxCURHandler(wxCURHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(imagec.new_wxCURHandler,_args,_kwargs) + self.thisown = 1 + + + + +class wxANIHandlerPtr(wxCURHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" % (self.this,) +class wxANIHandler(wxANIHandlerPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(imagec.new_wxANIHandler,_args,_kwargs) + self.thisown = 1 + + + + class wxGIFHandlerPtr(wxImageHandlerPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index 80c0e723a4..354610463c 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -2362,67 +2362,6 @@ static PyObject *_wrap_wxSystemSettings_HasFeature(PyObject *self, PyObject *arg return _resultobj; } -static PyObject *_wrap_wxSystemSettings_GetSystemColour(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxColour * _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemColour",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxSystemSettings::GetColour(_arg0)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemFont(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFont * _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemFont",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxSystemSettings::GetFont(_arg0)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxSystemSettings_GetSystemMetric(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - int _arg0; - char *_kwnames[] = { "index", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSystemSettings_GetSystemMetric",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSystemSettings::GetMetric(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static void *SwigwxToolTipTowxObject(void *ptr) { wxToolTip *src; wxObject *dest; @@ -4552,6 +4491,34 @@ static PyObject *_wrap_new_wxStopWatch(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define delete_wxStopWatch(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxStopWatch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStopWatch * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxStopWatch",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStopWatch_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxStopWatch. Expected _wxStopWatch_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxStopWatch(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxStopWatch_Start(_swigobj,_swigarg0) (_swigobj->Start(_swigarg0)) static PyObject *_wrap_wxStopWatch_Start(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10386,6 +10353,7 @@ static PyMethodDef misc2cMethods[] = { { "wxStopWatch_Resume", (PyCFunction) _wrap_wxStopWatch_Resume, METH_VARARGS | METH_KEYWORDS }, { "wxStopWatch_Pause", (PyCFunction) _wrap_wxStopWatch_Pause, METH_VARARGS | METH_KEYWORDS }, { "wxStopWatch_Start", (PyCFunction) _wrap_wxStopWatch_Start, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxStopWatch", (PyCFunction) _wrap_delete_wxStopWatch, METH_VARARGS | METH_KEYWORDS }, { "new_wxStopWatch", (PyCFunction) _wrap_new_wxStopWatch, METH_VARARGS | METH_KEYWORDS }, { "wxPyTimer_Stop", (PyCFunction) _wrap_wxPyTimer_Stop, METH_VARARGS | METH_KEYWORDS }, { "wxPyTimer_Start", (PyCFunction) _wrap_wxPyTimer_Start, METH_VARARGS | METH_KEYWORDS }, @@ -10448,9 +10416,6 @@ static PyMethodDef misc2cMethods[] = { { "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS }, { "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemMetric", (PyCFunction) _wrap_wxSystemSettings_GetSystemMetric, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemFont", (PyCFunction) _wrap_wxSystemSettings_GetSystemFont, METH_VARARGS | METH_KEYWORDS }, - { "wxSystemSettings_GetSystemColour", (PyCFunction) _wrap_wxSystemSettings_GetSystemColour, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_HasFeature", (PyCFunction) _wrap_wxSystemSettings_HasFeature, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_GetMetric", (PyCFunction) _wrap_wxSystemSettings_GetMetric, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_GetFont", (PyCFunction) _wrap_wxSystemSettings_GetFont, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index 4aef34e8ce..135de3b950 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -332,6 +332,9 @@ class wxStopWatchPtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,misc2c=misc2c): + if self.thisown == 1 : + misc2c.delete_wxStopWatch(self) def Start(self, *_args, **_kwargs): val = apply(misc2c.wxStopWatch_Start,(self,) + _args, _kwargs) return val @@ -1151,18 +1154,6 @@ wxSystemSettings_GetMetric = misc2c.wxSystemSettings_GetMetric wxSystemSettings_HasFeature = misc2c.wxSystemSettings_HasFeature -def wxSystemSettings_GetSystemColour(*_args, **_kwargs): - val = apply(misc2c.wxSystemSettings_GetSystemColour,_args,_kwargs) - if val: val = wxColourPtr(val); val.thisown = 1 - return val - -def wxSystemSettings_GetSystemFont(*_args, **_kwargs): - val = apply(misc2c.wxSystemSettings_GetSystemFont,_args,_kwargs) - if val: val = wxFontPtr(val); val.thisown = 1 - return val - -wxSystemSettings_GetSystemMetric = misc2c.wxSystemSettings_GetSystemMetric - wxToolTip_Enable = misc2c.wxToolTip_Enable wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index 0f826b747e..736a71d761 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -2015,6 +2015,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE)); PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB)); PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); + PyDict_SetItemString(d,"wxTE_RICH2", PyInt_FromLong((long) wxTE_RICH2)); PyDict_SetItemString(d,"wxTE_NO_VSCROLL", PyInt_FromLong((long) wxTE_NO_VSCROLL)); PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL)); PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); @@ -2407,6 +2408,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxBITMAP_TYPE_PICT_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_PICT_RESOURCE)); PyDict_SetItemString(d,"wxBITMAP_TYPE_ICON", PyInt_FromLong((long) wxBITMAP_TYPE_ICON)); PyDict_SetItemString(d,"wxBITMAP_TYPE_ICON_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_ICON_RESOURCE)); + PyDict_SetItemString(d,"wxBITMAP_TYPE_ANI", PyInt_FromLong((long) wxBITMAP_TYPE_ANI)); PyDict_SetItemString(d,"wxBITMAP_TYPE_MACCURSOR", PyInt_FromLong((long) wxBITMAP_TYPE_MACCURSOR)); PyDict_SetItemString(d,"wxBITMAP_TYPE_MACCURSOR_RESOURCE", PyInt_FromLong((long) wxBITMAP_TYPE_MACCURSOR_RESOURCE)); PyDict_SetItemString(d,"wxBITMAP_TYPE_ANY", PyInt_FromLong((long) wxBITMAP_TYPE_ANY)); diff --git a/wxPython/src/msw/wx.py b/wxPython/src/msw/wx.py index fa40ff14e1..e48bb7f1bb 100644 --- a/wxPython/src/msw/wx.py +++ b/wxPython/src/msw/wx.py @@ -249,6 +249,7 @@ wxTE_READONLY = wxc.wxTE_READONLY wxTE_MULTILINE = wxc.wxTE_MULTILINE wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB wxTE_RICH = wxc.wxTE_RICH +wxTE_RICH2 = wxc.wxTE_RICH2 wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER @@ -641,6 +642,7 @@ wxBITMAP_TYPE_PICT = wxc.wxBITMAP_TYPE_PICT wxBITMAP_TYPE_PICT_RESOURCE = wxc.wxBITMAP_TYPE_PICT_RESOURCE wxBITMAP_TYPE_ICON = wxc.wxBITMAP_TYPE_ICON wxBITMAP_TYPE_ICON_RESOURCE = wxc.wxBITMAP_TYPE_ICON_RESOURCE +wxBITMAP_TYPE_ANI = wxc.wxBITMAP_TYPE_ANI wxBITMAP_TYPE_MACCURSOR = wxc.wxBITMAP_TYPE_MACCURSOR wxBITMAP_TYPE_MACCURSOR_RESOURCE = wxc.wxBITMAP_TYPE_MACCURSOR_RESOURCE wxBITMAP_TYPE_ANY = wxc.wxBITMAP_TYPE_ANY @@ -1445,12 +1447,6 @@ class wxTimer(wxPyTimer): wxPyTimer.__init__(self, None) self.SetOwner(evtHandler, id) -#---------------------------------------------------------------------- - -NULL = None # For backwards compatibility only. You should really be - # using None now. - - #---------------------------------------------------------------------- # aliases @@ -1462,7 +1458,10 @@ wxPen = wxPyPen wxNoRefBitmap = wxBitmap wxPyDefaultPosition = wxDefaultPosition wxPyDefaultSize = wxDefaultSize - +NULL = None +wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour +wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont +wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric #---------------------------------------------------------------------- # wxGTK sets the locale when initialized. Doing this at the Python diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index d6b99441ef..d25e6e5077 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -312,6 +312,23 @@ $target = t_output_helper($target, o); } + +%typemap(python,ignore) bool *T_OUTPUT(int temp) +{ + $target = (bool*)&temp; +} + +%typemap(python,argout) bool *T_OUTPUT +{ + PyObject *o; + o = PyInt_FromLong((long) (*$source)); + $target = t_output_helper($target, o); +} + + +%typemap(python,ignore) bool *OUTPUT = bool *T_OUTPUT; +%typemap(python,argout) bool *OUTPUT = bool *T_OUTPUT; + //--------------------------------------------------------------------------- // Typemaps to convert return values that are base class pointers // to the real derived type, if possible. See wxPyMake_wxObject in -- 2.45.2