From 3ef86e32ddee8d77078b1e18affa3cadcdc420d2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 24 Jul 2003 00:28:34 +0000 Subject: [PATCH] Lots of changes for wxPython to start using many of the new featues in wxWindows 2.5 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/CHANGES.txt | 34 ++ wxPython/contrib/stc/gtk/stc_.cpp | 187 ++++++++ wxPython/contrib/stc/gtk/stc_.py | 41 ++ wxPython/contrib/xrc/xrc.cpp | 2 +- wxPython/contrib/xrc/xrc.i | 2 +- wxPython/setup.py | 418 +++++------------ wxPython/src/_defs.i | 102 ++-- wxPython/src/_extras.py | 32 +- wxPython/src/cmndlgs.i | 45 +- wxPython/src/controls.i | 72 ++- wxPython/src/controls2.i | 87 +++- wxPython/src/events.i | 131 +++++- wxPython/src/fonts.i | 77 ++-- wxPython/src/frames.i | 10 +- wxPython/src/gdi.i | 69 +++ wxPython/src/grid.i | 3 +- wxPython/src/gtk/cmndlgs.cpp | 437 ++++++++---------- wxPython/src/gtk/cmndlgs.py | 55 ++- wxPython/src/gtk/controls.cpp | 582 ++++++++++++++++++++++- wxPython/src/gtk/controls.py | 87 ++++ wxPython/src/gtk/controls2.cpp | 448 +++++++++++------- wxPython/src/gtk/controls2.py | 91 ++-- wxPython/src/gtk/events.cpp | 740 +++++++++++++++++++++++++++--- wxPython/src/gtk/events.py | 99 +++- wxPython/src/gtk/fonts.cpp | 351 ++++++++------ wxPython/src/gtk/fonts.py | 24 +- wxPython/src/gtk/frames.cpp | 70 ++- wxPython/src/gtk/frames.py | 6 + wxPython/src/gtk/gdi.cpp | 348 ++++++++++++++ wxPython/src/gtk/gdi.py | 54 +++ wxPython/src/gtk/grid.cpp | 35 +- wxPython/src/gtk/grid.py | 3 + wxPython/src/gtk/html.cpp | 504 +++++++++++++++++++- wxPython/src/gtk/html.py | 51 ++ wxPython/src/gtk/image.cpp | 45 +- wxPython/src/gtk/image.py | 2 + wxPython/src/gtk/misc.cpp | 72 +++ wxPython/src/gtk/misc.py | 6 + wxPython/src/gtk/misc2.cpp | 208 +++++++++ wxPython/src/gtk/misc2.py | 24 + wxPython/src/gtk/stattool.cpp | 49 +- wxPython/src/gtk/stattool.py | 14 + wxPython/src/gtk/windows.cpp | 201 ++++++-- wxPython/src/gtk/windows.py | 18 +- wxPython/src/gtk/windows2.cpp | 241 +++++++--- wxPython/src/gtk/windows2.py | 47 +- wxPython/src/gtk/wizard.cpp | 68 ++- wxPython/src/gtk/wizard.py | 6 + wxPython/src/gtk/wx.cpp | 83 ++-- wxPython/src/gtk/wx.py | 112 ++--- wxPython/src/helpers.cpp | 4 +- wxPython/src/helpers.h | 2 +- wxPython/src/html.i | 73 ++- wxPython/src/image.i | 11 +- wxPython/src/misc.i | 3 + wxPython/src/misc2.i | 21 + wxPython/src/printfw.i | 71 ++- wxPython/src/stattool.i | 16 + wxPython/src/windows.i | 35 +- wxPython/src/windows2.i | 183 ++++++-- wxPython/src/wizard.i | 10 +- 61 files changed, 5476 insertions(+), 1446 deletions(-) diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 5d81424b18..cda0d587cd 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,6 +2,40 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- +2.5.0.x +------- + +Many, many little fixes, changes and additions done as part of the move +to wxWindows 2.5 that I have forgotten about. + +Changed the import-startup-bootstrap process employed by wxPython such +that wxWindows and the underlying gui toolkit are not initialized +until the wxApp object is created (but before wxApp.OnInit is called.) +This was required because of changes made to the C++ wxApp class. +There are both benefits and potential problems with this change. The +benefits are that you can import wxPython without requiring access to +a GUI (for checking version numbers, etc.) and that in a +multi-threaded environment the thread that creates the app object will +now be the GUI thread instead of the one that imports wxPython. Some +potential problems are that the C++ side of the "stock-objects" +(wxBLUE_PEN, wxTheColourDatabase, etc.) are not initialized until the +wxApp object is created, so you should not use them until then. Also, +you will probably not be able to do any kind of GUI operation unless +you have an app object first, (even on Windows where most anything was +possible beofre.) + +Added wxMirrorDC. + +Added wxIconLocation + +wxPython's setup.py script now expects to use existing libraries for +the contribs (gizmos, stc, xrc, etc.) rather than building local +copies of them. + + + + + 2.4.1.x ------- diff --git a/wxPython/contrib/stc/gtk/stc_.cpp b/wxPython/contrib/stc/gtk/stc_.cpp index 7deb374c77..a2883b21cb 100644 --- a/wxPython/contrib/stc/gtk/stc_.cpp +++ b/wxPython/contrib/stc/gtk/stc_.cpp @@ -7933,6 +7933,34 @@ static PyObject *_wrap_wxStyledTextCtrl_LineEndDisplayExtend(PyObject *self, PyO return _resultobj; } +#define wxStyledTextCtrl_LineCopy(_swigobj) (_swigobj->LineCopy()) +static PyObject *_wrap_wxStyledTextCtrl_LineCopy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStyledTextCtrl_LineCopy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_LineCopy. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStyledTextCtrl_LineCopy(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxStyledTextCtrl_MoveCaretInsideView(_swigobj) (_swigobj->MoveCaretInsideView()) static PyObject *_wrap_wxStyledTextCtrl_MoveCaretInsideView(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9605,6 +9633,134 @@ static PyObject *_wrap_wxStyledTextCtrl_SetHotspotActiveUnderline(PyObject *self return _resultobj; } +#define wxStyledTextCtrl_PositionBefore(_swigobj,_swigarg0) (_swigobj->PositionBefore(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_PositionBefore(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_PositionBefore",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_PositionBefore. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxStyledTextCtrl_PositionBefore(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_PositionAfter(_swigobj,_swigarg0) (_swigobj->PositionAfter(_swigarg0)) +static PyObject *_wrap_wxStyledTextCtrl_PositionAfter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxStyledTextCtrl * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxStyledTextCtrl_PositionAfter",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_PositionAfter. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxStyledTextCtrl_PositionAfter(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxStyledTextCtrl_CopyRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->CopyRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_CopyRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","start","end", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxStyledTextCtrl_CopyRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CopyRange. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStyledTextCtrl_CopyRange(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxStyledTextCtrl_CopyText(_swigobj,_swigarg0,_swigarg1) (_swigobj->CopyText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxStyledTextCtrl_CopyText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStyledTextCtrl * _arg0; + int _arg1; + wxString * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","length","text", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxStyledTextCtrl_CopyText",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxStyledTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxStyledTextCtrl_CopyText. Expected _wxStyledTextCtrl_p."); + return NULL; + } + } +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStyledTextCtrl_CopyText(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + #define wxStyledTextCtrl_StartRecord(_swigobj) (_swigobj->StartRecord()) static PyObject *_wrap_wxStyledTextCtrl_StartRecord(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11921,6 +12077,10 @@ static PyMethodDef stc_cMethods[] = { { "wxStyledTextCtrl_SetLexer", (PyCFunction) _wrap_wxStyledTextCtrl_SetLexer, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_StopRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StopRecord, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_StartRecord", (PyCFunction) _wrap_wxStyledTextCtrl_StartRecord, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CopyText", (PyCFunction) _wrap_wxStyledTextCtrl_CopyText, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_CopyRange", (PyCFunction) _wrap_wxStyledTextCtrl_CopyRange, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_PositionAfter", (PyCFunction) _wrap_wxStyledTextCtrl_PositionAfter, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_PositionBefore", (PyCFunction) _wrap_wxStyledTextCtrl_PositionBefore, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_SetHotspotActiveUnderline", (PyCFunction) _wrap_wxStyledTextCtrl_SetHotspotActiveUnderline, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_SetHotspotActiveBackground", (PyCFunction) _wrap_wxStyledTextCtrl_SetHotspotActiveBackground, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_SetHotspotActiveForeground", (PyCFunction) _wrap_wxStyledTextCtrl_SetHotspotActiveForeground, METH_VARARGS | METH_KEYWORDS }, @@ -11976,6 +12136,7 @@ static PyMethodDef stc_cMethods[] = { { "wxStyledTextCtrl_BraceHighlight", (PyCFunction) _wrap_wxStyledTextCtrl_BraceHighlight, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_LineLength", (PyCFunction) _wrap_wxStyledTextCtrl_LineLength, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_MoveCaretInsideView", (PyCFunction) _wrap_wxStyledTextCtrl_MoveCaretInsideView, METH_VARARGS | METH_KEYWORDS }, + { "wxStyledTextCtrl_LineCopy", (PyCFunction) _wrap_wxStyledTextCtrl_LineCopy, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_LineEndDisplayExtend", (PyCFunction) _wrap_wxStyledTextCtrl_LineEndDisplayExtend, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_LineEndDisplay", (PyCFunction) _wrap_wxStyledTextCtrl_LineEndDisplay, METH_VARARGS | METH_KEYWORDS }, { "wxStyledTextCtrl_HomeDisplayExtend", (PyCFunction) _wrap_wxStyledTextCtrl_HomeDisplayExtend, METH_VARARGS | METH_KEYWORDS }, @@ -12559,6 +12720,8 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_LEX_F77", PyInt_FromLong((long) 37)); PyDict_SetItemString(d,"wxSTC_LEX_CSS", PyInt_FromLong((long) 38)); PyDict_SetItemString(d,"wxSTC_LEX_POV", PyInt_FromLong((long) 39)); + PyDict_SetItemString(d,"wxSTC_LEX_LOUT", PyInt_FromLong((long) 40)); + PyDict_SetItemString(d,"wxSTC_LEX_ESCRIPT", PyInt_FromLong((long) 41)); PyDict_SetItemString(d,"wxSTC_LEX_AUTOMATIC", PyInt_FromLong((long) 1000)); PyDict_SetItemString(d,"wxSTC_P_DEFAULT", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"wxSTC_P_COMMENTLINE", PyInt_FromLong((long) 1)); @@ -12593,6 +12756,7 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_C_WORD2", PyInt_FromLong((long) 16)); PyDict_SetItemString(d,"wxSTC_C_COMMENTDOCKEYWORD", PyInt_FromLong((long) 17)); PyDict_SetItemString(d,"wxSTC_C_COMMENTDOCKEYWORDERROR", PyInt_FromLong((long) 18)); + PyDict_SetItemString(d,"wxSTC_C_GLOBALCLASS", PyInt_FromLong((long) 19)); PyDict_SetItemString(d,"wxSTC_H_DEFAULT", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"wxSTC_H_TAG", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxSTC_H_TAGUNKNOWN", PyInt_FromLong((long) 2)); @@ -12965,6 +13129,29 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_POV_IDENTIFIER", PyInt_FromLong((long) 8)); PyDict_SetItemString(d,"wxSTC_POV_BRACE", PyInt_FromLong((long) 9)); PyDict_SetItemString(d,"wxSTC_POV_WORD2", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_LOUT_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_LOUT_COMMENT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_LOUT_NUMBER", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_LOUT_WORD", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_LOUT_WORD2", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_LOUT_WORD3", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_LOUT_WORD4", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_LOUT_STRING", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_LOUT_OPERATOR", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_LOUT_IDENTIFIER", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_LOUT_STRINGEOL", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_DEFAULT", PyInt_FromLong((long) 0)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_COMMENT", PyInt_FromLong((long) 1)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_COMMENTLINE", PyInt_FromLong((long) 2)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_COMMENTDOC", PyInt_FromLong((long) 3)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_NUMBER", PyInt_FromLong((long) 4)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_WORD", PyInt_FromLong((long) 5)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_STRING", PyInt_FromLong((long) 6)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_OPERATOR", PyInt_FromLong((long) 7)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_IDENTIFIER", PyInt_FromLong((long) 8)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_BRACE", PyInt_FromLong((long) 9)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_WORD2", PyInt_FromLong((long) 10)); + PyDict_SetItemString(d,"wxSTC_ESCRIPT_WORD3", PyInt_FromLong((long) 11)); PyDict_SetItemString(d,"wxSTC_CMD_REDO", PyInt_FromLong((long) 2011)); PyDict_SetItemString(d,"wxSTC_CMD_SELECTALL", PyInt_FromLong((long) 2013)); PyDict_SetItemString(d,"wxSTC_CMD_UNDO", PyInt_FromLong((long) 2176)); diff --git a/wxPython/contrib/stc/gtk/stc_.py b/wxPython/contrib/stc/gtk/stc_.py index 93e7f892ef..2a0d4627c4 100644 --- a/wxPython/contrib/stc/gtk/stc_.py +++ b/wxPython/contrib/stc/gtk/stc_.py @@ -878,6 +878,9 @@ class wxStyledTextCtrlPtr(wxControlPtr): def LineEndDisplayExtend(self, *_args, **_kwargs): val = stc_c.wxStyledTextCtrl_LineEndDisplayExtend(self, *_args, **_kwargs) return val + def LineCopy(self, *_args, **_kwargs): + val = stc_c.wxStyledTextCtrl_LineCopy(self, *_args, **_kwargs) + return val def MoveCaretInsideView(self, *_args, **_kwargs): val = stc_c.wxStyledTextCtrl_MoveCaretInsideView(self, *_args, **_kwargs) return val @@ -1044,6 +1047,18 @@ class wxStyledTextCtrlPtr(wxControlPtr): def SetHotspotActiveUnderline(self, *_args, **_kwargs): val = stc_c.wxStyledTextCtrl_SetHotspotActiveUnderline(self, *_args, **_kwargs) return val + def PositionBefore(self, *_args, **_kwargs): + val = stc_c.wxStyledTextCtrl_PositionBefore(self, *_args, **_kwargs) + return val + def PositionAfter(self, *_args, **_kwargs): + val = stc_c.wxStyledTextCtrl_PositionAfter(self, *_args, **_kwargs) + return val + def CopyRange(self, *_args, **_kwargs): + val = stc_c.wxStyledTextCtrl_CopyRange(self, *_args, **_kwargs) + return val + def CopyText(self, *_args, **_kwargs): + val = stc_c.wxStyledTextCtrl_CopyText(self, *_args, **_kwargs) + return val def StartRecord(self, *_args, **_kwargs): val = stc_c.wxStyledTextCtrl_StartRecord(self, *_args, **_kwargs) return val @@ -1497,6 +1512,8 @@ wxSTC_LEX_FORTRAN = stc_c.wxSTC_LEX_FORTRAN wxSTC_LEX_F77 = stc_c.wxSTC_LEX_F77 wxSTC_LEX_CSS = stc_c.wxSTC_LEX_CSS wxSTC_LEX_POV = stc_c.wxSTC_LEX_POV +wxSTC_LEX_LOUT = stc_c.wxSTC_LEX_LOUT +wxSTC_LEX_ESCRIPT = stc_c.wxSTC_LEX_ESCRIPT wxSTC_LEX_AUTOMATIC = stc_c.wxSTC_LEX_AUTOMATIC wxSTC_P_DEFAULT = stc_c.wxSTC_P_DEFAULT wxSTC_P_COMMENTLINE = stc_c.wxSTC_P_COMMENTLINE @@ -1531,6 +1548,7 @@ wxSTC_C_COMMENTLINEDOC = stc_c.wxSTC_C_COMMENTLINEDOC wxSTC_C_WORD2 = stc_c.wxSTC_C_WORD2 wxSTC_C_COMMENTDOCKEYWORD = stc_c.wxSTC_C_COMMENTDOCKEYWORD wxSTC_C_COMMENTDOCKEYWORDERROR = stc_c.wxSTC_C_COMMENTDOCKEYWORDERROR +wxSTC_C_GLOBALCLASS = stc_c.wxSTC_C_GLOBALCLASS wxSTC_H_DEFAULT = stc_c.wxSTC_H_DEFAULT wxSTC_H_TAG = stc_c.wxSTC_H_TAG wxSTC_H_TAGUNKNOWN = stc_c.wxSTC_H_TAGUNKNOWN @@ -1903,6 +1921,29 @@ wxSTC_POV_OPERATOR = stc_c.wxSTC_POV_OPERATOR wxSTC_POV_IDENTIFIER = stc_c.wxSTC_POV_IDENTIFIER wxSTC_POV_BRACE = stc_c.wxSTC_POV_BRACE wxSTC_POV_WORD2 = stc_c.wxSTC_POV_WORD2 +wxSTC_LOUT_DEFAULT = stc_c.wxSTC_LOUT_DEFAULT +wxSTC_LOUT_COMMENT = stc_c.wxSTC_LOUT_COMMENT +wxSTC_LOUT_NUMBER = stc_c.wxSTC_LOUT_NUMBER +wxSTC_LOUT_WORD = stc_c.wxSTC_LOUT_WORD +wxSTC_LOUT_WORD2 = stc_c.wxSTC_LOUT_WORD2 +wxSTC_LOUT_WORD3 = stc_c.wxSTC_LOUT_WORD3 +wxSTC_LOUT_WORD4 = stc_c.wxSTC_LOUT_WORD4 +wxSTC_LOUT_STRING = stc_c.wxSTC_LOUT_STRING +wxSTC_LOUT_OPERATOR = stc_c.wxSTC_LOUT_OPERATOR +wxSTC_LOUT_IDENTIFIER = stc_c.wxSTC_LOUT_IDENTIFIER +wxSTC_LOUT_STRINGEOL = stc_c.wxSTC_LOUT_STRINGEOL +wxSTC_ESCRIPT_DEFAULT = stc_c.wxSTC_ESCRIPT_DEFAULT +wxSTC_ESCRIPT_COMMENT = stc_c.wxSTC_ESCRIPT_COMMENT +wxSTC_ESCRIPT_COMMENTLINE = stc_c.wxSTC_ESCRIPT_COMMENTLINE +wxSTC_ESCRIPT_COMMENTDOC = stc_c.wxSTC_ESCRIPT_COMMENTDOC +wxSTC_ESCRIPT_NUMBER = stc_c.wxSTC_ESCRIPT_NUMBER +wxSTC_ESCRIPT_WORD = stc_c.wxSTC_ESCRIPT_WORD +wxSTC_ESCRIPT_STRING = stc_c.wxSTC_ESCRIPT_STRING +wxSTC_ESCRIPT_OPERATOR = stc_c.wxSTC_ESCRIPT_OPERATOR +wxSTC_ESCRIPT_IDENTIFIER = stc_c.wxSTC_ESCRIPT_IDENTIFIER +wxSTC_ESCRIPT_BRACE = stc_c.wxSTC_ESCRIPT_BRACE +wxSTC_ESCRIPT_WORD2 = stc_c.wxSTC_ESCRIPT_WORD2 +wxSTC_ESCRIPT_WORD3 = stc_c.wxSTC_ESCRIPT_WORD3 wxSTC_CMD_REDO = stc_c.wxSTC_CMD_REDO wxSTC_CMD_SELECTALL = stc_c.wxSTC_CMD_SELECTALL wxSTC_CMD_UNDO = stc_c.wxSTC_CMD_UNDO diff --git a/wxPython/contrib/xrc/xrc.cpp b/wxPython/contrib/xrc/xrc.cpp index c9b4c7caba..2b8c281cfb 100644 --- a/wxPython/contrib/xrc/xrc.cpp +++ b/wxPython/contrib/xrc/xrc.cpp @@ -56,7 +56,7 @@ extern PyObject *SWIG_newvarlink(void); #include "wxPython.h" #include "pyistream.h" -#include "wx/xrc/xml.h" +#include "wx/xml/xml.h" #include "wx/xrc/xmlres.h" #include #include diff --git a/wxPython/contrib/xrc/xrc.i b/wxPython/contrib/xrc/xrc.i index 8676043657..f69da0b1da 100644 --- a/wxPython/contrib/xrc/xrc.i +++ b/wxPython/contrib/xrc/xrc.i @@ -16,7 +16,7 @@ %{ #include "wxPython.h" #include "pyistream.h" -#include "wx/xrc/xml.h" +#include "wx/xml/xml.h" #include "wx/xrc/xmlres.h" #include #include diff --git a/wxPython/setup.py b/wxPython/setup.py index 93d8c255ae..e95880bca7 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -46,9 +46,6 @@ BUILD_DLLWIDGET = 0# Build a module that enables unknown wx widgets # Internet Explorer wrapper (experimental) BUILD_IEWIN = (os.name == 'nt') -BUILD_CANVAS = 0 # Build a canvas module using the one in wx/contrib (experimental) -BUILD_ART2D = 0 # Build a canvas module using code from the wxArt2D project (experimental) - CORE_ONLY = 0 # if true, don't build any of the above @@ -320,6 +317,49 @@ def find_data_files(srcdir, *wildcards): return file_list +def makeLibName(name): + if os.name == 'posix': + libname = '%s_%s-%s' % (WXBASENAME, name, WXRELEASE) + else: + raise NotImplementedError + + return [libname] + + + +def adjustCFLAGS(cflags, defines, includes): + '''Extrace the raw -I, -D, and -U flags and put them into + defines and includes as needed.''' + newCFLAGS = [] + for flag in cflags: + if flag[:2] == '-I': + includes.append(flag[2:]) + elif flag[:2] == '-D': + flag = flag[2:] + if flag.find('=') == -1: + defines.append( (flag, None) ) + else: + defines.append( tuple(flag.split('=')) ) + elif flag[:2] == '-U': + defines.append( (flag[2:], ) ) + else: + newCFLAGS.append(flag) + return newCFLAGS + + + +def adjustLFLAGS(lfags, libdirs, libs): + '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' + newLFLAGS = [] + for flag in lflags: + if flag[:2] == '-L': + libdirs.append(flag[2:]) + elif flag[:2] == '-l': + libs.append(flag[2:]) + else: + newLFLAGS.append(flag) + + return newLFLAGS #---------------------------------------------------------------------- # sanity checks @@ -417,12 +457,8 @@ if os.name == 'nt': #---------------------------------------------------------------------- -elif os.name == 'posix' and sys.platform[:6] == "darwin": - # Flags and such for a Darwin (Max OS X) build of Python +elif os.name == 'posix': WXDIR = '..' # assumes IN_CVS_TREE - WXPLAT = '__WXMAC__' - GENDIR = 'mac' - includes = ['src'] defines = [('SWIG_GLOBAL', None), ('HAVE_CONFIG_H', None), @@ -430,11 +466,12 @@ elif os.name == 'posix' and sys.platform[:6] == "darwin": ] if UNDEF_NDEBUG: defines.append( ('NDEBUG',) ) # using a 1-tuple makes it do an undef - libdirs = [] - libs = ['stdc++'] Verify_WX_CONFIG() + libdirs = [] + libs = [] + cflags = os.popen(WX_CONFIG + ' --cxxflags', 'r').read()[:-1] cflags = cflags.split() if debug: @@ -444,59 +481,51 @@ elif os.name == 'posix' and sys.platform[:6] == "darwin": lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1] lflags = lflags.split() - NO_SCRIPTS = 1 + WXBASENAME = os.popen(WX_CONFIG + ' --basename').read()[:-1] + WXRELEASE = os.popen(WX_CONFIG + ' --release').read()[:-1] + WXPREFIX = os.popen(WX_CONFIG + ' --prefix').read()[:-1] -#---------------------------------------------------------------------- + if sys.platform[:6] == "darwin": + # Flags and such for a Darwin (Max OS X) build of Python + WXPLAT = '__WXMAC__' + GENDIR = 'mac' + libs = ['stdc++'] + NO_SCRIPTS = 1 -elif os.name == 'posix': - # Set flags for other Unix type platforms - WXDIR = '..' # assumes IN_CVS_TREE - GENDIR = WXPORT - - if WXPORT == 'gtk': - WXPLAT = '__WXGTK__' - portcfg = os.popen('gtk-config --cflags', 'r').read()[:-1] - elif WXPORT == 'gtk2': - WXPLAT = '__WXGTK__' - GENDIR = 'gtk' # no code differences so use the same generated sources - portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1] - BUILD_BASE = BUILD_BASE + '-' + WXPORT - elif WXPORT == 'x11': - WXPLAT = '__WXX11__' - portcfg = '' - BUILD_BASE = BUILD_BASE + '-' + WXPORT - else: - raise SystemExit, "Unknown WXPORT value: " + WXPORT - - includes = ['src'] - defines = [('SWIG_GLOBAL', None), - ('HAVE_CONFIG_H', None), - ('WXP_USE_THREAD', '1'), - ] - if UNDEF_NDEBUG: - defines.append( ('NDEBUG',) ) # using a 1-tuple makes it do an undef - libdirs = [] - libs = [] - - Verify_WX_CONFIG() + else: + # Set flags for other Unix type platforms + GENDIR = WXPORT + + if WXPORT == 'gtk': + WXPLAT = '__WXGTK__' + portcfg = os.popen('gtk-config --cflags', 'r').read()[:-1] + elif WXPORT == 'gtk2': + WXPLAT = '__WXGTK__' + GENDIR = 'gtk' # no code differences so use the same generated sources + portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1] + BUILD_BASE = BUILD_BASE + '-' + WXPORT + elif WXPORT == 'x11': + WXPLAT = '__WXX11__' + portcfg = '' + BUILD_BASE = BUILD_BASE + '-' + WXPORT + else: + raise SystemExit, "Unknown WXPORT value: " + WXPORT - cflags = os.popen(WX_CONFIG + ' --cxxflags', 'r').read()[:-1] + ' ' + portcfg + cflags += portcfg.split() - cflags = cflags.split() - if debug: - cflags.append('-g') - cflags.append('-O0') + # Some distros (e.g. Mandrake) put libGLU in /usr/X11R6/lib, but + # wx-config doesn't output that for some reason. For now, just + # add it unconditionally but we should really check if the lib is + # really found there or wx-config should be fixed. + libdirs.append("/usr/X11R6/lib") - lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1] - lflags = lflags.split() - # Some distros (e.g. Mandrake) put libGLU in /usr/X11R6/lib, but - # wx-config doesn't output that for some reason. For now, just - # add it unconditionally but we should really check if the lib is - # really found there or wx-config should be fixed. - libdirs.append("/usr/X11R6/lib") + # Move the various -I, -D, etc. flags we got from the *config scripts + # into the distutils lists. + cflags = adjustCFLAGS(cflags, defines, includes) + lflags = adjustLFLAGS(lflags, libdirs, libs) #---------------------------------------------------------------------- @@ -684,9 +713,6 @@ wxpExtensions.append(ext) # Define the GLCanvas extension module #---------------------------------------------------------------------- -CTRB_SRC = opj(WXDIR, 'contrib/src') -CTRB_INC = opj(WXDIR, 'contrib/include/wx') - if BUILD_GLCANVAS: msg('Preparing GLCANVAS...') location = 'contrib/glcanvas' @@ -729,8 +755,6 @@ if BUILD_GLCANVAS: if BUILD_OGL: msg('Preparing OGL...') location = 'contrib/ogl' - OGLLOC = opj(location, 'contrib/src/ogl') - OGLINC = opj(location, 'contrib/include') swig_files = ['ogl.i', 'oglbasic.i', 'oglshapes.i', 'oglshapes2.i', 'oglcanvas.i'] @@ -738,30 +762,14 @@ if BUILD_OGL: swig_sources = run_swig(swig_files, location, '', PKGDIR, USE_SWIG, swig_force, swig_args, swig_deps) - if IN_CVS_TREE: - # make sure local copy of contrib files are up to date - contrib_copy_tree(opj(CTRB_INC, 'ogl'), opj(OGLINC, 'wx/ogl')) - contrib_copy_tree(opj(CTRB_SRC, 'ogl'), OGLLOC) - - ext = Extension('oglc', ['%s/basic.cpp' % OGLLOC, - '%s/bmpshape.cpp' % OGLLOC, - '%s/composit.cpp' % OGLLOC, - '%s/divided.cpp' % OGLLOC, - '%s/lines.cpp' % OGLLOC, - '%s/oglmisc.cpp' % OGLLOC, - '%s/basic2.cpp' % OGLLOC, - '%s/canvas.cpp' % OGLLOC, - '%s/constrnt.cpp' % OGLLOC, - '%s/drawn.cpp' % OGLLOC, - '%s/mfutils.cpp' % OGLLOC, - '%s/ogldiag.cpp' % OGLLOC, - ] + swig_sources, + ext = Extension('oglc', + swig_sources, - include_dirs = [OGLINC] + includes, + include_dirs = includes, define_macros = defines + [('wxUSE_DEPRECATED', '0')], library_dirs = libdirs, - libraries = libs, + libraries = libs + makeLibName('ogl'), extra_compile_args = cflags, extra_link_args = lflags, @@ -778,29 +786,22 @@ if BUILD_OGL: if BUILD_STC: msg('Preparing STC...') location = 'contrib/stc' - STCLOC = opj(location, 'contrib/src/stc') - STCINC = opj(location, 'contrib/include') - STC_H = opj(location, 'contrib/include/wx/stc') - - if IN_CVS_TREE: - # Check if gen_iface needs to be run for the wxSTC sources - if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or - newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or - newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))): + STC_H = opj(WXPREFIX, 'include/wx/stc') - msg('Running gen_iface.py, regenerating stc.h and stc.cpp...') - cwd = os.getcwd() - os.chdir(opj(CTRB_SRC, 'stc')) - sys.path.insert(0, os.curdir) - import gen_iface - gen_iface.main([]) - os.chdir(cwd) +## NOTE: need to add this to the stc.bkl... +## # Check if gen_iface needs to be run for the wxSTC sources +## if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or +## newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or +## newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))): - # make sure local copy of contrib files are up to date - contrib_copy_tree(opj(CTRB_INC, 'stc'), opj(STCINC, 'wx/stc')) - contrib_copy_tree(opj(CTRB_SRC, 'stc'), STCLOC) - +## msg('Running gen_iface.py, regenerating stc.h and stc.cpp...') +## cwd = os.getcwd() +## os.chdir(opj(CTRB_SRC, 'stc')) +## sys.path.insert(0, os.curdir) +## import gen_iface +## gen_iface.main([]) +## os.chdir(cwd) swig_files = ['stc_.i'] @@ -812,53 +813,14 @@ if BUILD_STC: # copy a contrib project specific py module to the main package dir copy_file(opj(location, 'stc.py'), PKGDIR, update=1, verbose=0) - # add some include dirs to the standard set - stc_includes = includes[:] - stc_includes.append('%s/scintilla/include' % STCLOC) - stc_includes.append('%s/scintilla/src' % STCLOC) - stc_includes.append(STCINC) - - # and some macro definitions - stc_defines = defines[:] - stc_defines.append( ('__WX__', None) ) - stc_defines.append( ('SCI_LEXER', None) ) - stc_defines.append( ('LINK_LEXERS', None) ) - - ext = Extension('stc_c', - ['%s/PlatWX.cpp' % STCLOC, - '%s/ScintillaWX.cpp' % STCLOC, - '%s/stc.cpp' % STCLOC, - - '%s/scintilla/src/AutoComplete.cxx' % STCLOC, - '%s/scintilla/src/CallTip.cxx' % STCLOC, - '%s/scintilla/src/CellBuffer.cxx' % STCLOC, - '%s/scintilla/src/ContractionState.cxx' % STCLOC, - '%s/scintilla/src/Document.cxx' % STCLOC, - '%s/scintilla/src/DocumentAccessor.cxx' % STCLOC, - '%s/scintilla/src/Editor.cxx' % STCLOC, - '%s/scintilla/src/Indicator.cxx' % STCLOC, - '%s/scintilla/src/KeyMap.cxx' % STCLOC, - '%s/scintilla/src/KeyWords.cxx' % STCLOC, - '%s/scintilla/src/LineMarker.cxx' % STCLOC, - '%s/scintilla/src/PropSet.cxx' % STCLOC, - '%s/scintilla/src/RESearch.cxx' % STCLOC, - '%s/scintilla/src/ScintillaBase.cxx' % STCLOC, - '%s/scintilla/src/Style.cxx' % STCLOC, - '%s/scintilla/src/StyleContext.cxx' % STCLOC, - '%s/scintilla/src/UniConversion.cxx' % STCLOC, - '%s/scintilla/src/ViewStyle.cxx' % STCLOC, - '%s/scintilla/src/WindowAccessor.cxx' % STCLOC, - '%s/scintilla/src/XPM.cxx' % STCLOC, - ] - + glob.glob('%s/scintilla/src/Lex*.cxx' % STCLOC) - + swig_sources, - - include_dirs = stc_includes, - define_macros = stc_defines, + swig_sources, + + include_dirs = includes, + define_macros = defines, library_dirs = libdirs, - libraries = libs, + libraries = libs + makeLibName('stc'), extra_compile_args = cflags, extra_link_args = lflags, @@ -906,42 +868,19 @@ if BUILD_IEWIN: if BUILD_XRC: msg('Preparing XRC...') location = 'contrib/xrc' - XMLLOC = opj(location, 'contrib/src/xrc') - XMLINC = opj(location, 'contrib/include') swig_files = ['xrc.i'] - swig_sources = run_swig(swig_files, location, '', PKGDIR, USE_SWIG, swig_force, swig_args, swig_deps) - xmlres_includes = includes[:] - xmlres_includes.append('%s/expat/xmlparse' % XMLLOC) - xmlres_includes.append('%s/expat/xmltok' % XMLLOC) - xmlres_includes.append(XMLINC) - - - # make sure local copy of contrib files are up to date - if IN_CVS_TREE: - contrib_copy_tree(opj(CTRB_INC, 'xrc'), opj(XMLINC, 'wx/xrc')) - contrib_copy_tree(opj(CTRB_SRC, 'xrc'), XMLLOC) - ext = Extension('xrcc', - ['%s/expat/xmlparse/xmlparse.c' % XMLLOC, - '%s/expat/xmltok/xmlrole.c' % XMLLOC, - '%s/expat/xmltok/xmltok.c' % XMLLOC, - - ] + glob.glob('%s/xh_*.cpp' % XMLLOC) + + swig_sources, - [ '%s/xml.cpp' % XMLLOC, - '%s/xmlres.cpp' % XMLLOC, - '%s/xmlrsall.cpp' % XMLLOC, - ] + swig_sources, - - include_dirs = xmlres_includes, + include_dirs = includes, define_macros = defines, library_dirs = libdirs, - libraries = libs, + libraries = libs + makeLibName('xrc'), extra_compile_args = cflags, extra_link_args = lflags, @@ -958,39 +897,19 @@ if BUILD_XRC: if BUILD_GIZMOS: msg('Preparing GIZMOS...') location = 'contrib/gizmos' - GIZMOLOC = opj(location, 'contrib/src/gizmos') - GIZMOINC = opj(location, 'contrib/include') swig_files = ['gizmos.i'] - swig_sources = run_swig(swig_files, location, '', PKGDIR, USE_SWIG, swig_force, swig_args, swig_deps) - gizmos_includes = includes[:] - gizmos_includes.append(GIZMOINC) - + ext = Extension('gizmosc', + swig_sources, - # make sure local copy of contrib files are up to date - if IN_CVS_TREE: - contrib_copy_tree(opj(CTRB_INC, 'gizmos'), opj(GIZMOINC, 'wx/gizmos')) - contrib_copy_tree(opj(CTRB_SRC, 'gizmos'), GIZMOLOC) - - ext = Extension('gizmosc', [ - '%s/dynamicsash.cpp' % GIZMOLOC, - '%s/editlbox.cpp' % GIZMOLOC, - '%s/splittree.cpp' % GIZMOLOC, - '%s/ledctrl.cpp' % GIZMOLOC, - #'%s/multicell.cpp' % GIZMOLOC, - - '%s/treelistctrl.cpp' % location, - - ] + swig_sources, - - include_dirs = gizmos_includes, + include_dirs = includes, define_macros = defines, library_dirs = libdirs, - libraries = libs, + libraries = libs + makeLibName('gizmos'), extra_compile_args = cflags, extra_link_args = lflags, @@ -1032,117 +951,6 @@ if BUILD_DLLWIDGET: wxpExtensions.append(ext) -#---------------------------------------------------------------------- -# Define the CANVAS extension module -#---------------------------------------------------------------------- - -if BUILD_CANVAS: - msg('Preparing CANVAS...') - location = 'contrib/canvas' - CANVASLOC = opj(location, 'contrib/src/canvas') - CANVASINC = opj(location, 'contrib/include') - - swig_files = ['canvas.i'] - - swig_sources = run_swig(swig_files, location, '', PKGDIR, - USE_SWIG, swig_force, swig_args, swig_deps) - - if IN_CVS_TREE: - # make sure local copy of contrib files are up to date - contrib_copy_tree(opj(CTRB_INC, 'canvas'), opj(CANVASINC, 'wx/canvas')) - contrib_copy_tree(opj(CTRB_SRC, 'canvas'), CANVASLOC) - - ext = Extension('canvasc', ['%s/bbox.cpp' % CANVASLOC, - '%s/liner.cpp' % CANVASLOC, - '%s/polygon.cpp' % CANVASLOC, - '%s/canvas.cpp' % CANVASLOC, - ] + swig_sources, - - include_dirs = [CANVASINC] + includes, - define_macros = defines, - - library_dirs = libdirs, - libraries = libs, - - extra_compile_args = cflags, - extra_link_args = lflags, - ) - - wxpExtensions.append(ext) - - -#---------------------------------------------------------------------- -# Define the ART2D extension module -#---------------------------------------------------------------------- - -if BUILD_ART2D: - msg('Preparing ART2D...') - location = 'contrib/art2d' - ART2DLOC = opj(location, 'modules/canvas/src') - ART2DINC = opj(location, 'modules/canvas/include') - EXPATLOC = opj(location, 'modules/expat') - EXPATINC = opj(location, 'modules/expat/include') - - swig_files = ['art2d.i', - 'art2d_misc.i', - 'art2d_base.i', - 'art2d_canvas.i', - ] - - swig_sources = run_swig(swig_files, location, '', PKGDIR, - USE_SWIG, swig_force, swig_args, swig_deps) - - if IN_CVS_TREE: - # Don't copy data in this case as the code snapshots are - # taken manually - pass - - ext = Extension('art2dc', [ opj(ART2DLOC, 'afmatrix.cpp'), - opj(ART2DLOC, 'bbox.cpp'), - opj(ART2DLOC, 'cancom.cpp'), - opj(ART2DLOC, 'candoc.cpp'), - opj(ART2DLOC, 'canglob.cpp'), - opj(ART2DLOC, 'canobj3d.cpp'), - opj(ART2DLOC, 'canobj.cpp'), - opj(ART2DLOC, 'canprim.cpp'), - opj(ART2DLOC, 'canprop.cpp'), - opj(ART2DLOC, 'canvas.cpp'), - opj(ART2DLOC, 'docviewref.cpp'), - opj(ART2DLOC, 'drawer.cpp'), - opj(ART2DLOC, 'eval.cpp'), - opj(ART2DLOC, 'graph.cpp'), - opj(ART2DLOC, 'layerinf.cpp'), - opj(ART2DLOC, 'liner.cpp'), - opj(ART2DLOC, 'meta.cpp'), - opj(ART2DLOC, 'objlist.cpp'), - opj(ART2DLOC, 'polygon.cpp'), - opj(ART2DLOC, 'recur.cpp'), - opj(ART2DLOC, 'rendimg.cpp'), - opj(ART2DLOC, 'tools.cpp'), - opj(ART2DLOC, 'vpath.cpp'), - opj(ART2DLOC, 'xmlpars.cpp'), - - opj(EXPATLOC, 'xmlparse/xmlparse.c'), - opj(EXPATLOC, 'xmltok/xmlrole.c'), - opj(EXPATLOC, 'xmltok/xmltok.c'), - - ] + swig_sources, - - include_dirs = [ ART2DINC, - EXPATINC, - opj(EXPATLOC, 'xmltok'), - opj(EXPATLOC, 'xmlparse'), - ] + includes, - define_macros = defines, - - library_dirs = libdirs, - libraries = libs, - - extra_compile_args = cflags, - extra_link_args = lflags, - ) - - wxpExtensions.append(ext) #---------------------------------------------------------------------- diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 647352d18b..54122585c6 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -236,16 +236,6 @@ enum { wxRETAINED, wxBACKINGSTORE, - wxTB_HORIZONTAL, - wxTB_VERTICAL, - wxTB_3DBUTTONS, - wxTB_FLAT, - wxTB_DOCKABLE, - wxTB_NOICONS, - wxTB_TEXT, - wxTB_NODIVIDER, - wxTB_NOALIGN, - wxCOLOURED, wxFIXED_LENGTH, wxALIGN_LEFT, @@ -272,25 +262,6 @@ enum { wxPROCESS_ENTER, wxPASSWORD, - wxTE_READONLY, - wxTE_MULTILINE, - wxTE_PROCESS_TAB, - wxTE_RICH, - wxTE_RICH2, - wxTE_NO_VSCROLL, - wxTE_AUTO_SCROLL, - wxTE_PROCESS_ENTER, - wxTE_PASSWORD, - wxTE_AUTO_URL, - wxTE_NOHIDESEL, - wxTE_DONTWRAP, - wxTE_LINEWRAP, - wxTE_WORDWRAP, - wxTE_LEFT, - wxTE_RIGHT, - wxTE_CENTER, - wxTE_CENTRE, - wxCB_SIMPLE, wxCB_DROPDOWN, wxCB_SORT, @@ -328,18 +299,6 @@ enum { wxBU_BOTTOM, wxBU_EXACTFIT, - wxSP_VERTICAL, - wxSP_HORIZONTAL, - wxSP_ARROW_KEYS, - wxSP_WRAP, - wxSP_NOBORDER, - wxSP_3D, - wxSP_3DSASH, - wxSP_3DBORDER, - wxSP_FULLSASH, - wxSP_BORDER, - wxSP_LIVE_UPDATE, - wxSP_PERMIT_UNSPLIT, wxFLOOD_SURFACE, wxFLOOD_BORDER, wxODDEVEN_RULE, @@ -418,6 +377,20 @@ enum { wxID_DUPLICATE, wxID_SELECTALL, + wxID_DELETE, + wxID_REPLACE, + wxID_REPLACE_ALL, + wxID_PROPERTIES, + + wxID_VIEW_DETAILS, + wxID_VIEW_LARGEICONS, + wxID_VIEW_SMALLICONS, + wxID_VIEW_LIST, + wxID_VIEW_SORTDATE, + wxID_VIEW_SORTNAME, + wxID_VIEW_SORTSIZE, + wxID_VIEW_SORTTYPE, + wxID_FILE1, wxID_FILE2, wxID_FILE3, @@ -492,13 +465,6 @@ enum { wxGROW, wxEXPAND, - wxNB_FIXEDWIDTH, - wxNB_TOP, - wxNB_LEFT, - wxNB_RIGHT, - wxNB_BOTTOM, - wxNB_MULTILINE, - wxLI_HORIZONTAL, wxLI_VERTICAL, @@ -514,6 +480,11 @@ enum { wxWS_EX_BLOCK_EVENTS, wxWS_EX_TRANSIENT, + wxWS_EX_THEMED_BACKGROUND, + wxWS_EX_PROCESS_IDLE, + wxWS_EX_PROCESS_UI_UPDATES, + + // Mapping modes (as per Windows) wxMM_TEXT, wxMM_LOMETRIC, @@ -939,6 +910,38 @@ enum wxHitTest }; +%{ +#if ! wxUSE_HOTKEY +enum wxHotkeyModifier +{ + wxMOD_NONE = 0, + wxMOD_ALT = 1, + wxMOD_CONTROL = 2, + wxMOD_SHIFT = 4, + wxMOD_WIN = 8 +}; +#define wxEVT_HOTKEY 9999 +#endif +%} + +enum wxHotkeyModifier +{ + wxMOD_NONE = 0, + wxMOD_ALT = 1, + wxMOD_CONTROL = 2, + wxMOD_SHIFT = 4, + wxMOD_WIN = 8 +}; + + +enum wxUpdateUI +{ + wxUPDATE_UI_NONE = 0x0000, + wxUPDATE_UI_RECURSE = 0x0001, + wxUPDATE_UI_FROMIDLE = 0x0002 // Invoked from On(Internal)Idle +}; + + //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- @@ -1016,6 +1019,7 @@ enum wxEventType { wxEVT_KEY_DOWN, wxEVT_KEY_UP, wxEVT_CHAR_HOOK, + wxEVT_HOTKEY, /* * Scrollbar event identifiers @@ -1044,6 +1048,8 @@ enum wxEventType { wxEVT_SIZE = wxEVT_FIRST + 200, wxEVT_MOVE, + wxEVT_SIZING, + wxEVT_MOVING, wxEVT_CLOSE_WINDOW, wxEVT_END_SESSION, wxEVT_QUERY_END_SESSION, diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index ce9dcdb12e..dcb0142a39 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -41,6 +41,12 @@ def EVT_SIZE(win, func): def EVT_MOVE(win, func): win.Connect(-1, -1, wxEVT_MOVE, func) +def EVT_SIZING(win, func): + win.Connect(-1, -1, wxEVT_SIZING, func) + +def EVT_MOVING(win, func): + win.Connect(-1, -1, wxEVT_MOVING, func) + def EVT_CLOSE(win, func): win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) @@ -62,6 +68,9 @@ def EVT_KEY_DOWN(win, func): def EVT_KEY_UP(win, func): win.Connect(-1, -1, wxEVT_KEY_UP, func) +def EVT_HOTKEY(win, func): + win.Connect(-1, -1, wxEVT_HOTKEY, func) + def EVT_MENU_OPEN(win, func): win.Connect(-1, -1, wxEVT_MENU_OPEN, func) @@ -486,29 +495,6 @@ def EVT_SPIN(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) -# wxTaskBarIcon -def EVT_TASKBAR_MOVE(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func) - -def EVT_TASKBAR_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func) - -def EVT_TASKBAR_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func) - -def EVT_TASKBAR_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func) - -def EVT_TASKBAR_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func) - -def EVT_TASKBAR_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func) - -def EVT_TASKBAR_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) - - # wxSashWindow def EVT_SASH_DRAGGED(win, id, func): win.Connect(id, -1, wxEVT_SASH_DRAGGED, func) diff --git a/wxPython/src/cmndlgs.i b/wxPython/src/cmndlgs.i index b69e07c4b0..432ba32ac9 100644 --- a/wxPython/src/cmndlgs.i +++ b/wxPython/src/cmndlgs.i @@ -114,21 +114,21 @@ public: %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" - wxString GetDirectory(); - wxString GetFilename(); - int GetFilterIndex(); - wxString GetMessage(); - wxString GetPath(); - long GetStyle(); - wxString GetWildcard(); - void SetDirectory(const wxString& directory); - void SetFilename(const wxString& setfilename); - void SetFilterIndex(int filterIndex); void SetMessage(const wxString& message); void SetPath(const wxString& path); - void SetStyle(long style); + void SetDirectory(const wxString& dir); + void SetFilename(const wxString& name); void SetWildcard(const wxString& wildCard); - int ShowModal(); + void SetStyle(long style); + void SetFilterIndex(int filterIndex); + + wxString GetMessage() const; + wxString GetPath() const; + wxString GetDirectory() const; + wxString GetFilename() const; + wxString GetWildcard() const; + long GetStyle() const; + int GetFilterIndex() const; %addmethods { PyObject* GetFilenames() { @@ -143,6 +143,27 @@ public: return wxArrayString2PyList_helper(arr); } } + +// TODO +// // Utility functions + +// // Parses the wildCard, returning the number of filters. +// // Returns 0 if none or if there's a problem, +// // The arrays will contain an equal number of items found before the error. +// // wildCard is in the form: +// // "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png" +// static int ParseWildcard(const wxString& wildCard, +// wxArrayString& descriptions, +// wxArrayString& filters); + +// // Append first extension to filePath from a ';' separated extensionList +// // if filePath = "path/foo.bar" just return it as is +// // if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg" +// // if the extension is "*.j?g" (has wildcards) or "jpg" then return filePath +// static wxString AppendExtension(const wxString &filePath, +// const wxString &extensionList); + + }; diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 57fdacdc1e..bb6a3070b3 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -720,6 +720,56 @@ public: //---------------------------------------------------------------------- +enum { + // Styles + wxTE_NO_VSCROLL, + wxTE_AUTO_SCROLL, + wxTE_READONLY, + wxTE_MULTILINE, + wxTE_PROCESS_TAB, + wxTE_LEFT, + wxTE_CENTER, + wxTE_RIGHT, + wxTE_CENTRE, + wxTE_RICH, + wxTE_PROCESS_ENTER, + wxTE_PASSWORD, + wxTE_AUTO_URL, + wxTE_NOHIDESEL, + wxTE_DONTWRAP, + wxTE_LINEWRAP, + wxTE_WORDWRAP, + wxTE_RICH2, + + // Flags to indicate which attributes are being applied + wxTEXT_ATTR_TEXT_COLOUR, + wxTEXT_ATTR_BACKGROUND_COLOUR, + wxTEXT_ATTR_FONT_FACE, + wxTEXT_ATTR_FONT_SIZE, + wxTEXT_ATTR_FONT_WEIGHT, + wxTEXT_ATTR_FONT_ITALIC, + wxTEXT_ATTR_FONT_UNDERLINE, + wxTEXT_ATTR_FONT, + wxTEXT_ATTR_ALIGNMENT, + wxTEXT_ATTR_LEFT_INDENT, + wxTEXT_ATTR_RIGHT_INDENT, + wxTEXT_ATTR_TABS, + +}; + + +enum wxTextAttrAlignment +{ + wxTEXT_ALIGNMENT_DEFAULT, + wxTEXT_ALIGNMENT_LEFT, + wxTEXT_ALIGNMENT_CENTRE, + wxTEXT_ALIGNMENT_CENTER, + wxTEXT_ALIGNMENT_RIGHT, + wxTEXT_ALIGNMENT_JUSTIFIED +}; + + + class wxTextAttr { @@ -727,22 +777,41 @@ public: // ctors wxTextAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, - const wxFont& font = wxNullFont); + const wxFont& font = wxNullFont, + wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT); ~wxTextAttr(); + void Init(); + // setters void SetTextColour(const wxColour& colText); void SetBackgroundColour(const wxColour& colBack); void SetFont(const wxFont& font); + void SetAlignment(wxTextAttrAlignment alignment); + void SetTabs(const wxArrayInt& tabs); + void SetLeftIndent(int indent); + void SetRightIndent(int indent); + void SetFlags(long flags); // accessors bool HasTextColour() const; bool HasBackgroundColour() const; bool HasFont() const; + bool HasAlignment() const; + bool HasTabs() const; + bool HasLeftIndent() const; + bool HasRightIndent() const; + bool HasFlag(long flag) const; wxColour GetTextColour() const; wxColour GetBackgroundColour() const; wxFont GetFont() const; + wxTextAttrAlignment GetAlignment(); + const wxArrayInt& GetTabs() const; + long GetLeftIndent() const; + long GetRightIndent() const; + long GetFlags() const; + // returns false if we have any attributes set, true otherwise bool IsDefault(); @@ -826,6 +895,7 @@ public: bool SetStyle(long start, long end, const wxTextAttr& style); bool SetDefaultStyle(const wxTextAttr& style); const wxTextAttr& GetDefaultStyle() const; + bool GetStyle(long position, wxTextAttr& style); // translate between the position (which is just an index in the text ctrl // considering all its contents as a single strings) and (x, y) coordinates diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 67f87c0475..f88d140f45 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -840,31 +840,34 @@ public: }; -//---------------------------------------------------------------------- +//-------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------- // wxTreeCtrl flags enum { wxTR_NO_BUTTONS, wxTR_HAS_BUTTONS, - wxTR_TWIST_BUTTONS, wxTR_NO_LINES, - wxTR_MAC_BUTTONS, - wxTR_AQUA_BUTTONS, + wxTR_LINES_AT_ROOT, wxTR_SINGLE, wxTR_MULTIPLE, wxTR_EXTENDED, - wxTR_FULL_ROW_HIGHLIGHT, + wxTR_HAS_VARIABLE_ROW_HEIGHT, wxTR_EDIT_LABELS, - wxTR_LINES_AT_ROOT, wxTR_HIDE_ROOT, wxTR_ROW_LINES, - wxTR_HAS_VARIABLE_ROW_HEIGHT, + wxTR_FULL_ROW_HIGHLIGHT, wxTR_DEFAULT_STYLE, + + wxTR_TWIST_BUTTONS, + wxTR_MAC_BUTTONS, + wxTR_AQUA_BUTTONS, }; + enum wxTreeItemIcon { wxTreeItemIcon_Normal, // not selected, not expanded @@ -914,6 +917,7 @@ enum { wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, wxEVT_COMMAND_TREE_END_DRAG, + wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, }; @@ -925,9 +929,6 @@ def EVT_TREE_BEGIN_DRAG(win, id, func): def EVT_TREE_BEGIN_RDRAG(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func) -def EVT_TREE_END_DRAG(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func) - def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func) @@ -972,9 +973,19 @@ def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func): def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func) + +def EVT_TREE_END_DRAG(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func) + +def EVT_TREE_STATE_IMAGE_CLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, func) + " +typedef void *wxTreeItemIdValue; + + class wxTreeItemAttr { public: @@ -1022,7 +1033,7 @@ public: -%name(wxTreeItemData) class wxPyTreeItemData : public wxObject { +%name(wxTreeItemData) class wxPyTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL); @@ -1039,20 +1050,34 @@ class wxTreeEvent : public wxNotifyEvent { public: wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); - wxTreeItemId GetItem(); - wxTreeItemId GetOldItem(); - wxPoint GetPoint(); - const wxKeyEvent& GetKeyEvent(); - int GetKeyCode(); - %pragma(python) addtoclass = "GetCode = GetKeyCode" - const wxString& GetLabel(); - bool IsEditCancelled() const; + // get the item on which the operation was performed or the newly + // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events + wxTreeItemId GetItem() const; void SetItem(const wxTreeItemId& item); + + // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously + // selected item + wxTreeItemId GetOldItem() const; void SetOldItem(const wxTreeItemId& item); + + // the point where the mouse was when the drag operation started (for + // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) or click position + wxPoint GetPoint() const; void SetPoint(const wxPoint& pt); + + // keyboard data (for wxEVT_COMMAND_TREE_KEY_DOWN only) + const wxKeyEvent& GetKeyEvent() const; + int GetKeyCode() const; void SetKeyEvent(const wxKeyEvent& evt); + + // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only) + const wxString& GetLabel() const; void SetLabel(const wxString& label); + + // edit cancel flag (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only) + bool IsEditCancelled() const; void SetEditCanceled(bool editCancelled); + }; @@ -1473,6 +1498,30 @@ public: }; +class wxFileIconsTable +{ +public: + wxFileIconsTable(); + ~wxFileIconsTable(); + + enum iconId_Type + { + folder, + folder_open, + computer, + drive, + cdrom, + floppy, + removeable, + file, + executable + }; + + int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString); + wxImageList *GetSmallImageList(); +}; + + //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/wxPython/src/events.i b/wxPython/src/events.i index aba54b3e45..3c825cbaf5 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -30,9 +30,20 @@ //--------------------------------------------------------------------------- +enum Propagation_state +{ + // don't propagate it at all + wxEVENT_PROPAGATE_NONE = 0, + + // propagate it until it is processed + wxEVENT_PROPAGATE_MAX = INT_MAX +}; + int wxNewEventType(); + + class wxEvent : public wxObject { public: // wxEvent(int id = 0); // *** This class is now an ABC @@ -41,15 +52,52 @@ public: wxObject* GetEventObject(); wxEventType GetEventType(); int GetId(); - bool GetSkipped(); long GetTimestamp(); void SetEventObject(wxObject* object); void SetEventType(wxEventType typ); void SetId(int id); void SetTimestamp(long timeStamp); + + bool IsCommandEvent() const; + + // Can instruct event processor that we wish to ignore this event + // (treat as if the event table entry had not been found): this must be done + // to allow the event processing by the base classes (calling event.Skip() + // is the analog of calling the base class verstion of a virtual function) void Skip(bool skip = TRUE); + bool GetSkipped() const; + + // Determine if this event should be propagating to the parent window. + bool ShouldPropagate() const; - wxEvent *Clone(); + // Stop an event from propagating to its parent window, returns the old + // propagation level value + int StopPropagation(); + + // Resume the event propagation by restoring the propagation level + // (returned by StopPropagation()) + void ResumePropagation(int propagationLevel); + + wxEvent *Clone(); +}; + +//--------------------------------------------------------------------------- + +// Helper class to temporarily change an event not to propagate. +class wxPropagationDisabler +{ +public: + wxPropagationDisabler(wxEvent& event); + ~wxPropagationDisabler(); +}; + + +// Another one to temporarily lower propagation level. +class wxPropagateOnce +{ +public: + wxPropagateOnce(wxEvent& event); + ~wxPropagateOnce(); }; //--------------------------------------------------------------------------- @@ -58,6 +106,8 @@ class wxSizeEvent : public wxEvent { public: wxSizeEvent(const wxSize& sz, int id = 0); wxSize GetSize(); + wxRect GetRect() const; + void SetRect(wxRect rect); }; //--------------------------------------------------------------------------- @@ -273,8 +323,9 @@ public: class wxMoveEvent: public wxEvent { public: wxMoveEvent(const wxPoint& pt, int id = 0); - wxPoint GetPosition(); + wxRect GetRect() const; + void SetRect(wxRect rect); }; //--------------------------------------------------------------------------- @@ -298,7 +349,7 @@ public: class wxFocusEvent: public wxEvent { public: - wxFocusEvent(WXTYPE eventType = 0, int id = 0); + wxFocusEvent(int eventType = 0, int id = 0); }; //--------------------------------------------------------------------------- @@ -317,7 +368,7 @@ public: class wxActivateEvent: public wxEvent{ public: - wxActivateEvent(WXTYPE eventType = 0, int active = TRUE, int id = 0); + wxActivateEvent(int eventType = 0, int active = TRUE, int id = 0); bool GetActive(); }; @@ -332,9 +383,10 @@ public: class wxMenuEvent: public wxEvent { public: - wxMenuEvent(WXTYPE id = 0, int id = 0); + wxMenuEvent(int id = 0, int winid = 0, wxMenu* menu = NULL); int GetMenuId(); bool IsPopup(); + wxMenu* GetMenu() const; }; //--------------------------------------------------------------------------- @@ -419,15 +471,57 @@ public: //--------------------------------------------------------------------------- +// Whether to always send idle events to windows, or +// to only send update events to those with the +// wxWS_EX_PROCESS_IDLE style. + +enum wxIdleMode +{ + // Send idle events to all windows + wxIDLE_PROCESS_ALL, + + // Send idle events to windows that have + // the wxWS_EX_PROCESS_IDLE flag specified + wxIDLE_PROCESS_SPECIFIED +}; + + class wxIdleEvent: public wxEvent { public: wxIdleEvent(); void RequestMore(bool needMore = TRUE); bool MoreRequested(); + + // Specify how wxWindows will send idle events: to + // all windows, or only to those which specify that they + // will process the events. + static void SetMode(wxIdleMode mode) { sm_idleMode = mode; } + + // Returns the idle event mode + static wxIdleMode GetMode() { return sm_idleMode ; } + + // Can we send an idle event? + static bool CanSend(wxWindow* win) ; + }; //--------------------------------------------------------------------------- +// Whether to always send update events to windows, or +// to only send update events to those with the +// wxWS_EX_PROCESS_UI_UPDATES style. + +enum wxUpdateUIMode +{ + // Send UI update events to all windows + wxUPDATE_UI_PROCESS_ALL, + + // Send UI update events to windows that have + // the wxWS_EX_PROCESS_UI_UPDATES flag specified + wxUPDATE_UI_PROCESS_SPECIFIED +}; + + class wxUpdateUIEvent: public wxEvent { public: wxUpdateUIEvent(wxWindowID commandId = 0); @@ -441,6 +535,29 @@ public: void Check(bool check); void Enable(bool enable); void SetText(const wxString& text); + + + // Sets the interval between updates in milliseconds. + // Set to -1 to disable updates, or to 0 to update as frequently as possible. + static void SetUpdateInterval(long updateInterval); + + // Returns the current interval between updates in milliseconds + static long GetUpdateInterval(); + + // Can we update this window? + static bool CanUpdate(wxWindow* win); + + // Reset the update time to provide a delay until the next + // time we should update + static void ResetUpdateTime(); + + // Specify how wxWindows will send update events: to + // all windows, or only to those which specify that they + // will process the events. + static void SetMode(wxUpdateUIMode mode); + + // Returns the UI update mode + static wxUpdateUIMode GetMode(); }; //--------------------------------------------------------------------------- @@ -550,7 +667,7 @@ public: class wxPyEvent : public wxEvent { public: - wxPyEvent(int id=0); + wxPyEvent(int winid=0, wxEventType commandType = wxEVT_NULL ); ~wxPyEvent(); %pragma(python) addtomethod = "__init__:self.SetSelf(self)" diff --git a/wxPython/src/fonts.i b/wxPython/src/fonts.i index 8137e23db8..289562f068 100644 --- a/wxPython/src/fonts.i +++ b/wxPython/src/fonts.i @@ -249,13 +249,40 @@ public: static wxFontMapper *Set(wxFontMapper *mapper); - // find an alternative for the given encoding (which is supposed to not be - // available on this system). If successful, return TRUE and rwxFontEcoding - // that can be used it wxFont ctor otherwise return FALSE - //bool GetAltForEncoding(wxFontEncoding encoding, - // wxFontEncoding *alt_encoding, - // const wxString& facename = wxPyEmptyString, - // bool interactive = TRUE); + // returns the encoding for the given charset (in the form of RFC 2046) or + // wxFONTENCODING_SYSTEM if couldn't decode it + // + // interactive parameter is ignored in the base class, we behave as if it + // were always false + virtual wxFontEncoding CharsetToEncoding(const wxString& charset, + bool interactive = true); + + + // get the number of font encodings we know about + static size_t GetSupportedEncodingsCount(); + + // get the n-th supported encoding + static wxFontEncoding GetEncoding(size_t n); + + // return internal string identifier for the encoding (see also + // GetEncodingDescription()) + static wxString GetEncodingName(wxFontEncoding encoding); + + // return user-readable string describing the given encoding + // + // NB: hard-coded now, but might change later (read it from config?) + static wxString GetEncodingDescription(wxFontEncoding encoding); + + + // set the config object to use (may be NULL to use default) + void SetConfig(wxConfigBase *config); + + // set the root config path to use (should be an absolute path) + void SetConfigPath(const wxString& prefix); + + // return default config path + static const wxChar *GetDefaultConfigPath(); + // Find an alternative for the given encoding (which is supposed to not be @@ -281,40 +308,12 @@ public: bool IsEncodingAvailable(wxFontEncoding encoding, const wxString& facename = wxPyEmptyString); - // returns the encoding for the given charset (in the form of RFC 2046) or - // wxFONTENCODING_SYSTEM if couldn't decode it - wxFontEncoding CharsetToEncoding(const wxString& charset, - bool interactive = TRUE); - - // return internal string identifier for the encoding (see also - // GetEncodingDescription()) - static wxString GetEncodingName(wxFontEncoding encoding); - - // return user-readable string describing the given encoding - // - // NB: hard-coded now, but might change later (read it from config?) - static wxString GetEncodingDescription(wxFontEncoding encoding); - // the parent window for modal dialogs - void SetDialogParent(wxWindow *parent); + void SetDialogParent(wxWindow *parent) { m_windowParent = parent; } // the title for the dialogs (note that default is quite reasonable) - void SetDialogTitle(const wxString& title); - - // functions which allow to configure the config object used: by default, - // the global one (from wxConfigBase::Get() will be used) and the default - // root path for the config settings is the string returned by - // GetDefaultConfigPath() - - - // set the config object to use (may be NULL to use default) - void SetConfig(wxConfigBase *config); + void SetDialogTitle(const wxString& title) { m_titleDialog = title; } - // set the root config path to use (should be an absolute path) - void SetConfigPath(const wxString& prefix); - - // return default config path - static wxString GetDefaultConfigPath(); }; @@ -806,6 +805,10 @@ public: // Returns NULL if no info found, pointer must *not* be deleted by caller static const wxLanguageInfo *GetLanguageInfo(int lang); + // Returns language name in English or empty string if the language + // is not in database + static wxString GetLanguageName(int lang); + // Find the language for the given locale string which may be either a // canonical ISO 2 letter language code ("xx"), a language code followed by // the country code ("xx_XX") or a Windows full language name ("Xxxxx...") diff --git a/wxPython/src/frames.i b/wxPython/src/frames.i index 618b661f82..ea407d7766 100644 --- a/wxPython/src/frames.i +++ b/wxPython/src/frames.i @@ -183,7 +183,7 @@ public: // create main toolbar - virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, + virtual wxToolBar* CreateToolBar(long style = -1, //wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxPyToolBarNameStr); @@ -194,6 +194,14 @@ public: // sends a size event to the window using its current size -- this has an // effect of refreshing the window layout virtual void SendSizeEvent(); + + + // send wxUpdateUIEvents for all menu items in the menubar, + // or just for menu if non-NULL + void DoMenuUpdates(wxMenu* menu = NULL); + + // do the UI update processing for this window + virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index a7fe51ad66..d3fe92e1ae 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -21,6 +21,7 @@ #include #include #include +#include #include %} @@ -242,6 +243,7 @@ public: %new wxIcon* wxEmptyIcon(); %new wxIcon* wxIconFromXPMData(PyObject* listOfStrings); %new wxIcon* wxIconFromBitmap(const wxBitmap& bmp); +%new wxIcon* wxIconFromLocation(const wxIconLocation& loc); %{ // Implementations of some alternate "constructors" wxIcon* wxEmptyIcon() { @@ -265,8 +267,61 @@ public: icon->CopyFromBitmap(bmp); return icon; } + + wxIcon* wxIconFromLocation(const wxIconLocation& loc) { + wxIcon* icon = new wxIcon(loc); + return icon; + } %} + +//--------------------------------------------------------------------------- + +class wxIconLocation +{ +public: + // ctor takes the name of the file where the icon is + %addmethods { + wxIconLocation(const wxString* filename = &wxPyEmptyString, int num = 0) { +#ifdef __WXMSW__ + return new wxIconLocation(*filename, num); +#else + return new wxIconLocation(*filename); +#endif + } + } + + ~wxIconLocation(); + + + // returns true if this object is valid/initialized + bool IsOk() const; + + // set/get the icon file name + void SetFileName(const wxString& filename); + const wxString& GetFileName() const; + + %addmethods { + void SetIndex(int num) { +#ifdef __WXMSW__ + self->SetIndex(num); +#else + // do nothing +#endif + } + + int GetIndex() { +#ifdef __WXMSW__ + return self->GetIndex(); +#else + return -1; +#endif + } + } +}; + + + //--------------------------------------------------------------------------- class wxIconBundle @@ -967,6 +1022,20 @@ public: //--------------------------------------------------------------------------- +class wxMirrorDC : public wxDC +{ +public: + // constructs a mirror DC associated with the given real DC + // + // if mirror parameter is true, all vertical and horizontal coordinates are + // exchanged, otherwise this class behaves in exactly the same way as a + // plain DC + // + wxMirrorDC(wxDC& dc, bool mirror); +}; + +//--------------------------------------------------------------------------- + #ifdef __WXMSW__ diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 7686ab6d1b..a351426bfd 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1023,7 +1023,7 @@ public: void SetFont(const wxFont& font); void SetAlignment(int hAlign, int vAlign); void SetSize(int num_rows, int num_cols); - void SetOverflow( bool allow ); + void SetOverflow( bool allow = TRUE ); void SetReadOnly(bool isReadOnly = TRUE); void SetRenderer(wxGridCellRenderer *renderer); @@ -1037,6 +1037,7 @@ public: bool HasRenderer() const; bool HasEditor() const; bool HasReadWriteMode() const; + bool HasOverflowMode() const; wxColour GetTextColour() const; wxColour GetBackgroundColour() const; diff --git a/wxPython/src/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index a0670156ea..4f876b7330 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/cmndlgs.cpp @@ -972,502 +972,474 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxFileDialog_GetDirectory(_swigobj) (_swigobj->GetDirectory()) -static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","message", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetDirectory",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetMessage",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetDirectory. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetMessage. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetDirectory(_arg0)); + wxFileDialog_SetMessage(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetFilename(_swigobj) (_swigobj->GetFilename()) -static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilename",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetPath",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilename. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetPath. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetFilename(_arg0)); + wxFileDialog_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) -static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetDirectory(_swigobj,_swigarg0) (_swigobj->SetDirectory(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","dir", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilterIndex",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetDirectory",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilterIndex. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetDirectory. Expected _wxFileDialog_p."); return NULL; } } { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_GetFilterIndex(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxFileDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) -static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetMessage",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetMessage. Expected _wxFileDialog_p."); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - } +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetMessage(_arg0)); + wxFileDialog_SetDirectory(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetFilename(_swigobj,_swigarg0) (_swigobj->SetFilename(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetPath",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetFilename",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetPath. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilename. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetPath(_arg0)); + wxFileDialog_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetWildcard(_swigobj,_swigarg0) (_swigobj->SetWildcard(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","wildCard", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetStyle",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetWildcard",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetStyle. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetWildcard. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxFileDialog_GetStyle(_arg0); + wxFileDialog_SetWildcard(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxFileDialog_GetWildcard(_swigobj) (_swigobj->GetWildcard()) -static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetWildcard",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxFileDialog_SetStyle",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetWildcard. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetStyle. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetWildcard(_arg0)); + wxFileDialog_SetStyle(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} -{ - delete _result; -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFileDialog_SetDirectory(_swigobj,_swigarg0) (_swigobj->SetDirectory(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFileDialog * _arg0; - wxString * _arg1; + int _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","directory", NULL }; + char *_kwnames[] = { "self","filterIndex", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetDirectory",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFileDialog_SetFilterIndex",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetDirectory. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilterIndex. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetDirectory(_arg0,*_arg1); + wxFileDialog_SetFilterIndex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} return _resultobj; } -#define wxFileDialog_SetFilename(_swigobj,_swigarg0) (_swigobj->SetFilename(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) +static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","setfilename", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetFilename",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetMessage",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilename. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetMessage. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilename(_arg0,*_arg1); + _result = new wxString (wxFileDialog_GetMessage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} { - if (_obj1) - delete _arg1; + delete _result; } return _resultobj; } -#define wxFileDialog_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","filterIndex", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFileDialog_SetFilterIndex",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetPath",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilterIndex. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetPath. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilterIndex(_arg0,_arg1); + _result = new wxString (wxFileDialog_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } -#define wxFileDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetDirectory(_swigobj) (_swigobj->GetDirectory()) +static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","message", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetMessage",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetDirectory",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetMessage. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetDirectory. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetMessage(_arg0,*_arg1); + _result = new wxString (wxFileDialog_GetDirectory(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} { - if (_obj1) - delete _arg1; + delete _result; } return _resultobj; } -#define wxFileDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetFilename(_swigobj) (_swigobj->GetFilename()) +static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","path", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetPath",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilename",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetPath. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilename. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetPath(_arg0,*_arg1); + _result = new wxString (wxFileDialog_GetFilename(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} { - if (_obj1) - delete _arg1; + delete _result; } return _resultobj; } -#define wxFileDialog_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetWildcard(_swigobj) (_swigobj->GetWildcard()) +static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","style", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxFileDialog_SetStyle",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetWildcard",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetStyle. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetWildcard. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetStyle(_arg0,_arg1); + _result = new wxString (wxFileDialog_GetWildcard(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } -#define wxFileDialog_SetWildcard(_swigobj,_swigarg0) (_swigobj->SetWildcard(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + long _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","wildCard", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetWildcard",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetStyle",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetWildcard. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetStyle. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetWildcard(_arg0,*_arg1); + _result = (long )wxFileDialog_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxFileDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) +static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; wxFileDialog * _arg0; @@ -1475,18 +1447,18 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_ShowModal",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilterIndex",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_ShowModal. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilterIndex. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_ShowModal(_arg0); + _result = (int )wxFileDialog_GetFilterIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4040,21 +4012,20 @@ static PyMethodDef cmndlgscMethods[] = { { "new_wxMultiChoiceDialog", (PyCFunction) _wrap_new_wxMultiChoiceDialog, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetPaths", (PyCFunction) _wrap_wxFileDialog_GetPaths, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetFilenames", (PyCFunction) _wrap_wxFileDialog_GetFilenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_ShowModal", (PyCFunction) _wrap_wxFileDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetWildcard", (PyCFunction) _wrap_wxFileDialog_SetWildcard, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetStyle", (PyCFunction) _wrap_wxFileDialog_SetStyle, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetPath", (PyCFunction) _wrap_wxFileDialog_SetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetMessage", (PyCFunction) _wrap_wxFileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetFilterIndex", (PyCFunction) _wrap_wxFileDialog_SetFilterIndex, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetFilename", (PyCFunction) _wrap_wxFileDialog_SetFilename, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetDirectory", (PyCFunction) _wrap_wxFileDialog_SetDirectory, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetWildcard", (PyCFunction) _wrap_wxFileDialog_GetWildcard, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetStyle", (PyCFunction) _wrap_wxFileDialog_GetStyle, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetPath", (PyCFunction) _wrap_wxFileDialog_GetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetMessage", (PyCFunction) _wrap_wxFileDialog_GetMessage, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetFilterIndex", (PyCFunction) _wrap_wxFileDialog_GetFilterIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetStyle", (PyCFunction) _wrap_wxFileDialog_GetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetWildcard", (PyCFunction) _wrap_wxFileDialog_GetWildcard, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetFilename", (PyCFunction) _wrap_wxFileDialog_GetFilename, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetDirectory", (PyCFunction) _wrap_wxFileDialog_GetDirectory, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetPath", (PyCFunction) _wrap_wxFileDialog_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetMessage", (PyCFunction) _wrap_wxFileDialog_GetMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetFilterIndex", (PyCFunction) _wrap_wxFileDialog_SetFilterIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetStyle", (PyCFunction) _wrap_wxFileDialog_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetWildcard", (PyCFunction) _wrap_wxFileDialog_SetWildcard, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetFilename", (PyCFunction) _wrap_wxFileDialog_SetFilename, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetDirectory", (PyCFunction) _wrap_wxFileDialog_SetDirectory, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetPath", (PyCFunction) _wrap_wxFileDialog_SetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetMessage", (PyCFunction) _wrap_wxFileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileDialog", (PyCFunction) _wrap_new_wxFileDialog, METH_VARARGS | METH_KEYWORDS }, { "wxDirDialog_ShowModal", (PyCFunction) _wrap_wxDirDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, { "wxDirDialog_SetPath", (PyCFunction) _wrap_wxDirDialog_SetPath, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/cmndlgs.py b/wxPython/src/gtk/cmndlgs.py index a0b448fa30..c796fe6829 100644 --- a/wxPython/src/gtk/cmndlgs.py +++ b/wxPython/src/gtk/cmndlgs.py @@ -136,26 +136,11 @@ class wxFileDialogPtr(wxDialogPtr): def __init__(self,this): self.this = this self.thisown = 0 - def GetDirectory(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetDirectory(self, *_args, **_kwargs) - return val - def GetFilename(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetFilename(self, *_args, **_kwargs) - return val - def GetFilterIndex(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetFilterIndex(self, *_args, **_kwargs) - return val - def GetMessage(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetMessage(self, *_args, **_kwargs) - return val - def GetPath(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetPath(self, *_args, **_kwargs) - return val - def GetStyle(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetStyle(self, *_args, **_kwargs) + def SetMessage(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_SetMessage(self, *_args, **_kwargs) return val - def GetWildcard(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_GetWildcard(self, *_args, **_kwargs) + def SetPath(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_SetPath(self, *_args, **_kwargs) return val def SetDirectory(self, *_args, **_kwargs): val = cmndlgsc.wxFileDialog_SetDirectory(self, *_args, **_kwargs) @@ -163,23 +148,35 @@ class wxFileDialogPtr(wxDialogPtr): def SetFilename(self, *_args, **_kwargs): val = cmndlgsc.wxFileDialog_SetFilename(self, *_args, **_kwargs) return val + def SetWildcard(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_SetWildcard(self, *_args, **_kwargs) + return val + def SetStyle(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_SetStyle(self, *_args, **_kwargs) + return val def SetFilterIndex(self, *_args, **_kwargs): val = cmndlgsc.wxFileDialog_SetFilterIndex(self, *_args, **_kwargs) return val - def SetMessage(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_SetMessage(self, *_args, **_kwargs) + def GetMessage(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetMessage(self, *_args, **_kwargs) return val - def SetPath(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_SetPath(self, *_args, **_kwargs) + def GetPath(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetPath(self, *_args, **_kwargs) return val - def SetStyle(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_SetStyle(self, *_args, **_kwargs) + def GetDirectory(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetDirectory(self, *_args, **_kwargs) return val - def SetWildcard(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_SetWildcard(self, *_args, **_kwargs) + def GetFilename(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetFilename(self, *_args, **_kwargs) return val - def ShowModal(self, *_args, **_kwargs): - val = cmndlgsc.wxFileDialog_ShowModal(self, *_args, **_kwargs) + def GetWildcard(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetWildcard(self, *_args, **_kwargs) + return val + def GetStyle(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetStyle(self, *_args, **_kwargs) + return val + def GetFilterIndex(self, *_args, **_kwargs): + val = cmndlgsc.wxFileDialog_GetFilterIndex(self, *_args, **_kwargs) return val def GetFilenames(self, *_args, **_kwargs): val = cmndlgsc.wxFileDialog_GetFilenames(self, *_args, **_kwargs) diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index e3f2b5d553..7d4ea9b9b8 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -6014,23 +6014,24 @@ static PyObject *_wrap_wxCheckListBox_HitTestXY(PyObject *self, PyObject *args, return _resultobj; } -#define new_wxTextAttr(_swigarg0,_swigarg1,_swigarg2) (new wxTextAttr(_swigarg0,_swigarg1,_swigarg2)) +#define new_wxTextAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxTextAttr(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextAttr * _result; wxColour * _arg0 = (wxColour *) &wxNullColour; wxColour * _arg1 = (wxColour *) &wxNullColour; wxFont * _arg2 = (wxFont *) &wxNullFont; + wxTextAttrAlignment _arg3 = (wxTextAttrAlignment ) (wxTEXT_ALIGNMENT_DEFAULT); wxColour temp; PyObject * _obj0 = 0; wxColour temp0; PyObject * _obj1 = 0; PyObject * _argo2 = 0; - char *_kwnames[] = { "colText","colBack","font", NULL }; + char *_kwnames[] = { "colText","colBack","font","alignment", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOO:new_wxTextAttr",_kwnames,&_obj0,&_obj1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOi:new_wxTextAttr",_kwnames,&_obj0,&_obj1,&_argo2,&_arg3)) return NULL; if (_obj0) { @@ -6052,7 +6053,7 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6094,6 +6095,34 @@ static PyObject *_wrap_delete_wxTextAttr(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxTextAttr_Init(_swigobj) (_swigobj->Init()) +static PyObject *_wrap_wxTextAttr_Init(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_Init",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_Init. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_Init(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxTextAttr_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) static PyObject *_wrap_wxTextAttr_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6202,6 +6231,171 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxTextAttr_SetAlignment(_swigobj,_swigarg0) (_swigobj->SetAlignment(_swigarg0)) +static PyObject *_wrap_wxTextAttr_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _arg0; + wxTextAttrAlignment _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","alignment", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextAttr_SetAlignment",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_SetAlignment. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetAlignment(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTextAttr_SetTabs(_swigobj,_swigarg0) (_swigobj->SetTabs(_swigarg0)) +static PyObject *_wrap_wxTextAttr_SetTabs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _arg0; + wxArrayInt * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tabs", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextAttr_SetTabs",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_SetTabs. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + if (! PySequence_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "Sequence of integers expected."); + return NULL; + } + _arg1 = new wxArrayInt; + int i, len=PySequence_Length(_obj1); + for (i=0; iAdd(PyInt_AS_LONG(number)); + Py_DECREF(item); + Py_DECREF(number); + } +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetTabs(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxTextAttr_SetLeftIndent(_swigobj,_swigarg0) (_swigobj->SetLeftIndent(_swigarg0)) +static PyObject *_wrap_wxTextAttr_SetLeftIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","indent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextAttr_SetLeftIndent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_SetLeftIndent. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetLeftIndent(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTextAttr_SetRightIndent(_swigobj,_swigarg0) (_swigobj->SetRightIndent(_swigarg0)) +static PyObject *_wrap_wxTextAttr_SetRightIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","indent", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextAttr_SetRightIndent",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_SetRightIndent. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetRightIndent(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTextAttr_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0)) +static PyObject *_wrap_wxTextAttr_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextAttr_SetFlags",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_SetFlags. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetFlags(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxTextAttr_HasTextColour(_swigobj) (_swigobj->HasTextColour()) static PyObject *_wrap_wxTextAttr_HasTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6286,6 +6480,147 @@ static PyObject *_wrap_wxTextAttr_HasFont(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxTextAttr_HasAlignment(_swigobj) (_swigobj->HasAlignment()) +static PyObject *_wrap_wxTextAttr_HasAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_HasAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_HasAlignment. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasAlignment(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTextAttr_HasTabs(_swigobj) (_swigobj->HasTabs()) +static PyObject *_wrap_wxTextAttr_HasTabs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_HasTabs",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_HasTabs. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasTabs(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTextAttr_HasLeftIndent(_swigobj) (_swigobj->HasLeftIndent()) +static PyObject *_wrap_wxTextAttr_HasLeftIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_HasLeftIndent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_HasLeftIndent. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasLeftIndent(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTextAttr_HasRightIndent(_swigobj) (_swigobj->HasRightIndent()) +static PyObject *_wrap_wxTextAttr_HasRightIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_HasRightIndent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_HasRightIndent. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasRightIndent(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTextAttr_HasFlag(_swigobj,_swigarg0) (_swigobj->HasFlag(_swigarg0)) +static PyObject *_wrap_wxTextAttr_HasFlag(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextAttr * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flag", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextAttr_HasFlag",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_HasFlag. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasFlag(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxTextAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6376,6 +6711,155 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxTextAttr_GetAlignment(_swigobj) (_swigobj->GetAlignment()) +static PyObject *_wrap_wxTextAttr_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttrAlignment _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_GetAlignment",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_GetAlignment. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxTextAttrAlignment )wxTextAttr_GetAlignment(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxTextAttr_GetTabs(_swigobj) (_swigobj->GetTabs()) +static PyObject *_wrap_wxTextAttr_GetTabs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxArrayInt * _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_GetTabs",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_GetTabs. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxArrayInt & _result_ref = wxTextAttr_GetTabs(_arg0); + _result = (wxArrayInt *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyList_New(0); + size_t idx; + for (idx = 0; idx < _result->GetCount(); idx += 1) { + PyObject* val = PyInt_FromLong(_result->Item(idx)); + PyList_Append(_resultobj, val); + Py_DECREF(val); + } +} + return _resultobj; +} + +#define wxTextAttr_GetLeftIndent(_swigobj) (_swigobj->GetLeftIndent()) +static PyObject *_wrap_wxTextAttr_GetLeftIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_GetLeftIndent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_GetLeftIndent. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxTextAttr_GetLeftIndent(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxTextAttr_GetRightIndent(_swigobj) (_swigobj->GetRightIndent()) +static PyObject *_wrap_wxTextAttr_GetRightIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_GetRightIndent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_GetRightIndent. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxTextAttr_GetRightIndent(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxTextAttr_GetFlags(_swigobj) (_swigobj->GetFlags()) +static PyObject *_wrap_wxTextAttr_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxTextAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextAttr_GetFlags",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_GetFlags. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxTextAttr_GetFlags(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + #define wxTextAttr_IsDefault(_swigobj) (_swigobj->IsDefault()) static PyObject *_wrap_wxTextAttr_IsDefault(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7493,6 +7977,43 @@ static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args return _resultobj; } +#define wxTextCtrl_GetStyle(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetStyle(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextCtrl * _arg0; + long _arg1; + wxTextAttr * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","position","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxTextCtrl_GetStyle",_kwnames,&_argo0,&_arg1,&_argo2)) + 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_GetStyle. Expected _wxTextCtrl_p."); + return NULL; + } + } + if (_argo2) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTextCtrl_GetStyle. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_GetStyle(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxTextCtrl_XYToPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->XYToPosition(_swigarg0,_swigarg1)) static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11857,6 +12378,7 @@ static PyMethodDef controlscMethods[] = { { "wxTextCtrl_ShowPosition", (PyCFunction) _wrap_wxTextCtrl_ShowPosition, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_PositionToXY", (PyCFunction) _wrap_wxTextCtrl_PositionToXY, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_XYToPosition", (PyCFunction) _wrap_wxTextCtrl_XYToPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetStyle", (PyCFunction) _wrap_wxTextCtrl_GetStyle, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetDefaultStyle", (PyCFunction) _wrap_wxTextCtrl_GetDefaultStyle, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetDefaultStyle", (PyCFunction) _wrap_wxTextCtrl_SetDefaultStyle, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetStyle", (PyCFunction) _wrap_wxTextCtrl_SetStyle, METH_VARARGS | METH_KEYWORDS }, @@ -11885,15 +12407,31 @@ static PyMethodDef controlscMethods[] = { { "new_wxTextCtrl", (PyCFunction) _wrap_new_wxTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_Combine", (PyCFunction) _wrap_wxTextAttr_Combine, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_IsDefault", (PyCFunction) _wrap_wxTextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_GetFlags", (PyCFunction) _wrap_wxTextAttr_GetFlags, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_GetRightIndent", (PyCFunction) _wrap_wxTextAttr_GetRightIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_GetLeftIndent", (PyCFunction) _wrap_wxTextAttr_GetLeftIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_GetTabs", (PyCFunction) _wrap_wxTextAttr_GetTabs, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_GetAlignment", (PyCFunction) _wrap_wxTextAttr_GetAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetFont", (PyCFunction) _wrap_wxTextAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetBackgroundColour", (PyCFunction) _wrap_wxTextAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetTextColour", (PyCFunction) _wrap_wxTextAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_HasFlag", (PyCFunction) _wrap_wxTextAttr_HasFlag, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_HasRightIndent", (PyCFunction) _wrap_wxTextAttr_HasRightIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_HasLeftIndent", (PyCFunction) _wrap_wxTextAttr_HasLeftIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_HasTabs", (PyCFunction) _wrap_wxTextAttr_HasTabs, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_HasAlignment", (PyCFunction) _wrap_wxTextAttr_HasAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_HasFont", (PyCFunction) _wrap_wxTextAttr_HasFont, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_HasBackgroundColour", (PyCFunction) _wrap_wxTextAttr_HasBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_HasTextColour", (PyCFunction) _wrap_wxTextAttr_HasTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_SetFlags", (PyCFunction) _wrap_wxTextAttr_SetFlags, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_SetRightIndent", (PyCFunction) _wrap_wxTextAttr_SetRightIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_SetLeftIndent", (PyCFunction) _wrap_wxTextAttr_SetLeftIndent, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_SetTabs", (PyCFunction) _wrap_wxTextAttr_SetTabs, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_SetAlignment", (PyCFunction) _wrap_wxTextAttr_SetAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_SetFont", (PyCFunction) _wrap_wxTextAttr_SetFont, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_SetBackgroundColour", (PyCFunction) _wrap_wxTextAttr_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_SetTextColour", (PyCFunction) _wrap_wxTextAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_Init", (PyCFunction) _wrap_wxTextAttr_Init, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTextAttr", (PyCFunction) _wrap_delete_wxTextAttr, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextAttr", (PyCFunction) _wrap_new_wxTextAttr, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_HitTestXY", (PyCFunction) _wrap_wxCheckListBox_HitTestXY, METH_VARARGS | METH_KEYWORDS }, @@ -12232,6 +12770,42 @@ SWIGEXPORT(void) initcontrolsc() { d = PyModule_GetDict(m); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxDefaultValidator",_wrap_wxDefaultValidator_get, _wrap_wxDefaultValidator_set); + 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_READONLY", PyInt_FromLong((long) wxTE_READONLY)); + 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_LEFT", PyInt_FromLong((long) wxTE_LEFT)); + PyDict_SetItemString(d,"wxTE_CENTER", PyInt_FromLong((long) wxTE_CENTER)); + PyDict_SetItemString(d,"wxTE_RIGHT", PyInt_FromLong((long) wxTE_RIGHT)); + PyDict_SetItemString(d,"wxTE_CENTRE", PyInt_FromLong((long) wxTE_CENTRE)); + PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH)); + PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER)); + PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); + PyDict_SetItemString(d,"wxTE_AUTO_URL", PyInt_FromLong((long) wxTE_AUTO_URL)); + PyDict_SetItemString(d,"wxTE_NOHIDESEL", PyInt_FromLong((long) wxTE_NOHIDESEL)); + PyDict_SetItemString(d,"wxTE_DONTWRAP", PyInt_FromLong((long) wxTE_DONTWRAP)); + PyDict_SetItemString(d,"wxTE_LINEWRAP", PyInt_FromLong((long) wxTE_LINEWRAP)); + PyDict_SetItemString(d,"wxTE_WORDWRAP", PyInt_FromLong((long) wxTE_WORDWRAP)); + PyDict_SetItemString(d,"wxTE_RICH2", PyInt_FromLong((long) wxTE_RICH2)); + PyDict_SetItemString(d,"wxTEXT_ATTR_TEXT_COLOUR", PyInt_FromLong((long) wxTEXT_ATTR_TEXT_COLOUR)); + PyDict_SetItemString(d,"wxTEXT_ATTR_BACKGROUND_COLOUR", PyInt_FromLong((long) wxTEXT_ATTR_BACKGROUND_COLOUR)); + PyDict_SetItemString(d,"wxTEXT_ATTR_FONT_FACE", PyInt_FromLong((long) wxTEXT_ATTR_FONT_FACE)); + PyDict_SetItemString(d,"wxTEXT_ATTR_FONT_SIZE", PyInt_FromLong((long) wxTEXT_ATTR_FONT_SIZE)); + PyDict_SetItemString(d,"wxTEXT_ATTR_FONT_WEIGHT", PyInt_FromLong((long) wxTEXT_ATTR_FONT_WEIGHT)); + PyDict_SetItemString(d,"wxTEXT_ATTR_FONT_ITALIC", PyInt_FromLong((long) wxTEXT_ATTR_FONT_ITALIC)); + PyDict_SetItemString(d,"wxTEXT_ATTR_FONT_UNDERLINE", PyInt_FromLong((long) wxTEXT_ATTR_FONT_UNDERLINE)); + PyDict_SetItemString(d,"wxTEXT_ATTR_FONT", PyInt_FromLong((long) wxTEXT_ATTR_FONT)); + PyDict_SetItemString(d,"wxTEXT_ATTR_ALIGNMENT", PyInt_FromLong((long) wxTEXT_ATTR_ALIGNMENT)); + PyDict_SetItemString(d,"wxTEXT_ATTR_LEFT_INDENT", PyInt_FromLong((long) wxTEXT_ATTR_LEFT_INDENT)); + PyDict_SetItemString(d,"wxTEXT_ATTR_RIGHT_INDENT", PyInt_FromLong((long) wxTEXT_ATTR_RIGHT_INDENT)); + PyDict_SetItemString(d,"wxTEXT_ATTR_TABS", PyInt_FromLong((long) wxTEXT_ATTR_TABS)); + PyDict_SetItemString(d,"wxTEXT_ALIGNMENT_DEFAULT", PyInt_FromLong((long) wxTEXT_ALIGNMENT_DEFAULT)); + PyDict_SetItemString(d,"wxTEXT_ALIGNMENT_LEFT", PyInt_FromLong((long) wxTEXT_ALIGNMENT_LEFT)); + PyDict_SetItemString(d,"wxTEXT_ALIGNMENT_CENTRE", PyInt_FromLong((long) wxTEXT_ALIGNMENT_CENTRE)); + PyDict_SetItemString(d,"wxTEXT_ALIGNMENT_CENTER", PyInt_FromLong((long) wxTEXT_ALIGNMENT_CENTER)); + PyDict_SetItemString(d,"wxTEXT_ALIGNMENT_RIGHT", PyInt_FromLong((long) wxTEXT_ALIGNMENT_RIGHT)); + PyDict_SetItemString(d,"wxTEXT_ALIGNMENT_JUSTIFIED", PyInt_FromLong((long) wxTEXT_ALIGNMENT_JUSTIFIED)); PyDict_SetItemString(d,"wxEVT_COMMAND_TOGGLEBUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOGGLEBUTTON_CLICKED)); { int i; diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index d7cee29ee4..a034fc1a45 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -604,6 +604,9 @@ class wxTextAttrPtr : delfunc(self) except: pass + def Init(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_Init(self, *_args, **_kwargs) + return val def SetTextColour(self, *_args, **_kwargs): val = controlsc.wxTextAttr_SetTextColour(self, *_args, **_kwargs) return val @@ -613,6 +616,21 @@ class wxTextAttrPtr : def SetFont(self, *_args, **_kwargs): val = controlsc.wxTextAttr_SetFont(self, *_args, **_kwargs) return val + def SetAlignment(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_SetAlignment(self, *_args, **_kwargs) + return val + def SetTabs(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_SetTabs(self, *_args, **_kwargs) + return val + def SetLeftIndent(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_SetLeftIndent(self, *_args, **_kwargs) + return val + def SetRightIndent(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_SetRightIndent(self, *_args, **_kwargs) + return val + def SetFlags(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_SetFlags(self, *_args, **_kwargs) + return val def HasTextColour(self, *_args, **_kwargs): val = controlsc.wxTextAttr_HasTextColour(self, *_args, **_kwargs) return val @@ -622,6 +640,21 @@ class wxTextAttrPtr : def HasFont(self, *_args, **_kwargs): val = controlsc.wxTextAttr_HasFont(self, *_args, **_kwargs) return val + def HasAlignment(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_HasAlignment(self, *_args, **_kwargs) + return val + def HasTabs(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_HasTabs(self, *_args, **_kwargs) + return val + def HasLeftIndent(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_HasLeftIndent(self, *_args, **_kwargs) + return val + def HasRightIndent(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_HasRightIndent(self, *_args, **_kwargs) + return val + def HasFlag(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_HasFlag(self, *_args, **_kwargs) + return val def GetTextColour(self, *_args, **_kwargs): val = controlsc.wxTextAttr_GetTextColour(self, *_args, **_kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 @@ -634,6 +667,21 @@ class wxTextAttrPtr : val = controlsc.wxTextAttr_GetFont(self, *_args, **_kwargs) if val: val = wxFontPtr(val) ; val.thisown = 1 return val + def GetAlignment(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_GetAlignment(self, *_args, **_kwargs) + return val + def GetTabs(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_GetTabs(self, *_args, **_kwargs) + return val + def GetLeftIndent(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_GetLeftIndent(self, *_args, **_kwargs) + return val + def GetRightIndent(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_GetRightIndent(self, *_args, **_kwargs) + return val + def GetFlags(self, *_args, **_kwargs): + val = controlsc.wxTextAttr_GetFlags(self, *_args, **_kwargs) + return val def IsDefault(self, *_args, **_kwargs): val = controlsc.wxTextAttr_IsDefault(self, *_args, **_kwargs) return val @@ -724,6 +772,9 @@ class wxTextCtrlPtr(wxControlPtr): val = controlsc.wxTextCtrl_GetDefaultStyle(self, *_args, **_kwargs) if val: val = wxTextAttrPtr(val) return val + def GetStyle(self, *_args, **_kwargs): + val = controlsc.wxTextCtrl_GetStyle(self, *_args, **_kwargs) + return val def XYToPosition(self, *_args, **_kwargs): val = controlsc.wxTextCtrl_XYToPosition(self, *_args, **_kwargs) return val @@ -1205,4 +1256,40 @@ def wxTextAttr_Combine(*_args, **_kwargs): cvar = controlsc.cvar wxDefaultValidator = wxValidatorPtr(controlsc.cvar.wxDefaultValidator) +wxTE_NO_VSCROLL = controlsc.wxTE_NO_VSCROLL +wxTE_AUTO_SCROLL = controlsc.wxTE_AUTO_SCROLL +wxTE_READONLY = controlsc.wxTE_READONLY +wxTE_MULTILINE = controlsc.wxTE_MULTILINE +wxTE_PROCESS_TAB = controlsc.wxTE_PROCESS_TAB +wxTE_LEFT = controlsc.wxTE_LEFT +wxTE_CENTER = controlsc.wxTE_CENTER +wxTE_RIGHT = controlsc.wxTE_RIGHT +wxTE_CENTRE = controlsc.wxTE_CENTRE +wxTE_RICH = controlsc.wxTE_RICH +wxTE_PROCESS_ENTER = controlsc.wxTE_PROCESS_ENTER +wxTE_PASSWORD = controlsc.wxTE_PASSWORD +wxTE_AUTO_URL = controlsc.wxTE_AUTO_URL +wxTE_NOHIDESEL = controlsc.wxTE_NOHIDESEL +wxTE_DONTWRAP = controlsc.wxTE_DONTWRAP +wxTE_LINEWRAP = controlsc.wxTE_LINEWRAP +wxTE_WORDWRAP = controlsc.wxTE_WORDWRAP +wxTE_RICH2 = controlsc.wxTE_RICH2 +wxTEXT_ATTR_TEXT_COLOUR = controlsc.wxTEXT_ATTR_TEXT_COLOUR +wxTEXT_ATTR_BACKGROUND_COLOUR = controlsc.wxTEXT_ATTR_BACKGROUND_COLOUR +wxTEXT_ATTR_FONT_FACE = controlsc.wxTEXT_ATTR_FONT_FACE +wxTEXT_ATTR_FONT_SIZE = controlsc.wxTEXT_ATTR_FONT_SIZE +wxTEXT_ATTR_FONT_WEIGHT = controlsc.wxTEXT_ATTR_FONT_WEIGHT +wxTEXT_ATTR_FONT_ITALIC = controlsc.wxTEXT_ATTR_FONT_ITALIC +wxTEXT_ATTR_FONT_UNDERLINE = controlsc.wxTEXT_ATTR_FONT_UNDERLINE +wxTEXT_ATTR_FONT = controlsc.wxTEXT_ATTR_FONT +wxTEXT_ATTR_ALIGNMENT = controlsc.wxTEXT_ATTR_ALIGNMENT +wxTEXT_ATTR_LEFT_INDENT = controlsc.wxTEXT_ATTR_LEFT_INDENT +wxTEXT_ATTR_RIGHT_INDENT = controlsc.wxTEXT_ATTR_RIGHT_INDENT +wxTEXT_ATTR_TABS = controlsc.wxTEXT_ATTR_TABS +wxTEXT_ALIGNMENT_DEFAULT = controlsc.wxTEXT_ALIGNMENT_DEFAULT +wxTEXT_ALIGNMENT_LEFT = controlsc.wxTEXT_ALIGNMENT_LEFT +wxTEXT_ALIGNMENT_CENTRE = controlsc.wxTEXT_ALIGNMENT_CENTRE +wxTEXT_ALIGNMENT_CENTER = controlsc.wxTEXT_ALIGNMENT_CENTER +wxTEXT_ALIGNMENT_RIGHT = controlsc.wxTEXT_ALIGNMENT_RIGHT +wxTEXT_ALIGNMENT_JUSTIFIED = controlsc.wxTEXT_ALIGNMENT_JUSTIFIED wxEVT_COMMAND_TOGGLEBUTTON_CLICKED = controlsc.wxEVT_COMMAND_TOGGLEBUTTON_CLICKED diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index ed48036c07..a692e97323 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -5908,14 +5908,6 @@ static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void *SwigwxPyTreeItemDataTowxObject(void *ptr) { - wxPyTreeItemData *src; - wxObject *dest; - src = (wxPyTreeItemData *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - #define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0)) static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6173,257 +6165,266 @@ static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxTreeEvent_GetOldItem(_swigobj) (_swigobj->GetOldItem()) -static PyObject *_wrap_wxTreeEvent_GetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_SetItem(_swigobj,_swigarg0) (_swigobj->SetItem(_swigarg0)) +static PyObject *_wrap_wxTreeEvent_SetItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTreeItemId * _result; wxTreeEvent * _arg0; + wxTreeItemId * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetOldItem",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetItem",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetOldItem. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetItem. Expected _wxTreeEvent_p."); + return NULL; + } + } + if (_argo1) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeEvent_SetItem. Expected _wxTreeItemId_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0)); + wxTreeEvent_SetItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTreeEvent_GetPoint(_swigobj) (_swigobj->GetPoint()) -static PyObject *_wrap_wxTreeEvent_GetPoint(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_GetOldItem(_swigobj) (_swigobj->GetOldItem()) +static PyObject *_wrap_wxTreeEvent_GetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPoint * _result; + wxTreeItemId * _result; wxTreeEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetPoint",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetOldItem",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetPoint. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetOldItem. Expected _wxTreeEvent_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxTreeEvent_GetPoint(_arg0)); + _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } -#define wxTreeEvent_GetKeyEvent(_swigobj) (_swigobj->GetKeyEvent()) -static PyObject *_wrap_wxTreeEvent_GetKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_SetOldItem(_swigobj,_swigarg0) (_swigobj->SetOldItem(_swigarg0)) +static PyObject *_wrap_wxTreeEvent_SetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxKeyEvent * _result; wxTreeEvent * _arg0; + wxTreeItemId * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetKeyEvent",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetOldItem",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetKeyEvent. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetOldItem. Expected _wxTreeEvent_p."); + return NULL; + } + } + if (_argo1) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeEvent_SetOldItem. Expected _wxTreeItemId_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); - _result = (wxKeyEvent *) &_result_ref; + wxTreeEvent_SetOldItem(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTreeEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) -static PyObject *_wrap_wxTreeEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_GetPoint(_swigobj) (_swigobj->GetPoint()) +static PyObject *_wrap_wxTreeEvent_GetPoint(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + wxPoint * _result; wxTreeEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetKeyCode",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetPoint",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetKeyCode. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetPoint. Expected _wxTreeEvent_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTreeEvent_GetKeyCode(_arg0); + _result = new wxPoint (wxTreeEvent_GetPoint(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } -#define wxTreeEvent_GetLabel(_swigobj) (_swigobj->GetLabel()) -static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_SetPoint(_swigobj,_swigarg0) (_swigobj->SetPoint(_swigarg0)) +static PyObject *_wrap_wxTreeEvent_SetPoint(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxTreeEvent * _arg0; + wxPoint * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetLabel",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetPoint",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetLabel. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetPoint. Expected _wxTreeEvent_p."); return NULL; } } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); - _result = (wxString *) &_result_ref; + wxTreeEvent_SetPoint(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTreeEvent_IsEditCancelled(_swigobj) (_swigobj->IsEditCancelled()) -static PyObject *_wrap_wxTreeEvent_IsEditCancelled(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_GetKeyEvent(_swigobj) (_swigobj->GetKeyEvent()) +static PyObject *_wrap_wxTreeEvent_GetKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + wxKeyEvent * _result; wxTreeEvent * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_IsEditCancelled",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetKeyEvent",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_IsEditCancelled. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetKeyEvent. Expected _wxTreeEvent_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTreeEvent_IsEditCancelled(_arg0); + const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); + _result = (wxKeyEvent *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } -#define wxTreeEvent_SetItem(_swigobj,_swigarg0) (_swigobj->SetItem(_swigarg0)) -static PyObject *_wrap_wxTreeEvent_SetItem(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxTreeEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + int _result; wxTreeEvent * _arg0; - wxTreeItemId * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","item", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetItem",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetKeyCode",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetItem. Expected _wxTreeEvent_p."); - return NULL; - } - } - if (_argo1) { - if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeEvent_SetItem. Expected _wxTreeItemId_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetKeyCode. Expected _wxTreeEvent_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeEvent_SetItem(_arg0,*_arg1); + _result = (int )wxTreeEvent_GetKeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTreeEvent_SetOldItem(_swigobj,_swigarg0) (_swigobj->SetOldItem(_swigarg0)) -static PyObject *_wrap_wxTreeEvent_SetOldItem(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_SetKeyEvent(_swigobj,_swigarg0) (_swigobj->SetKeyEvent(_swigarg0)) +static PyObject *_wrap_wxTreeEvent_SetKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeEvent * _arg0; - wxTreeItemId * _arg1; + wxKeyEvent * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","item", NULL }; + char *_kwnames[] = { "self","evt", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetOldItem",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetKeyEvent",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetOldItem. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetKeyEvent. Expected _wxTreeEvent_p."); return NULL; } } if (_argo1) { - if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeEvent_SetOldItem. Expected _wxTreeItemId_p."); + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeEvent_SetKeyEvent. Expected _wxKeyEvent_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeEvent_SetOldItem(_arg0,*_arg1); + wxTreeEvent_SetKeyEvent(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6432,114 +6433,105 @@ static PyObject *_wrap_wxTreeEvent_SetOldItem(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxTreeEvent_SetPoint(_swigobj,_swigarg0) (_swigobj->SetPoint(_swigarg0)) -static PyObject *_wrap_wxTreeEvent_SetPoint(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_GetLabel(_swigobj) (_swigobj->GetLabel()) +static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxTreeEvent * _arg0; - wxPoint * _arg1; PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","pt", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetPoint",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetLabel",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetPoint. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetLabel. Expected _wxTreeEvent_p."); return NULL; } } -{ - _arg1 = &temp; - if (! wxPoint_helper(_obj1, &_arg1)) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeEvent_SetPoint(_arg0,*_arg1); + const wxString & _result_ref = wxTreeEvent_GetLabel(_arg0); + _result = (wxString *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} return _resultobj; } -#define wxTreeEvent_SetKeyEvent(_swigobj,_swigarg0) (_swigobj->SetKeyEvent(_swigarg0)) -static PyObject *_wrap_wxTreeEvent_SetKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) +static PyObject *_wrap_wxTreeEvent_SetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeEvent * _arg0; - wxKeyEvent * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","evt", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","label", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetKeyEvent",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetLabel",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetKeyEvent. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetLabel. Expected _wxTreeEvent_p."); return NULL; } } - if (_argo1) { - if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeEvent_SetKeyEvent. Expected _wxKeyEvent_p."); +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - } +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeEvent_SetKeyEvent(_arg0,*_arg1); + wxTreeEvent_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxTreeEvent_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) -static PyObject *_wrap_wxTreeEvent_SetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeEvent_IsEditCancelled(_swigobj) (_swigobj->IsEditCancelled()) +static PyObject *_wrap_wxTreeEvent_IsEditCancelled(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTreeEvent * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","label", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeEvent_SetLabel",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_IsEditCancelled",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_SetLabel. Expected _wxTreeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_IsEditCancelled. Expected _wxTreeEvent_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTreeEvent_SetLabel(_arg0,*_arg1); + _result = (bool )wxTreeEvent_IsEditCancelled(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -10958,7 +10950,144 @@ static PyObject *_wrap_wxDirFilterListCtrl_FillFilterList(PyObject *self, PyObje return _resultobj; } +#define new_wxFileIconsTable() (new wxFileIconsTable()) +static PyObject *_wrap_new_wxFileIconsTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileIconsTable * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxFileIconsTable",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFileIconsTable *)new_wxFileIconsTable(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFileIconsTable_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxFileIconsTable(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxFileIconsTable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileIconsTable * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxFileIconsTable",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileIconsTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxFileIconsTable. Expected _wxFileIconsTable_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxFileIconsTable(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFileIconsTable_GetIconID(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetIconID(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFileIconsTable_GetIconID(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFileIconsTable * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxEmptyString; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","extension","mime", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxFileIconsTable_GetIconID",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileIconsTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileIconsTable_GetIconID. Expected _wxFileIconsTable_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxFileIconsTable_GetIconID(_arg0,*_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define wxFileIconsTable_GetSmallImageList(_swigobj) (_swigobj->GetSmallImageList()) +static PyObject *_wrap_wxFileIconsTable_GetSmallImageList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImageList * _result; + wxFileIconsTable * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileIconsTable_GetSmallImageList",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileIconsTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileIconsTable_GetSmallImageList. Expected _wxFileIconsTable_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxImageList *)wxFileIconsTable_GetSmallImageList(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + static PyMethodDef controls2cMethods[] = { + { "wxFileIconsTable_GetSmallImageList", (PyCFunction) _wrap_wxFileIconsTable_GetSmallImageList, METH_VARARGS | METH_KEYWORDS }, + { "wxFileIconsTable_GetIconID", (PyCFunction) _wrap_wxFileIconsTable_GetIconID, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxFileIconsTable", (PyCFunction) _wrap_delete_wxFileIconsTable, METH_VARARGS | METH_KEYWORDS }, + { "new_wxFileIconsTable", (PyCFunction) _wrap_new_wxFileIconsTable, METH_VARARGS | METH_KEYWORDS }, { "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 }, @@ -11068,17 +11197,17 @@ static PyMethodDef controls2cMethods[] = { { "new_wxPreTreeCtrl", (PyCFunction) _wrap_new_wxPreTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_SetEditCanceled", (PyCFunction) _wrap_wxTreeEvent_SetEditCanceled, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeEvent_SetLabel", (PyCFunction) _wrap_wxTreeEvent_SetLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeEvent_SetKeyEvent", (PyCFunction) _wrap_wxTreeEvent_SetKeyEvent, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeEvent_SetPoint", (PyCFunction) _wrap_wxTreeEvent_SetPoint, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeEvent_SetOldItem", (PyCFunction) _wrap_wxTreeEvent_SetOldItem, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeEvent_SetItem", (PyCFunction) _wrap_wxTreeEvent_SetItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_IsEditCancelled", (PyCFunction) _wrap_wxTreeEvent_IsEditCancelled, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeEvent_SetLabel", (PyCFunction) _wrap_wxTreeEvent_SetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetLabel", (PyCFunction) _wrap_wxTreeEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeEvent_SetKeyEvent", (PyCFunction) _wrap_wxTreeEvent_SetKeyEvent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetKeyCode", (PyCFunction) _wrap_wxTreeEvent_GetKeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetKeyEvent", (PyCFunction) _wrap_wxTreeEvent_GetKeyEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeEvent_SetPoint", (PyCFunction) _wrap_wxTreeEvent_SetPoint, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetPoint", (PyCFunction) _wrap_wxTreeEvent_GetPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeEvent_SetOldItem", (PyCFunction) _wrap_wxTreeEvent_SetOldItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetOldItem", (PyCFunction) _wrap_wxTreeEvent_GetOldItem, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeEvent_SetItem", (PyCFunction) _wrap_wxTreeEvent_SetItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetItem", (PyCFunction) _wrap_wxTreeEvent_GetItem, METH_VARARGS | METH_KEYWORDS }, { "new_wxTreeEvent", (PyCFunction) _wrap_new_wxTreeEvent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeItemData_SetId", (PyCFunction) _wrap_wxTreeItemData_SetId, METH_VARARGS | METH_KEYWORDS }, @@ -11326,7 +11455,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxDirItemData",SwigwxDirItemDataTowxObject}, { "_wxObject","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject}, { "_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject}, - { "_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject}, { "_wxObject","_wxListView",SwigwxListViewTowxObject}, { "_wxObject","_wxPyListCtrl",SwigwxPyListCtrlTowxObject}, { "_wxObject","_wxListEvent",SwigwxListEventTowxObject}, @@ -11494,20 +11622,20 @@ SWIGEXPORT(void) initcontrols2c() { PyDict_SetItemString(d,"wxLIST_FORMAT_CENTER", PyInt_FromLong((long) wxLIST_FORMAT_CENTER)); PyDict_SetItemString(d,"wxTR_NO_BUTTONS", PyInt_FromLong((long) wxTR_NO_BUTTONS)); PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS)); - PyDict_SetItemString(d,"wxTR_TWIST_BUTTONS", PyInt_FromLong((long) wxTR_TWIST_BUTTONS)); PyDict_SetItemString(d,"wxTR_NO_LINES", PyInt_FromLong((long) wxTR_NO_LINES)); - PyDict_SetItemString(d,"wxTR_MAC_BUTTONS", PyInt_FromLong((long) wxTR_MAC_BUTTONS)); - PyDict_SetItemString(d,"wxTR_AQUA_BUTTONS", PyInt_FromLong((long) wxTR_AQUA_BUTTONS)); + PyDict_SetItemString(d,"wxTR_LINES_AT_ROOT", PyInt_FromLong((long) wxTR_LINES_AT_ROOT)); PyDict_SetItemString(d,"wxTR_SINGLE", PyInt_FromLong((long) wxTR_SINGLE)); PyDict_SetItemString(d,"wxTR_MULTIPLE", PyInt_FromLong((long) wxTR_MULTIPLE)); PyDict_SetItemString(d,"wxTR_EXTENDED", PyInt_FromLong((long) wxTR_EXTENDED)); - PyDict_SetItemString(d,"wxTR_FULL_ROW_HIGHLIGHT", PyInt_FromLong((long) wxTR_FULL_ROW_HIGHLIGHT)); + PyDict_SetItemString(d,"wxTR_HAS_VARIABLE_ROW_HEIGHT", PyInt_FromLong((long) wxTR_HAS_VARIABLE_ROW_HEIGHT)); PyDict_SetItemString(d,"wxTR_EDIT_LABELS", PyInt_FromLong((long) wxTR_EDIT_LABELS)); - PyDict_SetItemString(d,"wxTR_LINES_AT_ROOT", PyInt_FromLong((long) wxTR_LINES_AT_ROOT)); PyDict_SetItemString(d,"wxTR_HIDE_ROOT", PyInt_FromLong((long) wxTR_HIDE_ROOT)); PyDict_SetItemString(d,"wxTR_ROW_LINES", PyInt_FromLong((long) wxTR_ROW_LINES)); - PyDict_SetItemString(d,"wxTR_HAS_VARIABLE_ROW_HEIGHT", PyInt_FromLong((long) wxTR_HAS_VARIABLE_ROW_HEIGHT)); + PyDict_SetItemString(d,"wxTR_FULL_ROW_HIGHLIGHT", PyInt_FromLong((long) wxTR_FULL_ROW_HIGHLIGHT)); PyDict_SetItemString(d,"wxTR_DEFAULT_STYLE", PyInt_FromLong((long) wxTR_DEFAULT_STYLE)); + PyDict_SetItemString(d,"wxTR_TWIST_BUTTONS", PyInt_FromLong((long) wxTR_TWIST_BUTTONS)); + PyDict_SetItemString(d,"wxTR_MAC_BUTTONS", PyInt_FromLong((long) wxTR_MAC_BUTTONS)); + PyDict_SetItemString(d,"wxTR_AQUA_BUTTONS", PyInt_FromLong((long) wxTR_AQUA_BUTTONS)); PyDict_SetItemString(d,"wxTreeItemIcon_Normal", PyInt_FromLong((long) wxTreeItemIcon_Normal)); PyDict_SetItemString(d,"wxTreeItemIcon_Selected", PyInt_FromLong((long) wxTreeItemIcon_Selected)); PyDict_SetItemString(d,"wxTreeItemIcon_Expanded", PyInt_FromLong((long) wxTreeItemIcon_Expanded)); @@ -11545,6 +11673,7 @@ 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,"wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK)); 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)); @@ -11557,6 +11686,15 @@ SWIGEXPORT(void) initcontrols2c() { wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl"); wxPyPtrTypeMap_Add("wxListCtrl", "wxPyListCtrl"); + PyDict_SetItemString(d,"wxFileIconsTable_folder", PyInt_FromLong((long) wxFileIconsTable::folder)); + PyDict_SetItemString(d,"wxFileIconsTable_folder_open", PyInt_FromLong((long) wxFileIconsTable::folder_open)); + PyDict_SetItemString(d,"wxFileIconsTable_computer", PyInt_FromLong((long) wxFileIconsTable::computer)); + PyDict_SetItemString(d,"wxFileIconsTable_drive", PyInt_FromLong((long) wxFileIconsTable::drive)); + PyDict_SetItemString(d,"wxFileIconsTable_cdrom", PyInt_FromLong((long) wxFileIconsTable::cdrom)); + PyDict_SetItemString(d,"wxFileIconsTable_floppy", PyInt_FromLong((long) wxFileIconsTable::floppy)); + PyDict_SetItemString(d,"wxFileIconsTable_removeable", PyInt_FromLong((long) wxFileIconsTable::removeable)); + PyDict_SetItemString(d,"wxFileIconsTable_file", PyInt_FromLong((long) wxFileIconsTable::file)); + PyDict_SetItemString(d,"wxFileIconsTable_executable", PyInt_FromLong((long) wxFileIconsTable::executable)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index d07fd0d97b..117f3e2a31 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -90,9 +90,6 @@ def EVT_TREE_BEGIN_DRAG(win, id, func): def EVT_TREE_BEGIN_RDRAG(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func) -def EVT_TREE_END_DRAG(win, id, func): - win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func) - def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func) @@ -138,6 +135,13 @@ def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func): def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func) +def EVT_TREE_END_DRAG(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func) + +def EVT_TREE_STATE_IMAGE_CLICK(win, id, func): + win.Connect(id, -1, wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, func) + + class wxListItemAttrPtr : def __init__(self,this): self.this = this @@ -844,7 +848,7 @@ class wxTreeItemId(wxTreeItemIdPtr): -class wxTreeItemDataPtr(wxObjectPtr): +class wxTreeItemDataPtr : def __init__(self,this): self.this = this self.thisown = 0 @@ -879,14 +883,23 @@ class wxTreeEventPtr(wxNotifyEventPtr): val = controls2c.wxTreeEvent_GetItem(self, *_args, **_kwargs) if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 return val + def SetItem(self, *_args, **_kwargs): + val = controls2c.wxTreeEvent_SetItem(self, *_args, **_kwargs) + return val def GetOldItem(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_GetOldItem(self, *_args, **_kwargs) if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1 return val + def SetOldItem(self, *_args, **_kwargs): + val = controls2c.wxTreeEvent_SetOldItem(self, *_args, **_kwargs) + return val def GetPoint(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_GetPoint(self, *_args, **_kwargs) if val: val = wxPointPtr(val) ; val.thisown = 1 return val + def SetPoint(self, *_args, **_kwargs): + val = controls2c.wxTreeEvent_SetPoint(self, *_args, **_kwargs) + return val def GetKeyEvent(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_GetKeyEvent(self, *_args, **_kwargs) if val: val = wxKeyEventPtr(val) @@ -894,33 +907,23 @@ class wxTreeEventPtr(wxNotifyEventPtr): def GetKeyCode(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_GetKeyCode(self, *_args, **_kwargs) return val - def GetLabel(self, *_args, **_kwargs): - val = controls2c.wxTreeEvent_GetLabel(self, *_args, **_kwargs) - return val - def IsEditCancelled(self, *_args, **_kwargs): - val = controls2c.wxTreeEvent_IsEditCancelled(self, *_args, **_kwargs) - return val - def SetItem(self, *_args, **_kwargs): - val = controls2c.wxTreeEvent_SetItem(self, *_args, **_kwargs) - return val - def SetOldItem(self, *_args, **_kwargs): - val = controls2c.wxTreeEvent_SetOldItem(self, *_args, **_kwargs) - return val - def SetPoint(self, *_args, **_kwargs): - val = controls2c.wxTreeEvent_SetPoint(self, *_args, **_kwargs) - return val def SetKeyEvent(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_SetKeyEvent(self, *_args, **_kwargs) return val + def GetLabel(self, *_args, **_kwargs): + val = controls2c.wxTreeEvent_GetLabel(self, *_args, **_kwargs) + return val def SetLabel(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_SetLabel(self, *_args, **_kwargs) return val + def IsEditCancelled(self, *_args, **_kwargs): + val = controls2c.wxTreeEvent_IsEditCancelled(self, *_args, **_kwargs) + return val def SetEditCanceled(self, *_args, **_kwargs): val = controls2c.wxTreeEvent_SetEditCanceled(self, *_args, **_kwargs) return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxTreeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) - GetCode = GetKeyCode class wxTreeEvent(wxTreeEventPtr): def __init__(self,*_args,**_kwargs): self.this = controls2c.new_wxTreeEvent(*_args,**_kwargs) @@ -1349,6 +1352,41 @@ def wxPreDirFilterListCtrl(*_args,**_kwargs): return val +class wxFileIconsTablePtr : + folder = controls2c.wxFileIconsTable_folder + folder_open = controls2c.wxFileIconsTable_folder_open + computer = controls2c.wxFileIconsTable_computer + drive = controls2c.wxFileIconsTable_drive + cdrom = controls2c.wxFileIconsTable_cdrom + floppy = controls2c.wxFileIconsTable_floppy + removeable = controls2c.wxFileIconsTable_removeable + file = controls2c.wxFileIconsTable_file + executable = controls2c.wxFileIconsTable_executable + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self, delfunc=controls2c.delete_wxFileIconsTable): + if self.thisown == 1: + try: + delfunc(self) + except: + pass + def GetIconID(self, *_args, **_kwargs): + val = controls2c.wxFileIconsTable_GetIconID(self, *_args, **_kwargs) + return val + def GetSmallImageList(self, *_args, **_kwargs): + val = controls2c.wxFileIconsTable_GetSmallImageList(self, *_args, **_kwargs) + return val + def __repr__(self): + return "<%s.%s instance; proxy of C++ wxFileIconsTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) +class wxFileIconsTable(wxFileIconsTablePtr): + def __init__(self,*_args,**_kwargs): + self.this = controls2c.new_wxFileIconsTable(*_args,**_kwargs) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -1445,20 +1483,20 @@ wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER wxTR_NO_BUTTONS = controls2c.wxTR_NO_BUTTONS wxTR_HAS_BUTTONS = controls2c.wxTR_HAS_BUTTONS -wxTR_TWIST_BUTTONS = controls2c.wxTR_TWIST_BUTTONS wxTR_NO_LINES = controls2c.wxTR_NO_LINES -wxTR_MAC_BUTTONS = controls2c.wxTR_MAC_BUTTONS -wxTR_AQUA_BUTTONS = controls2c.wxTR_AQUA_BUTTONS +wxTR_LINES_AT_ROOT = controls2c.wxTR_LINES_AT_ROOT wxTR_SINGLE = controls2c.wxTR_SINGLE wxTR_MULTIPLE = controls2c.wxTR_MULTIPLE wxTR_EXTENDED = controls2c.wxTR_EXTENDED -wxTR_FULL_ROW_HIGHLIGHT = controls2c.wxTR_FULL_ROW_HIGHLIGHT +wxTR_HAS_VARIABLE_ROW_HEIGHT = controls2c.wxTR_HAS_VARIABLE_ROW_HEIGHT wxTR_EDIT_LABELS = controls2c.wxTR_EDIT_LABELS -wxTR_LINES_AT_ROOT = controls2c.wxTR_LINES_AT_ROOT wxTR_HIDE_ROOT = controls2c.wxTR_HIDE_ROOT wxTR_ROW_LINES = controls2c.wxTR_ROW_LINES -wxTR_HAS_VARIABLE_ROW_HEIGHT = controls2c.wxTR_HAS_VARIABLE_ROW_HEIGHT +wxTR_FULL_ROW_HIGHLIGHT = controls2c.wxTR_FULL_ROW_HIGHLIGHT wxTR_DEFAULT_STYLE = controls2c.wxTR_DEFAULT_STYLE +wxTR_TWIST_BUTTONS = controls2c.wxTR_TWIST_BUTTONS +wxTR_MAC_BUTTONS = controls2c.wxTR_MAC_BUTTONS +wxTR_AQUA_BUTTONS = controls2c.wxTR_AQUA_BUTTONS wxTreeItemIcon_Normal = controls2c.wxTreeItemIcon_Normal wxTreeItemIcon_Selected = controls2c.wxTreeItemIcon_Selected wxTreeItemIcon_Expanded = controls2c.wxTreeItemIcon_Expanded @@ -1496,6 +1534,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 +wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK = controls2c.wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK wxDIRCTRL_DIR_ONLY = controls2c.wxDIRCTRL_DIR_ONLY wxDIRCTRL_SELECT_FIRST = controls2c.wxDIRCTRL_SELECT_FIRST wxDIRCTRL_SHOW_FILTERS = controls2c.wxDIRCTRL_SHOW_FILTERS diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index f7c973ba7d..84ddb5e9ce 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -224,34 +224,6 @@ static PyObject *_wrap_wxEvent_GetId(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define wxEvent_GetSkipped(_swigobj) (_swigobj->GetSkipped()) -static PyObject *_wrap_wxEvent_GetSkipped(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvent_GetSkipped",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetSkipped. Expected _wxEvent_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxEvent_GetSkipped(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxEvent_GetTimestamp(_swigobj) (_swigobj->GetTimestamp()) static PyObject *_wrap_wxEvent_GetTimestamp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -404,6 +376,34 @@ static PyObject *_wrap_wxEvent_SetTimestamp(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxEvent_IsCommandEvent(_swigobj) (_swigobj->IsCommandEvent()) +static PyObject *_wrap_wxEvent_IsCommandEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvent_IsCommandEvent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_IsCommandEvent. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxEvent_IsCommandEvent(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxEvent_Skip(_swigobj,_swigarg0) (_swigobj->Skip(_swigarg0)) static PyObject *_wrap_wxEvent_Skip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -435,6 +435,119 @@ static PyObject *_wrap_wxEvent_Skip(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +#define wxEvent_GetSkipped(_swigobj) (_swigobj->GetSkipped()) +static PyObject *_wrap_wxEvent_GetSkipped(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvent_GetSkipped",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_GetSkipped. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxEvent_GetSkipped(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxEvent_ShouldPropagate(_swigobj) (_swigobj->ShouldPropagate()) +static PyObject *_wrap_wxEvent_ShouldPropagate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvent_ShouldPropagate",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_ShouldPropagate. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxEvent_ShouldPropagate(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxEvent_StopPropagation(_swigobj) (_swigobj->StopPropagation()) +static PyObject *_wrap_wxEvent_StopPropagation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEvent_StopPropagation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_StopPropagation. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxEvent_StopPropagation(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxEvent_ResumePropagation(_swigobj,_swigarg0) (_swigobj->ResumePropagation(_swigarg0)) +static PyObject *_wrap_wxEvent_ResumePropagation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxEvent * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","propagationLevel", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxEvent_ResumePropagation",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvent_ResumePropagation. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxEvent_ResumePropagation(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxEvent_Clone(_swigobj) (_swigobj->Clone()) static PyObject *_wrap_wxEvent_Clone(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -470,6 +583,130 @@ static PyObject *_wrap_wxEvent_Clone(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +#define new_wxPropagationDisabler(_swigarg0) (new wxPropagationDisabler(_swigarg0)) +static PyObject *_wrap_new_wxPropagationDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPropagationDisabler * _result; + wxEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "event", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPropagationDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPropagationDisabler. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPropagationDisabler *)new_wxPropagationDisabler(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPropagationDisabler_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPropagationDisabler(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPropagationDisabler(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPropagationDisabler * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPropagationDisabler",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPropagationDisabler_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPropagationDisabler. Expected _wxPropagationDisabler_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxPropagationDisabler(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define new_wxPropagateOnce(_swigarg0) (new wxPropagateOnce(_swigarg0)) +static PyObject *_wrap_new_wxPropagateOnce(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPropagateOnce * _result; + wxEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "event", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPropagateOnce",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPropagateOnce. Expected _wxEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPropagateOnce *)new_wxPropagateOnce(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPropagateOnce_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPropagateOnce(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPropagateOnce(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPropagateOnce * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPropagateOnce",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPropagateOnce_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPropagateOnce. Expected _wxPropagateOnce_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxPropagateOnce(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxSizeEventTowxEvent(void *ptr) { wxSizeEvent *src; wxEvent *dest; @@ -504,50 +741,116 @@ static PyObject *_wrap_new_wxSizeEvent(PyObject *self, PyObject *args, PyObject _arg0 = &temp; if (! wxSize_helper(_obj0, &_arg0)) return NULL; -} +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSizeEvent *)new_wxSizeEvent(*_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizeEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSizeEvent_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxSizeEvent_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizeEvent_GetSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizeEvent_GetSize. Expected _wxSizeEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxSizeEvent_GetSize(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxSizeEvent_GetRect(_swigobj) (_swigobj->GetRect()) +static PyObject *_wrap_wxSizeEvent_GetRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxSizeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizeEvent_GetRect",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizeEvent_GetRect. Expected _wxSizeEvent_p."); + return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizeEvent *)new_wxSizeEvent(*_arg0,_arg1); + _result = new wxRect (wxSizeEvent_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxSizeEvent_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } -#define wxSizeEvent_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxSizeEvent_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizeEvent_SetRect(_swigobj,_swigarg0) (_swigobj->SetRect(_swigarg0)) +static PyObject *_wrap_wxSizeEvent_SetRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSize * _result; wxSizeEvent * _arg0; + wxRect * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizeEvent_GetSize",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizeEvent_SetRect",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizeEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizeEvent_GetSize. Expected _wxSizeEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizeEvent_SetRect. Expected _wxSizeEvent_p."); return NULL; } } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizeEvent_GetSize(_arg0)); + wxSizeEvent_SetRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -4697,6 +5000,72 @@ static PyObject *_wrap_wxMoveEvent_GetPosition(PyObject *self, PyObject *args, P return _resultobj; } +#define wxMoveEvent_GetRect(_swigobj) (_swigobj->GetRect()) +static PyObject *_wrap_wxMoveEvent_GetRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _result; + wxMoveEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMoveEvent_GetRect",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMoveEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMoveEvent_GetRect. Expected _wxMoveEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxMoveEvent_GetRect(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxMoveEvent_SetRect(_swigobj,_swigarg0) (_swigobj->SetRect(_swigarg0)) +static PyObject *_wrap_wxMoveEvent_SetRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMoveEvent * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMoveEvent_SetRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMoveEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMoveEvent_SetRect. Expected _wxMoveEvent_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxMoveEvent_SetRect(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxPaintEventTowxEvent(void *ptr) { wxPaintEvent *src; wxEvent *dest; @@ -4840,13 +5209,13 @@ static void *SwigwxFocusEventTowxObject(void *ptr) { static PyObject *_wrap_new_wxFocusEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFocusEvent * _result; - WXTYPE _arg0 = (WXTYPE ) 0; + int _arg0 = (int ) 0; int _arg1 = (int ) 0; char *_kwnames[] = { "eventType","id", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|hi:new_wxFocusEvent",_kwnames,&_arg0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxFocusEvent",_kwnames,&_arg0,&_arg1)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4971,14 +5340,14 @@ static void *SwigwxActivateEventTowxObject(void *ptr) { static PyObject *_wrap_new_wxActivateEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxActivateEvent * _result; - WXTYPE _arg0 = (WXTYPE ) 0; + int _arg0 = (int ) 0; int _arg1 = (int ) TRUE; int _arg2 = (int ) 0; char *_kwnames[] = { "eventType","active","id", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|hii:new_wxActivateEvent",_kwnames,&_arg0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxActivateEvent",_kwnames,&_arg0,&_arg1,&_arg2)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5083,21 +5452,30 @@ static void *SwigwxMenuEventTowxObject(void *ptr) { return (void *) dest; } -#define new_wxMenuEvent(_swigarg0,_swigarg1) (new wxMenuEvent(_swigarg0,_swigarg1)) +#define new_wxMenuEvent(_swigarg0,_swigarg1,_swigarg2) (new wxMenuEvent(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_new_wxMenuEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxMenuEvent * _result; - WXTYPE _arg0 = (WXTYPE ) 0; + int _arg0 = (int ) 0; int _arg1 = (int ) 0; - char *_kwnames[] = { "id","id", NULL }; + wxMenu * _arg2 = (wxMenu *) NULL; + PyObject * _argo2 = 0; + char *_kwnames[] = { "id","winid","menu", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|hi:new_wxMenuEvent",_kwnames,&_arg0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiO:new_wxMenuEvent",_kwnames,&_arg0,&_arg1,&_argo2)) return NULL; + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxMenuEvent. Expected _wxMenu_p."); + return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuEvent *)new_wxMenuEvent(_arg0,_arg1); + _result = (wxMenuEvent *)new_wxMenuEvent(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5167,6 +5545,34 @@ static PyObject *_wrap_wxMenuEvent_IsPopup(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxMenuEvent_GetMenu(_swigobj) (_swigobj->GetMenu()) +static PyObject *_wrap_wxMenuEvent_GetMenu(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenu * _result; + wxMenuEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuEvent_GetMenu",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuEvent_GetMenu. Expected _wxMenuEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMenu *)wxMenuEvent_GetMenu(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + static void *SwigwxShowEventTowxEvent(void *ptr) { wxShowEvent *src; wxEvent *dest; @@ -6121,6 +6527,70 @@ static PyObject *_wrap_wxIdleEvent_MoreRequested(PyObject *self, PyObject *args, return _resultobj; } +static PyObject *_wrap_wxIdleEvent_SetMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIdleMode _arg0; + char *_kwnames[] = { "mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxIdleEvent_SetMode",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIdleEvent::SetMode(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxIdleEvent_GetMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIdleMode _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxIdleEvent_GetMode",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIdleMode )wxIdleEvent::GetMode(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxIdleEvent_CanSend(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIdleEvent_CanSend",_kwnames,&_argo0)) + 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 wxIdleEvent_CanSend. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxIdleEvent::CanSend(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxUpdateUIEventTowxEvent(void *ptr) { wxUpdateUIEvent *src; wxEvent *dest; @@ -6442,6 +6912,125 @@ static PyObject *_wrap_wxUpdateUIEvent_SetText(PyObject *self, PyObject *args, P return _resultobj; } +static PyObject *_wrap_wxUpdateUIEvent_SetUpdateInterval(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _arg0; + char *_kwnames[] = { "updateInterval", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxUpdateUIEvent_SetUpdateInterval",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxUpdateUIEvent::SetUpdateInterval(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxUpdateUIEvent_GetUpdateInterval(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxUpdateUIEvent_GetUpdateInterval",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxUpdateUIEvent::GetUpdateInterval(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxUpdateUIEvent_CanUpdate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxUpdateUIEvent_CanUpdate",_kwnames,&_argo0)) + 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 wxUpdateUIEvent_CanUpdate. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxUpdateUIEvent::CanUpdate(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxUpdateUIEvent_ResetUpdateTime(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxUpdateUIEvent_ResetUpdateTime",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxUpdateUIEvent::ResetUpdateTime(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxUpdateUIEvent_SetMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxUpdateUIMode _arg0; + char *_kwnames[] = { "mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxUpdateUIEvent_SetMode",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxUpdateUIEvent::SetMode(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxUpdateUIEvent_GetMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxUpdateUIMode _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxUpdateUIEvent_GetMode",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxUpdateUIMode )wxUpdateUIEvent::GetMode(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxSysColourChangedEventTowxEvent(void *ptr) { wxSysColourChangedEvent *src; wxEvent *dest; @@ -7413,20 +8002,21 @@ static void *SwigwxPyEventTowxObject(void *ptr) { return (void *) dest; } -#define new_wxPyEvent(_swigarg0) (new wxPyEvent(_swigarg0)) +#define new_wxPyEvent(_swigarg0,_swigarg1) (new wxPyEvent(_swigarg0,_swigarg1)) static PyObject *_wrap_new_wxPyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyEvent * _result; int _arg0 = (int ) 0; - char *_kwnames[] = { "id", NULL }; + wxEventType _arg1 = (wxEventType ) wxEVT_NULL; + char *_kwnames[] = { "winid","commandType", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxPyEvent",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxPyEvent",_kwnames,&_arg0,&_arg1)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyEvent *)new_wxPyEvent(_arg0); + _result = (wxPyEvent *)new_wxPyEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7708,6 +8298,12 @@ static PyMethodDef eventscMethods[] = { { "wxNotifyEvent_IsAllowed", (PyCFunction) _wrap_wxNotifyEvent_IsAllowed, METH_VARARGS | METH_KEYWORDS }, { "new_wxNotifyEvent", (PyCFunction) _wrap_new_wxNotifyEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxSysColourChangedEvent", (PyCFunction) _wrap_new_wxSysColourChangedEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxUpdateUIEvent_GetMode", (PyCFunction) _wrap_wxUpdateUIEvent_GetMode, METH_VARARGS | METH_KEYWORDS }, + { "wxUpdateUIEvent_SetMode", (PyCFunction) _wrap_wxUpdateUIEvent_SetMode, METH_VARARGS | METH_KEYWORDS }, + { "wxUpdateUIEvent_ResetUpdateTime", (PyCFunction) _wrap_wxUpdateUIEvent_ResetUpdateTime, METH_VARARGS | METH_KEYWORDS }, + { "wxUpdateUIEvent_CanUpdate", (PyCFunction) _wrap_wxUpdateUIEvent_CanUpdate, METH_VARARGS | METH_KEYWORDS }, + { "wxUpdateUIEvent_GetUpdateInterval", (PyCFunction) _wrap_wxUpdateUIEvent_GetUpdateInterval, METH_VARARGS | METH_KEYWORDS }, + { "wxUpdateUIEvent_SetUpdateInterval", (PyCFunction) _wrap_wxUpdateUIEvent_SetUpdateInterval, METH_VARARGS | METH_KEYWORDS }, { "wxUpdateUIEvent_SetText", (PyCFunction) _wrap_wxUpdateUIEvent_SetText, METH_VARARGS | METH_KEYWORDS }, { "wxUpdateUIEvent_Enable", (PyCFunction) _wrap_wxUpdateUIEvent_Enable, METH_VARARGS | METH_KEYWORDS }, { "wxUpdateUIEvent_Check", (PyCFunction) _wrap_wxUpdateUIEvent_Check, METH_VARARGS | METH_KEYWORDS }, @@ -7718,6 +8314,9 @@ static PyMethodDef eventscMethods[] = { { "wxUpdateUIEvent_GetEnabled", (PyCFunction) _wrap_wxUpdateUIEvent_GetEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxUpdateUIEvent_GetChecked", (PyCFunction) _wrap_wxUpdateUIEvent_GetChecked, METH_VARARGS | METH_KEYWORDS }, { "new_wxUpdateUIEvent", (PyCFunction) _wrap_new_wxUpdateUIEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxIdleEvent_CanSend", (PyCFunction) _wrap_wxIdleEvent_CanSend, METH_VARARGS | METH_KEYWORDS }, + { "wxIdleEvent_GetMode", (PyCFunction) _wrap_wxIdleEvent_GetMode, METH_VARARGS | METH_KEYWORDS }, + { "wxIdleEvent_SetMode", (PyCFunction) _wrap_wxIdleEvent_SetMode, METH_VARARGS | METH_KEYWORDS }, { "wxIdleEvent_MoreRequested", (PyCFunction) _wrap_wxIdleEvent_MoreRequested, METH_VARARGS | METH_KEYWORDS }, { "wxIdleEvent_RequestMore", (PyCFunction) _wrap_wxIdleEvent_RequestMore, METH_VARARGS | METH_KEYWORDS }, { "new_wxIdleEvent", (PyCFunction) _wrap_new_wxIdleEvent, METH_VARARGS | METH_KEYWORDS }, @@ -7747,6 +8346,7 @@ static PyMethodDef eventscMethods[] = { { "wxShowEvent_GetShow", (PyCFunction) _wrap_wxShowEvent_GetShow, METH_VARARGS | METH_KEYWORDS }, { "wxShowEvent_SetShow", (PyCFunction) _wrap_wxShowEvent_SetShow, METH_VARARGS | METH_KEYWORDS }, { "new_wxShowEvent", (PyCFunction) _wrap_new_wxShowEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxMenuEvent_GetMenu", (PyCFunction) _wrap_wxMenuEvent_GetMenu, METH_VARARGS | METH_KEYWORDS }, { "wxMenuEvent_IsPopup", (PyCFunction) _wrap_wxMenuEvent_IsPopup, METH_VARARGS | METH_KEYWORDS }, { "wxMenuEvent_GetMenuId", (PyCFunction) _wrap_wxMenuEvent_GetMenuId, METH_VARARGS | METH_KEYWORDS }, { "new_wxMenuEvent", (PyCFunction) _wrap_new_wxMenuEvent, METH_VARARGS | METH_KEYWORDS }, @@ -7759,6 +8359,8 @@ static PyMethodDef eventscMethods[] = { { "wxEraseEvent_GetDC", (PyCFunction) _wrap_wxEraseEvent_GetDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxEraseEvent", (PyCFunction) _wrap_new_wxEraseEvent, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaintEvent", (PyCFunction) _wrap_new_wxPaintEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxMoveEvent_SetRect", (PyCFunction) _wrap_wxMoveEvent_SetRect, METH_VARARGS | METH_KEYWORDS }, + { "wxMoveEvent_GetRect", (PyCFunction) _wrap_wxMoveEvent_GetRect, METH_VARARGS | METH_KEYWORDS }, { "wxMoveEvent_GetPosition", (PyCFunction) _wrap_wxMoveEvent_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "new_wxMoveEvent", (PyCFunction) _wrap_new_wxMoveEvent, METH_VARARGS | METH_KEYWORDS }, { "wxNavigationKeyEvent_SetCurrentFocus", (PyCFunction) _wrap_wxNavigationKeyEvent_SetCurrentFocus, METH_VARARGS | METH_KEYWORDS }, @@ -7894,16 +8496,26 @@ static PyMethodDef eventscMethods[] = { { "wxCloseEvent_GetLoggingOff", (PyCFunction) _wrap_wxCloseEvent_GetLoggingOff, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_SetLoggingOff", (PyCFunction) _wrap_wxCloseEvent_SetLoggingOff, METH_VARARGS | METH_KEYWORDS }, { "new_wxCloseEvent", (PyCFunction) _wrap_new_wxCloseEvent, METH_VARARGS | METH_KEYWORDS }, + { "wxSizeEvent_SetRect", (PyCFunction) _wrap_wxSizeEvent_SetRect, METH_VARARGS | METH_KEYWORDS }, + { "wxSizeEvent_GetRect", (PyCFunction) _wrap_wxSizeEvent_GetRect, METH_VARARGS | METH_KEYWORDS }, { "wxSizeEvent_GetSize", (PyCFunction) _wrap_wxSizeEvent_GetSize, METH_VARARGS | METH_KEYWORDS }, { "new_wxSizeEvent", (PyCFunction) _wrap_new_wxSizeEvent, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxPropagateOnce", (PyCFunction) _wrap_delete_wxPropagateOnce, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPropagateOnce", (PyCFunction) _wrap_new_wxPropagateOnce, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxPropagationDisabler", (PyCFunction) _wrap_delete_wxPropagationDisabler, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPropagationDisabler", (PyCFunction) _wrap_new_wxPropagationDisabler, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_Clone", (PyCFunction) _wrap_wxEvent_Clone, METH_VARARGS | METH_KEYWORDS }, + { "wxEvent_ResumePropagation", (PyCFunction) _wrap_wxEvent_ResumePropagation, METH_VARARGS | METH_KEYWORDS }, + { "wxEvent_StopPropagation", (PyCFunction) _wrap_wxEvent_StopPropagation, METH_VARARGS | METH_KEYWORDS }, + { "wxEvent_ShouldPropagate", (PyCFunction) _wrap_wxEvent_ShouldPropagate, METH_VARARGS | METH_KEYWORDS }, + { "wxEvent_GetSkipped", (PyCFunction) _wrap_wxEvent_GetSkipped, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_Skip", (PyCFunction) _wrap_wxEvent_Skip, METH_VARARGS | METH_KEYWORDS }, + { "wxEvent_IsCommandEvent", (PyCFunction) _wrap_wxEvent_IsCommandEvent, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_SetTimestamp", (PyCFunction) _wrap_wxEvent_SetTimestamp, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_SetId", (PyCFunction) _wrap_wxEvent_SetId, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_SetEventType", (PyCFunction) _wrap_wxEvent_SetEventType, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_SetEventObject", (PyCFunction) _wrap_wxEvent_SetEventObject, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_GetTimestamp", (PyCFunction) _wrap_wxEvent_GetTimestamp, METH_VARARGS | METH_KEYWORDS }, - { "wxEvent_GetSkipped", (PyCFunction) _wrap_wxEvent_GetSkipped, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_GetId", (PyCFunction) _wrap_wxEvent_GetId, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_GetEventType", (PyCFunction) _wrap_wxEvent_GetEventType, METH_VARARGS | METH_KEYWORDS }, { "wxEvent_GetEventObject", (PyCFunction) _wrap_wxEvent_GetEventObject, METH_VARARGS | METH_KEYWORDS }, @@ -8110,6 +8722,12 @@ SWIGEXPORT(void) initeventsc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("eventsc", eventscMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxEVENT_PROPAGATE_NONE", PyInt_FromLong((long) wxEVENT_PROPAGATE_NONE)); + PyDict_SetItemString(d,"wxEVENT_PROPAGATE_MAX", PyInt_FromLong((long) wxEVENT_PROPAGATE_MAX)); + PyDict_SetItemString(d,"wxIDLE_PROCESS_ALL", PyInt_FromLong((long) wxIDLE_PROCESS_ALL)); + PyDict_SetItemString(d,"wxIDLE_PROCESS_SPECIFIED", PyInt_FromLong((long) wxIDLE_PROCESS_SPECIFIED)); + PyDict_SetItemString(d,"wxUPDATE_UI_PROCESS_ALL", PyInt_FromLong((long) wxUPDATE_UI_PROCESS_ALL)); + PyDict_SetItemString(d,"wxUPDATE_UI_PROCESS_SPECIFIED", PyInt_FromLong((long) wxUPDATE_UI_PROCESS_SPECIFIED)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index 2d5de7f5b7..3505d67a41 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -25,9 +25,6 @@ class wxEventPtr(wxObjectPtr): def GetId(self, *_args, **_kwargs): val = eventsc.wxEvent_GetId(self, *_args, **_kwargs) return val - def GetSkipped(self, *_args, **_kwargs): - val = eventsc.wxEvent_GetSkipped(self, *_args, **_kwargs) - return val def GetTimestamp(self, *_args, **_kwargs): val = eventsc.wxEvent_GetTimestamp(self, *_args, **_kwargs) return val @@ -43,9 +40,24 @@ class wxEventPtr(wxObjectPtr): def SetTimestamp(self, *_args, **_kwargs): val = eventsc.wxEvent_SetTimestamp(self, *_args, **_kwargs) return val + def IsCommandEvent(self, *_args, **_kwargs): + val = eventsc.wxEvent_IsCommandEvent(self, *_args, **_kwargs) + return val def Skip(self, *_args, **_kwargs): val = eventsc.wxEvent_Skip(self, *_args, **_kwargs) return val + def GetSkipped(self, *_args, **_kwargs): + val = eventsc.wxEvent_GetSkipped(self, *_args, **_kwargs) + return val + def ShouldPropagate(self, *_args, **_kwargs): + val = eventsc.wxEvent_ShouldPropagate(self, *_args, **_kwargs) + return val + def StopPropagation(self, *_args, **_kwargs): + val = eventsc.wxEvent_StopPropagation(self, *_args, **_kwargs) + return val + def ResumePropagation(self, *_args, **_kwargs): + val = eventsc.wxEvent_ResumePropagation(self, *_args, **_kwargs) + return val def Clone(self, *_args, **_kwargs): val = eventsc.wxEvent_Clone(self, *_args, **_kwargs) if val: val = wxEventPtr(val) @@ -59,6 +71,46 @@ class wxEvent(wxEventPtr): +class wxPropagationDisablerPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self, delfunc=eventsc.delete_wxPropagationDisabler): + if self.thisown == 1: + try: + delfunc(self) + except: + pass + def __repr__(self): + return "<%s.%s instance; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) +class wxPropagationDisabler(wxPropagationDisablerPtr): + def __init__(self,*_args,**_kwargs): + self.this = eventsc.new_wxPropagationDisabler(*_args,**_kwargs) + self.thisown = 1 + + + + +class wxPropagateOncePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self, delfunc=eventsc.delete_wxPropagateOnce): + if self.thisown == 1: + try: + delfunc(self) + except: + pass + def __repr__(self): + return "<%s.%s instance; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) +class wxPropagateOnce(wxPropagateOncePtr): + def __init__(self,*_args,**_kwargs): + self.this = eventsc.new_wxPropagateOnce(*_args,**_kwargs) + self.thisown = 1 + + + + class wxSizeEventPtr(wxEventPtr): def __init__(self,this): self.this = this @@ -67,6 +119,13 @@ class wxSizeEventPtr(wxEventPtr): val = eventsc.wxSizeEvent_GetSize(self, *_args, **_kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 return val + def GetRect(self, *_args, **_kwargs): + val = eventsc.wxSizeEvent_GetRect(self, *_args, **_kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def SetRect(self, *_args, **_kwargs): + val = eventsc.wxSizeEvent_SetRect(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxSizeEvent(wxSizeEventPtr): @@ -585,6 +644,13 @@ class wxMoveEventPtr(wxEventPtr): val = eventsc.wxMoveEvent_GetPosition(self, *_args, **_kwargs) if val: val = wxPointPtr(val) ; val.thisown = 1 return val + def GetRect(self, *_args, **_kwargs): + val = eventsc.wxMoveEvent_GetRect(self, *_args, **_kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def SetRect(self, *_args, **_kwargs): + val = eventsc.wxMoveEvent_SetRect(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxMoveEvent(wxMoveEventPtr): @@ -698,6 +764,9 @@ class wxMenuEventPtr(wxEventPtr): def IsPopup(self, *_args, **_kwargs): val = eventsc.wxMenuEvent_IsPopup(self, *_args, **_kwargs) return val + def GetMenu(self, *_args, **_kwargs): + val = eventsc.wxMenuEvent_GetMenu(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxMenuEvent(wxMenuEventPtr): @@ -1152,7 +1221,31 @@ class wxPyCommandEvent(wxPyCommandEventPtr): wxNewEventType = eventsc.wxNewEventType +wxIdleEvent_SetMode = eventsc.wxIdleEvent_SetMode + +wxIdleEvent_GetMode = eventsc.wxIdleEvent_GetMode + +wxIdleEvent_CanSend = eventsc.wxIdleEvent_CanSend + +wxUpdateUIEvent_SetUpdateInterval = eventsc.wxUpdateUIEvent_SetUpdateInterval + +wxUpdateUIEvent_GetUpdateInterval = eventsc.wxUpdateUIEvent_GetUpdateInterval + +wxUpdateUIEvent_CanUpdate = eventsc.wxUpdateUIEvent_CanUpdate + +wxUpdateUIEvent_ResetUpdateTime = eventsc.wxUpdateUIEvent_ResetUpdateTime + +wxUpdateUIEvent_SetMode = eventsc.wxUpdateUIEvent_SetMode + +wxUpdateUIEvent_GetMode = eventsc.wxUpdateUIEvent_GetMode + #-------------- VARIABLE WRAPPERS ------------------ +wxEVENT_PROPAGATE_NONE = eventsc.wxEVENT_PROPAGATE_NONE +wxEVENT_PROPAGATE_MAX = eventsc.wxEVENT_PROPAGATE_MAX +wxIDLE_PROCESS_ALL = eventsc.wxIDLE_PROCESS_ALL +wxIDLE_PROCESS_SPECIFIED = eventsc.wxIDLE_PROCESS_SPECIFIED +wxUPDATE_UI_PROCESS_ALL = eventsc.wxUPDATE_UI_PROCESS_ALL +wxUPDATE_UI_PROCESS_SPECIFIED = eventsc.wxUPDATE_UI_PROCESS_SPECIFIED diff --git a/wxPython/src/gtk/fonts.cpp b/wxPython/src/gtk/fonts.cpp index 8f1b926660..e3e657910c 100644 --- a/wxPython/src/gtk/fonts.cpp +++ b/wxPython/src/gtk/fonts.cpp @@ -976,140 +976,82 @@ static PyObject *_wrap_wxFontMapper_Set(PyObject *self, PyObject *args, PyObject return _resultobj; } -static PyObject * wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,const wxString & facename,bool interactive) { - wxFontEncoding alt_enc; - if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive)) - return PyInt_FromLong(alt_enc); - else { - Py_INCREF(Py_None); - return Py_None; - } - } -static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_CharsetToEncoding(_swigobj,_swigarg0,_swigarg1) (_swigobj->CharsetToEncoding(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - PyObject * _result; + wxFontEncoding _result; wxFontMapper * _arg0; - wxFontEncoding _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyString; - bool _arg3 = (bool ) TRUE; + wxString * _arg1; + bool _arg2 = (bool ) true; PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - int tempbool3 = (int) TRUE; - char *_kwnames[] = { "self","encoding","facename","interactive", NULL }; + PyObject * _obj1 = 0; + int tempbool2 = (int) true; + char *_kwnames[] = { "self","charset","interactive", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|Oi:wxFontMapper_GetAltForEncoding",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFontMapper_CharsetToEncoding",_kwnames,&_argo0,&_obj1,&tempbool2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_GetAltForEncoding. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_CharsetToEncoding. Expected _wxFontMapper_p."); return NULL; } } - if (_obj2) { - _arg2 = wxString_in_helper(_obj2); - if (_arg2 == NULL) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; } - _arg3 = (bool ) tempbool3; + _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); + _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ - _resultobj = _result; -} +} _resultobj = Py_BuildValue("i",_result); { - if (_obj2) - delete _arg2; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFontMapper_IsEncodingAvailable(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEncodingAvailable(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxFontMapper_GetSupportedEncodingsCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFontMapper * _arg0; - wxFontEncoding _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyString; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","encoding","facename", NULL }; + size_t _result; + char *_kwnames[] = { NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxFontMapper_IsEncodingAvailable",_kwnames,&_argo0,&_arg1,&_obj2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_IsEncodingAvailable. Expected _wxFontMapper_p."); + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetSupportedEncodingsCount",_kwnames)) return NULL; - } - } - if (_obj2) -{ - _arg2 = wxString_in_helper(_obj2); - if (_arg2 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); + _result = (size_t )wxFontMapper::GetSupportedEncodingsCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} return _resultobj; } -#define wxFontMapper_CharsetToEncoding(_swigobj,_swigarg0,_swigarg1) (_swigobj->CharsetToEncoding(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFontMapper_CharsetToEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxFontMapper_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontEncoding _result; - wxFontMapper * _arg0; - wxString * _arg1; - bool _arg2 = (bool ) TRUE; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - int tempbool2 = (int) TRUE; - char *_kwnames[] = { "self","charset","interactive", NULL }; + size_t _arg0; + char *_kwnames[] = { "n", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFontMapper_CharsetToEncoding",_kwnames,&_argo0,&_obj1,&tempbool2)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_CharsetToEncoding. Expected _wxFontMapper_p."); + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFontMapper_GetEncoding",_kwnames,&_arg0)) return NULL; - } - } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} - _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontEncoding )wxFontMapper_CharsetToEncoding(_arg0,*_arg1,_arg2); + _result = (wxFontEncoding )wxFontMapper::GetEncoding(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); -{ - if (_obj1) - delete _arg1; -} return _resultobj; } @@ -1169,35 +1111,35 @@ static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObj return _resultobj; } -#define wxFontMapper_SetDialogParent(_swigobj,_swigarg0) (_swigobj->SetDialogParent(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_SetConfig(_swigobj,_swigarg0) (_swigobj->SetConfig(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontMapper * _arg0; - wxWindow * _arg1; + wxConfigBase * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","parent", NULL }; + char *_kwnames[] = { "self","config", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogParent",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfig",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogParent. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfig. Expected _wxFontMapper_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 wxFontMapper_SetDialogParent. Expected _wxWindow_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetConfig. Expected _wxConfigBase_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogParent(_arg0,_arg1); + wxFontMapper_SetConfig(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1206,22 +1148,22 @@ static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *ar return _resultobj; } -#define wxFontMapper_SetDialogTitle(_swigobj,_swigarg0) (_swigobj->SetDialogTitle(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_SetConfigPath(_swigobj,_swigarg0) (_swigobj->SetConfigPath(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontMapper * _arg0; wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","title", NULL }; + char *_kwnames[] = { "self","prefix", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogTitle",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfigPath",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogTitle. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfigPath. Expected _wxFontMapper_p."); return NULL; } } @@ -1232,7 +1174,7 @@ static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetDialogTitle(_arg0,*_arg1); + wxFontMapper_SetConfigPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1245,105 +1187,191 @@ static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *arg return _resultobj; } -#define wxFontMapper_SetConfig(_swigobj,_swigarg0) (_swigobj->SetConfig(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetConfig(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxChar * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetDefaultConfigPath",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxChar *)wxFontMapper::GetDefaultConfigPath(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("s", _result); + return _resultobj; +} + +static PyObject * wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncoding encoding,const wxString & facename,bool interactive) { + wxFontEncoding alt_enc; + if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive)) + return PyInt_FromLong(alt_enc); + else { + Py_INCREF(Py_None); + return Py_None; + } + } +static PyObject *_wrap_wxFontMapper_GetAltForEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; wxFontMapper * _arg0; - wxConfigBase * _arg1; + wxFontEncoding _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyString; + bool _arg3 = (bool ) TRUE; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","config", NULL }; + PyObject * _obj2 = 0; + int tempbool3 = (int) TRUE; + char *_kwnames[] = { "self","encoding","facename","interactive", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfig",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|Oi:wxFontMapper_GetAltForEncoding",_kwnames,&_argo0,&_arg1,&_obj2,&tempbool3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfig. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_GetAltForEncoding. Expected _wxFontMapper_p."); return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontMapper_SetConfig. Expected _wxConfigBase_p."); + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - } +} + _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfig(_arg0,_arg1); + _result = (PyObject *)wxFontMapper_GetAltForEncoding(_arg0,_arg1,*_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ + _resultobj = _result; +} +{ + if (_obj2) + delete _arg2; +} return _resultobj; } -#define wxFontMapper_SetConfigPath(_swigobj,_swigarg0) (_swigobj->SetConfigPath(_swigarg0)) -static PyObject *_wrap_wxFontMapper_SetConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_IsEncodingAvailable(_swigobj,_swigarg0,_swigarg1) (_swigobj->IsEncodingAvailable(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFontMapper_IsEncodingAvailable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxFontMapper * _arg0; - wxString * _arg1; + wxFontEncoding _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyString; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","prefix", NULL }; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","encoding","facename", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetConfigPath",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxFontMapper_IsEncodingAvailable",_kwnames,&_argo0,&_arg1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetConfigPath. Expected _wxFontMapper_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_IsEncodingAvailable. Expected _wxFontMapper_p."); return NULL; } } + if (_obj2) { - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFontMapper_SetConfigPath(_arg0,*_arg1); + _result = (bool )wxFontMapper_IsEncodingAvailable(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); { - if (_obj1) - delete _arg1; + if (_obj2) + delete _arg2; } return _resultobj; } -static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFontMapper_SetDialogParent(_swigobj,_swigarg0) (_swigobj->SetDialogParent(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetDialogParent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; - char *_kwnames[] = { NULL }; + wxFontMapper * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","parent", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFontMapper_GetDefaultConfigPath",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogParent",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogParent. Expected _wxFontMapper_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 wxFontMapper_SetDialogParent. Expected _wxWindow_p."); return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFontMapper::GetDefaultConfigPath()); + wxFontMapper_SetDialogParent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; } + +#define wxFontMapper_SetDialogTitle(_swigobj,_swigarg0) (_swigobj->SetDialogTitle(_swigarg0)) +static PyObject *_wrap_wxFontMapper_SetDialogTitle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontMapper * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","title", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFontMapper_SetDialogTitle",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontMapper_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontMapper_SetDialogTitle. Expected _wxFontMapper_p."); + return NULL; + } + } { - delete _result; + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFontMapper_SetDialogTitle(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; } return _resultobj; } @@ -3510,6 +3538,34 @@ static PyObject *_wrap_wxLocale_GetLanguageInfo(PyObject *self, PyObject *args, return _resultobj; } +static PyObject *_wrap_wxLocale_GetLanguageName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + int _arg0; + char *_kwnames[] = { "lang", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxLocale_GetLanguageName",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxLocale::GetLanguageName(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxLocale_FindLanguageInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxLanguageInfo * _result; @@ -3872,6 +3928,7 @@ static PyMethodDef fontscMethods[] = { { "wxLocale_GetString", (PyCFunction) _wrap_wxLocale_GetString, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_AddLanguage", (PyCFunction) _wrap_wxLocale_AddLanguage, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_FindLanguageInfo", (PyCFunction) _wrap_wxLocale_FindLanguageInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_GetLanguageName", (PyCFunction) _wrap_wxLocale_GetLanguageName, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_GetLanguageInfo", (PyCFunction) _wrap_wxLocale_GetLanguageInfo, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_IsLoaded", (PyCFunction) _wrap_wxLocale_IsLoaded, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_AddCatalog", (PyCFunction) _wrap_wxLocale_AddCatalog, METH_VARARGS | METH_KEYWORDS }, @@ -3937,16 +3994,18 @@ static PyMethodDef fontscMethods[] = { { "wxFont_wxFontFromNativeInfoString", (PyCFunction) _wrap_wxFont_wxFontFromNativeInfoString, METH_VARARGS | METH_KEYWORDS }, { "new_wxFontFromNativeInfo", (PyCFunction) _wrap_new_wxFontFromNativeInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxFont", (PyCFunction) _wrap_new_wxFont, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_SetDialogTitle", (PyCFunction) _wrap_wxFontMapper_SetDialogTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_SetDialogParent", (PyCFunction) _wrap_wxFontMapper_SetDialogParent, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_IsEncodingAvailable", (PyCFunction) _wrap_wxFontMapper_IsEncodingAvailable, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_GetAltForEncoding", (PyCFunction) _wrap_wxFontMapper_GetAltForEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetDefaultConfigPath", (PyCFunction) _wrap_wxFontMapper_GetDefaultConfigPath, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_SetConfigPath", (PyCFunction) _wrap_wxFontMapper_SetConfigPath, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_SetConfig", (PyCFunction) _wrap_wxFontMapper_SetConfig, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetDialogTitle", (PyCFunction) _wrap_wxFontMapper_SetDialogTitle, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_SetDialogParent", (PyCFunction) _wrap_wxFontMapper_SetDialogParent, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetEncodingDescription", (PyCFunction) _wrap_wxFontMapper_GetEncodingDescription, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetEncodingName", (PyCFunction) _wrap_wxFontMapper_GetEncodingName, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_GetEncoding", (PyCFunction) _wrap_wxFontMapper_GetEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxFontMapper_GetSupportedEncodingsCount", (PyCFunction) _wrap_wxFontMapper_GetSupportedEncodingsCount, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_CharsetToEncoding", (PyCFunction) _wrap_wxFontMapper_CharsetToEncoding, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_IsEncodingAvailable", (PyCFunction) _wrap_wxFontMapper_IsEncodingAvailable, METH_VARARGS | METH_KEYWORDS }, - { "wxFontMapper_GetAltForEncoding", (PyCFunction) _wrap_wxFontMapper_GetAltForEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_Set", (PyCFunction) _wrap_wxFontMapper_Set, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_Get", (PyCFunction) _wrap_wxFontMapper_Get, METH_VARARGS | METH_KEYWORDS }, { "delete_wxFontMapper", (PyCFunction) _wrap_delete_wxFontMapper, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/fonts.py b/wxPython/src/gtk/fonts.py index 82c50f821c..e36477f30c 100644 --- a/wxPython/src/gtk/fonts.py +++ b/wxPython/src/gtk/fonts.py @@ -86,27 +86,27 @@ class wxFontMapperPtr : delfunc(self) except: pass + def CharsetToEncoding(self, *_args, **_kwargs): + val = fontsc.wxFontMapper_CharsetToEncoding(self, *_args, **_kwargs) + return val + def SetConfig(self, *_args, **_kwargs): + val = fontsc.wxFontMapper_SetConfig(self, *_args, **_kwargs) + return val + def SetConfigPath(self, *_args, **_kwargs): + val = fontsc.wxFontMapper_SetConfigPath(self, *_args, **_kwargs) + return val def GetAltForEncoding(self, *_args, **_kwargs): val = fontsc.wxFontMapper_GetAltForEncoding(self, *_args, **_kwargs) return val def IsEncodingAvailable(self, *_args, **_kwargs): val = fontsc.wxFontMapper_IsEncodingAvailable(self, *_args, **_kwargs) return val - def CharsetToEncoding(self, *_args, **_kwargs): - val = fontsc.wxFontMapper_CharsetToEncoding(self, *_args, **_kwargs) - return val def SetDialogParent(self, *_args, **_kwargs): val = fontsc.wxFontMapper_SetDialogParent(self, *_args, **_kwargs) return val def SetDialogTitle(self, *_args, **_kwargs): val = fontsc.wxFontMapper_SetDialogTitle(self, *_args, **_kwargs) return val - def SetConfig(self, *_args, **_kwargs): - val = fontsc.wxFontMapper_SetConfig(self, *_args, **_kwargs) - return val - def SetConfigPath(self, *_args, **_kwargs): - val = fontsc.wxFontMapper_SetConfigPath(self, *_args, **_kwargs) - return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxFontMapper instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxFontMapper(wxFontMapperPtr): @@ -429,6 +429,10 @@ def wxFontMapper_Set(*_args, **_kwargs): if val: val = wxFontMapperPtr(val) return val +wxFontMapper_GetSupportedEncodingsCount = fontsc.wxFontMapper_GetSupportedEncodingsCount + +wxFontMapper_GetEncoding = fontsc.wxFontMapper_GetEncoding + wxFontMapper_GetEncodingName = fontsc.wxFontMapper_GetEncodingName wxFontMapper_GetEncodingDescription = fontsc.wxFontMapper_GetEncodingDescription @@ -452,6 +456,8 @@ def wxLocale_GetLanguageInfo(*_args, **_kwargs): if val: val = wxLanguageInfoPtr(val) return val +wxLocale_GetLanguageName = fontsc.wxLocale_GetLanguageName + def wxLocale_FindLanguageInfo(*_args, **_kwargs): val = fontsc.wxLocale_FindLanguageInfo(*_args,**_kwargs) if val: val = wxLanguageInfoPtr(val) diff --git a/wxPython/src/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index 21ba3ecad6..8bbbbbf30e 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/frames.cpp @@ -1431,7 +1431,7 @@ static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyO PyObject * _resultobj; wxToolBar * _result; wxFrame * _arg0; - long _arg1 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + long _arg1 = (long ) -1; wxWindowID _arg2 = (wxWindowID ) -1; wxString * _arg3 = (wxString *) &wxPyToolBarNameStr; PyObject * _argo0 = 0; @@ -1561,6 +1561,72 @@ static PyObject *_wrap_wxFrame_SendSizeEvent(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxFrame_DoMenuUpdates(_swigobj,_swigarg0) (_swigobj->DoMenuUpdates(_swigarg0)) +static PyObject *_wrap_wxFrame_DoMenuUpdates(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + wxMenu * _arg1 = (wxMenu *) NULL; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","menu", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxFrame_DoMenuUpdates",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_DoMenuUpdates. Expected _wxFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_DoMenuUpdates. Expected _wxMenu_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFrame_DoMenuUpdates(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_UpdateWindowUI(_swigobj,_swigarg0) (_swigobj->UpdateWindowUI(_swigarg0)) +static PyObject *_wrap_wxFrame_UpdateWindowUI(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + long _arg1 = (long ) wxUPDATE_UI_NONE; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxFrame_UpdateWindowUI",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_UpdateWindowUI. Expected _wxFrame_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFrame_UpdateWindowUI(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxDialogTowxTopLevelWindow(void *ptr) { wxDialog *src; wxTopLevelWindow *dest; @@ -2649,6 +2715,8 @@ static PyMethodDef framescMethods[] = { { "wxDialog_Create", (PyCFunction) _wrap_wxDialog_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreDialog", (PyCFunction) _wrap_new_wxPreDialog, METH_VARARGS | METH_KEYWORDS }, { "new_wxDialog", (PyCFunction) _wrap_new_wxDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_UpdateWindowUI", (PyCFunction) _wrap_wxFrame_UpdateWindowUI, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_DoMenuUpdates", (PyCFunction) _wrap_wxFrame_DoMenuUpdates, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SendSizeEvent", (PyCFunction) _wrap_wxFrame_SendSizeEvent, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetToolBar", (PyCFunction) _wrap_wxFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetToolBar", (PyCFunction) _wrap_wxFrame_GetToolBar, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/frames.py b/wxPython/src/gtk/frames.py index 77aa341cba..49c614d0c2 100644 --- a/wxPython/src/gtk/frames.py +++ b/wxPython/src/gtk/frames.py @@ -143,6 +143,12 @@ class wxFramePtr(wxTopLevelWindowPtr): def SendSizeEvent(self, *_args, **_kwargs): val = framesc.wxFrame_SendSizeEvent(self, *_args, **_kwargs) return val + def DoMenuUpdates(self, *_args, **_kwargs): + val = framesc.wxFrame_DoMenuUpdates(self, *_args, **_kwargs) + return val + def UpdateWindowUI(self, *_args, **_kwargs): + val = framesc.wxFrame_UpdateWindowUI(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) Command = ProcessCommand diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index ab027baaa3..7fe1bc45bc 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -61,6 +61,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include #include @@ -180,6 +181,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return icon; } + wxIcon* wxIconFromLocation(const wxIconLocation& loc) { + wxIcon* icon = new wxIcon(loc); + return icon; + } + wxCursor* wxPyStockCursor(int id) { return new wxCursor(id); } @@ -544,6 +550,39 @@ static PyObject *_wrap_wxIconFromBitmap(PyObject *self, PyObject *args, PyObject return _resultobj; } +static PyObject *_wrap_wxIconFromLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIcon * _result; + wxIconLocation * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "loc", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIconFromLocation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconFromLocation. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIcon *)wxIconFromLocation(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxCursor * _result; @@ -2532,6 +2571,251 @@ static PyObject *_wrap_wxIcon_CopyFromBitmap(PyObject *self, PyObject *args, PyO return _resultobj; } +static wxIconLocation *new_wxIconLocation(const wxString *filename,int num) { +#ifdef __WXMSW__ + return new wxIconLocation(*filename, num); +#else + return new wxIconLocation(*filename); +#endif + } + +static PyObject *_wrap_new_wxIconLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIconLocation * _result; + wxString * _arg0 = (wxString *) &wxPyEmptyString; + int _arg1 = (int ) 0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "filename","num", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:new_wxIconLocation",_kwnames,&_obj0,&_arg1)) + return NULL; + if (_obj0) +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIconLocation *)new_wxIconLocation(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIconLocation_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +#define delete_wxIconLocation(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxIconLocation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIconLocation * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxIconLocation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxIconLocation. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxIconLocation(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxIconLocation_IsOk(_swigobj) (_swigobj->IsOk()) +static PyObject *_wrap_wxIconLocation_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxIconLocation * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIconLocation_IsOk",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconLocation_IsOk. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxIconLocation_IsOk(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxIconLocation_SetFileName(_swigobj,_swigarg0) (_swigobj->SetFileName(_swigarg0)) +static PyObject *_wrap_wxIconLocation_SetFileName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIconLocation * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxIconLocation_SetFileName",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconLocation_SetFileName. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIconLocation_SetFileName(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxIconLocation_GetFileName(_swigobj) (_swigobj->GetFileName()) +static PyObject *_wrap_wxIconLocation_GetFileName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxIconLocation * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIconLocation_GetFileName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconLocation_GetFileName. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxString & _result_ref = wxIconLocation_GetFileName(_arg0); + _result = (wxString *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} + return _resultobj; +} + +static void wxIconLocation_SetIndex(wxIconLocation *self,int num) { +#ifdef __WXMSW__ + self->SetIndex(num); +#else + // do nothing +#endif + } +static PyObject *_wrap_wxIconLocation_SetIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxIconLocation * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","num", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIconLocation_SetIndex",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconLocation_SetIndex. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIconLocation_SetIndex(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static int wxIconLocation_GetIndex(wxIconLocation *self) { +#ifdef __WXMSW__ + return self->GetIndex(); +#else + return -1; +#endif + } +static PyObject *_wrap_wxIconLocation_GetIndex(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxIconLocation * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIconLocation_GetIndex",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIconLocation_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconLocation_GetIndex. Expected _wxIconLocation_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxIconLocation_GetIndex(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define new_wxIconBundle() (new wxIconBundle()) static PyObject *_wrap_new_wxIconBundle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8858,6 +9142,59 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static void *SwigwxMirrorDCTowxDC(void *ptr) { + wxMirrorDC *src; + wxDC *dest; + src = (wxMirrorDC *) ptr; + dest = (wxDC *) src; + return (void *) dest; +} + +static void *SwigwxMirrorDCTowxObject(void *ptr) { + wxMirrorDC *src; + wxObject *dest; + src = (wxMirrorDC *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxMirrorDC(_swigarg0,_swigarg1) (new wxMirrorDC(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxMirrorDC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMirrorDC * _result; + wxDC * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "dc","mirror", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:new_wxMirrorDC",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMirrorDC. Expected _wxDC_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMirrorDC *)new_wxMirrorDC(*_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMirrorDC_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxPaletteTowxGDIObject(void *ptr) { wxPalette *src; wxGDIObject *dest; @@ -10806,6 +11143,7 @@ static PyMethodDef gdicMethods[] = { { "wxPalette_GetPixel", (PyCFunction) _wrap_wxPalette_GetPixel, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPalette", (PyCFunction) _wrap_delete_wxPalette, METH_VARARGS | METH_KEYWORDS }, { "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS }, + { "new_wxMirrorDC", (PyCFunction) _wrap_new_wxMirrorDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxWindowDC", (PyCFunction) _wrap_new_wxWindowDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxPaintDC", (PyCFunction) _wrap_new_wxPaintDC, METH_VARARGS | METH_KEYWORDS }, { "new_wxClientDC", (PyCFunction) _wrap_new_wxClientDC, METH_VARARGS | METH_KEYWORDS }, @@ -10977,6 +11315,13 @@ static PyMethodDef gdicMethods[] = { { "new_wxIconBundleFromIcon", (PyCFunction) _wrap_new_wxIconBundleFromIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxIconBundleFromFile", (PyCFunction) _wrap_new_wxIconBundleFromFile, METH_VARARGS | METH_KEYWORDS }, { "new_wxIconBundle", (PyCFunction) _wrap_new_wxIconBundle, METH_VARARGS | METH_KEYWORDS }, + { "wxIconLocation_GetIndex", (PyCFunction) _wrap_wxIconLocation_GetIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxIconLocation_SetIndex", (PyCFunction) _wrap_wxIconLocation_SetIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxIconLocation_GetFileName", (PyCFunction) _wrap_wxIconLocation_GetFileName, METH_VARARGS | METH_KEYWORDS }, + { "wxIconLocation_SetFileName", (PyCFunction) _wrap_wxIconLocation_SetFileName, METH_VARARGS | METH_KEYWORDS }, + { "wxIconLocation_IsOk", (PyCFunction) _wrap_wxIconLocation_IsOk, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxIconLocation", (PyCFunction) _wrap_delete_wxIconLocation, METH_VARARGS | METH_KEYWORDS }, + { "new_wxIconLocation", (PyCFunction) _wrap_new_wxIconLocation, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_CopyFromBitmap", (PyCFunction) _wrap_wxIcon_CopyFromBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_SetDepth", (PyCFunction) _wrap_wxIcon_SetDepth, METH_VARARGS | METH_KEYWORDS }, { "wxIcon_SetHeight", (PyCFunction) _wrap_wxIcon_SetHeight, METH_VARARGS | METH_KEYWORDS }, @@ -11016,6 +11361,7 @@ static PyMethodDef gdicMethods[] = { { "wxCursorFromBits", (PyCFunction) _wrap_wxCursorFromBits, METH_VARARGS | METH_KEYWORDS }, { "wxCursorFromImage", (PyCFunction) _wrap_wxCursorFromImage, METH_VARARGS | METH_KEYWORDS }, { "wxStockCursor", (PyCFunction) _wrap_wxStockCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxIconFromLocation", (PyCFunction) _wrap_wxIconFromLocation, METH_VARARGS | METH_KEYWORDS }, { "wxIconFromBitmap", (PyCFunction) _wrap_wxIconFromBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxIconFromXPMData", (PyCFunction) _wrap_wxIconFromXPMData, METH_VARARGS | METH_KEYWORDS }, { "wxEmptyIcon", (PyCFunction) _wrap_wxEmptyIcon, METH_VARARGS | METH_KEYWORDS }, @@ -11055,6 +11401,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, { "_wxGDIObject","_wxIcon",SwigwxIconTowxGDIObject}, { "_wxGDIObject","_wxBitmap",SwigwxBitmapTowxGDIObject}, + { "_wxDC","_wxMirrorDC",SwigwxMirrorDCTowxDC}, { "_wxDC","_wxWindowDC",SwigwxWindowDCTowxDC}, { "_wxDC","_wxPaintDC",SwigwxPaintDCTowxDC}, { "_wxDC","_wxClientDC",SwigwxClientDCTowxDC}, @@ -11101,6 +11448,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxRegion",SwigwxRegionTowxObject}, { "_wxObject","_wxImageList",SwigwxImageListTowxObject}, { "_wxObject","_wxPalette",SwigwxPaletteTowxObject}, + { "_wxObject","_wxMirrorDC",SwigwxMirrorDCTowxObject}, { "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject}, { "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject}, { "_wxObject","_wxClientDC",SwigwxClientDCTowxObject}, diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 28fad488cd..ee17f74465 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -170,6 +170,41 @@ class wxIcon(wxIconPtr): +class wxIconLocationPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self, delfunc=gdic.delete_wxIconLocation): + if self.thisown == 1: + try: + delfunc(self) + except: + pass + def IsOk(self, *_args, **_kwargs): + val = gdic.wxIconLocation_IsOk(self, *_args, **_kwargs) + return val + def SetFileName(self, *_args, **_kwargs): + val = gdic.wxIconLocation_SetFileName(self, *_args, **_kwargs) + return val + def GetFileName(self, *_args, **_kwargs): + val = gdic.wxIconLocation_GetFileName(self, *_args, **_kwargs) + return val + def SetIndex(self, *_args, **_kwargs): + val = gdic.wxIconLocation_SetIndex(self, *_args, **_kwargs) + return val + def GetIndex(self, *_args, **_kwargs): + val = gdic.wxIconLocation_GetIndex(self, *_args, **_kwargs) + return val + def __repr__(self): + return "<%s.%s instance; proxy of C++ wxIconLocation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) +class wxIconLocation(wxIconLocationPtr): + def __init__(self,*_args,**_kwargs): + self.this = gdic.new_wxIconLocation(*_args,**_kwargs) + self.thisown = 1 + + + + class wxIconBundlePtr : def __init__(self,this): self.this = this @@ -1034,6 +1069,20 @@ class wxWindowDC(wxWindowDCPtr): +class wxMirrorDCPtr(wxDCPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "<%s.%s instance; proxy of C++ wxMirrorDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) +class wxMirrorDC(wxMirrorDCPtr): + def __init__(self,*_args,**_kwargs): + self.this = gdic.new_wxMirrorDC(*_args,**_kwargs) + self.thisown = 1 + + + + class wxPalettePtr(wxGDIObjectPtr): def __init__(self,this): self.this = this @@ -1304,6 +1353,11 @@ def wxIconFromBitmap(*_args, **_kwargs): if val: val = wxIconPtr(val); val.thisown = 1 return val +def wxIconFromLocation(*_args, **_kwargs): + val = gdic.wxIconFromLocation(*_args,**_kwargs) + if val: val = wxIconPtr(val); val.thisown = 1 + return val + def wxStockCursor(*_args, **_kwargs): val = gdic.wxStockCursor(*_args,**_kwargs) if val: val = wxCursorPtr(val); val.thisown = 1 diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index 7579600d8a..6cf177c7a1 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -3855,13 +3855,13 @@ static PyObject *_wrap_wxGridCellAttr_SetSize(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxGridCellAttr_SetOverflow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGridCellAttr * _arg0; - bool _arg1; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - int tempbool1; + int tempbool1 = (int) TRUE; char *_kwnames[] = { "self","allow", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGridCellAttr_SetOverflow",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxGridCellAttr_SetOverflow",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4212,6 +4212,34 @@ static PyObject *_wrap_wxGridCellAttr_HasReadWriteMode(PyObject *self, PyObject return _resultobj; } +#define wxGridCellAttr_HasOverflowMode(_swigobj) (_swigobj->HasOverflowMode()) +static PyObject *_wrap_wxGridCellAttr_HasOverflowMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxGridCellAttr * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_HasOverflowMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr_HasOverflowMode. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGridCellAttr_HasOverflowMode(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxGridCellAttr_GetTextColour(_swigobj) (_swigobj->GetTextColour()) static PyObject *_wrap_wxGridCellAttr_GetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -15391,6 +15419,7 @@ static PyMethodDef gridcMethods[] = { { "wxGridCellAttr_GetFont", (PyCFunction) _wrap_wxGridCellAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_GetBackgroundColour", (PyCFunction) _wrap_wxGridCellAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_GetTextColour", (PyCFunction) _wrap_wxGridCellAttr_GetTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellAttr_HasOverflowMode", (PyCFunction) _wrap_wxGridCellAttr_HasOverflowMode, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasReadWriteMode", (PyCFunction) _wrap_wxGridCellAttr_HasReadWriteMode, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasEditor", (PyCFunction) _wrap_wxGridCellAttr_HasEditor, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellAttr_HasRenderer", (PyCFunction) _wrap_wxGridCellAttr_HasRenderer, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index f8c13b6eab..54009717e2 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -566,6 +566,9 @@ class wxGridCellAttrPtr : def HasReadWriteMode(self, *_args, **_kwargs): val = gridc.wxGridCellAttr_HasReadWriteMode(self, *_args, **_kwargs) return val + def HasOverflowMode(self, *_args, **_kwargs): + val = gridc.wxGridCellAttr_HasOverflowMode(self, *_args, **_kwargs) + return val def GetTextColour(self, *_args, **_kwargs): val = gridc.wxGridCellAttr_GetTextColour(self, *_args, **_kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index 74e8f55956..7d11eae638 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -249,7 +249,7 @@ public: wxPyHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxHW_SCROLLBAR_AUTO, + long style = wxHW_DEFAULT_STYLE, const wxString& name = wxPyHtmlWindowNameStr) : wxHtmlWindow(parent, id, pos, size, style, name) {}; wxPyHtmlWindow() : wxHtmlWindow() {}; @@ -4086,6 +4086,99 @@ static PyObject *_wrap_wxHtmlCell_GetParent(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxHtmlCell_GetFirstChild(_swigobj) (_swigobj->GetFirstChild()) +static PyObject *_wrap_wxHtmlCell_GetFirstChild(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetFirstChild",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetFirstChild. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxHtmlCell *)wxHtmlCell_GetFirstChild(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetCursor(_swigobj) (_swigobj->GetCursor()) +static PyObject *_wrap_wxHtmlCell_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetCursor",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetCursor. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxCursor (wxHtmlCell_GetCursor(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxHtmlCell_IsFormattingCell(_swigobj) (_swigobj->IsFormattingCell()) +static PyObject *_wrap_wxHtmlCell_IsFormattingCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_IsFormattingCell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_IsFormattingCell. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxHtmlCell_IsFormattingCell(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxHtmlCell_SetLink(_swigobj,_swigarg0) (_swigobj->SetLink(_swigarg0)) static PyObject *_wrap_wxHtmlCell_SetLink(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4465,6 +4558,311 @@ static PyObject *_wrap_wxHtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject return _resultobj; } +#define wxHtmlCell_IsLinebreakAllowed(_swigobj) (_swigobj->IsLinebreakAllowed()) +static PyObject *_wrap_wxHtmlCell_IsLinebreakAllowed(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_IsLinebreakAllowed",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_IsLinebreakAllowed. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxHtmlCell_IsLinebreakAllowed(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_IsTerminalCell(_swigobj) (_swigobj->IsTerminalCell()) +static PyObject *_wrap_wxHtmlCell_IsTerminalCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_IsTerminalCell",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_IsTerminalCell. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxHtmlCell_IsTerminalCell(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_FindCellByPos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->FindCellByPos(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxHtmlCell_FindCellByPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlCell * _arg0; + wxCoord _arg1; + wxCoord _arg2; + unsigned _arg3 = (unsigned ) (wxHTML_FIND_EXACT); + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","flags", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|i:wxHtmlCell_FindCellByPos",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_FindCellByPos. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxHtmlCell *)wxHtmlCell_FindCellByPos(_arg0,_arg1,_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetAbsPos(_swigobj) (_swigobj->GetAbsPos()) +static PyObject *_wrap_wxHtmlCell_GetAbsPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetAbsPos",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetAbsPos. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPoint (wxHtmlCell_GetAbsPos(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxHtmlCell_GetFirstTerminal(_swigobj) (_swigobj->GetFirstTerminal()) +static PyObject *_wrap_wxHtmlCell_GetFirstTerminal(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetFirstTerminal",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetFirstTerminal. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxHtmlCell *)wxHtmlCell_GetFirstTerminal(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetLastTerminal(_swigobj) (_swigobj->GetLastTerminal()) +static PyObject *_wrap_wxHtmlCell_GetLastTerminal(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlCell * _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetLastTerminal",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetLastTerminal. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxHtmlCell *)wxHtmlCell_GetLastTerminal(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxHtmlCell_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlCell_GetDepth(_swigobj) (_swigobj->GetDepth()) +static PyObject *_wrap_wxHtmlCell_GetDepth(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned _result; + wxHtmlCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlCell_GetDepth",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_GetDepth. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (unsigned )wxHtmlCell_GetDepth(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_IsBefore(_swigobj,_swigarg0) (_swigobj->IsBefore(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_IsBefore(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxHtmlCell * _arg0; + wxHtmlCell * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","cell", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlCell_IsBefore",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_IsBefore. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_IsBefore. Expected _wxHtmlCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxHtmlCell_IsBefore(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxHtmlCell_ConvertToText(_swigobj,_swigarg0) (_swigobj->ConvertToText(_swigarg0)) +static PyObject *_wrap_wxHtmlCell_ConvertToText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxHtmlCell * _arg0; + wxHtmlSelection * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sel", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlCell_ConvertToText",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlCell_ConvertToText. Expected _wxHtmlCell_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlSelection_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_ConvertToText. Expected _wxHtmlSelection_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxHtmlCell_ConvertToText(_arg0,_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + static void *SwigwxHtmlWordCellTowxHtmlCell(void *ptr) { wxHtmlWordCell *src; wxHtmlCell *dest; @@ -5368,7 +5766,7 @@ static PyObject *_wrap_new_wxHtmlWindow(PyObject *self, PyObject *args, PyObject int _arg1 = (int ) -1; wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; - int _arg4 = (int ) (wxHW_SCROLLBAR_AUTO); + int _arg4 = (int ) (wxHW_DEFAULT_STYLE); wxString * _arg5 = (wxString *) &wxPyHtmlWindowNameStr; PyObject * _argo0 = 0; wxPoint temp; @@ -6882,7 +7280,7 @@ static PyObject *_wrap_wxHtmlDCRenderer_SetFonts(PyObject *self, PyObject *args, return _resultobj; } -#define wxHtmlDCRenderer_Render(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Render(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +#define wxHtmlDCRenderer_Render(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Render(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_wxHtmlDCRenderer_Render(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; @@ -6891,11 +7289,15 @@ static PyObject *_wrap_wxHtmlDCRenderer_Render(PyObject *self, PyObject *args, P int _arg2; int _arg3 = (int ) 0; int _arg4 = (int ) FALSE; + int _arg5 = (int ) INT_MAX; + int * _arg6 = (int *) NULL; + int _arg7 = (int ) 0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","from","dont_render", NULL }; + PyObject * _obj6 = 0; + char *_kwnames[] = { "self","x","y","from","dont_render","to","choices", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|ii:wxHtmlDCRenderer_Render",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|iiiO:wxHtmlDCRenderer_Render",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6904,13 +7306,31 @@ static PyObject *_wrap_wxHtmlDCRenderer_Render(PyObject *self, PyObject *args, P return NULL; } } + if (_obj6) +{ + _arg6 = int_LIST_helper(_obj6); + if (_arg6 == NULL) { + return NULL; + } +} +{ + if (_obj6) { + _arg7 = PyList_Size(_obj6); + } + else { + _arg7 = 0; + } +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (int )wxHtmlDCRenderer_Render(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + delete [] _arg6; +} return _resultobj; } @@ -7264,6 +7684,51 @@ static PyObject *_wrap_wxHtmlPrintout_SetMargins(PyObject *self, PyObject *args, return _resultobj; } +static PyObject *_wrap_wxHtmlPrintout_AddFilter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlFilter * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "filter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlPrintout_AddFilter",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlFilter_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlPrintout_AddFilter. Expected _wxHtmlFilter_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxHtmlPrintout::AddFilter(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxHtmlPrintout_CleanUpStatics(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxHtmlPrintout_CleanUpStatics",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxHtmlPrintout::CleanUpStatics(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxHtmlEasyPrintingTowxObject(void *ptr) { wxHtmlEasyPrinting *src; wxObject *dest; @@ -7277,10 +7742,10 @@ static PyObject *_wrap_new_wxHtmlEasyPrinting(PyObject *self, PyObject *args, Py PyObject * _resultobj; wxHtmlEasyPrinting * _result; wxString * _arg0 = (wxString *) &wxPyHtmlPrintingTitleStr; - wxFrame * _arg1 = (wxFrame *) NULL; + wxWindow * _arg1 = (wxWindow *) NULL; PyObject * _obj0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "name","parent_frame", NULL }; + char *_kwnames[] = { "name","parentWindow", NULL }; char _ptemp[128]; self = self; @@ -7294,8 +7759,8 @@ static PyObject *_wrap_new_wxHtmlEasyPrinting(PyObject *self, PyObject *args, Py } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxHtmlEasyPrinting. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxHtmlEasyPrinting. Expected _wxWindow_p."); return NULL; } } @@ -7809,6 +8274,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlEasyPrinting_PreviewFile", (PyCFunction) _wrap_wxHtmlEasyPrinting_PreviewFile, METH_VARARGS | METH_KEYWORDS }, { "delete_wxHtmlEasyPrinting", (PyCFunction) _wrap_delete_wxHtmlEasyPrinting, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlEasyPrinting", (PyCFunction) _wrap_new_wxHtmlEasyPrinting, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_CleanUpStatics", (PyCFunction) _wrap_wxHtmlPrintout_CleanUpStatics, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlPrintout_AddFilter", (PyCFunction) _wrap_wxHtmlPrintout_AddFilter, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlPrintout_SetMargins", (PyCFunction) _wrap_wxHtmlPrintout_SetMargins, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlPrintout_SetFonts", (PyCFunction) _wrap_wxHtmlPrintout_SetFonts, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlPrintout_SetFooter", (PyCFunction) _wrap_wxHtmlPrintout_SetFooter, METH_VARARGS | METH_KEYWORDS }, @@ -7880,6 +8347,15 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlContainerCell_InsertCell", (PyCFunction) _wrap_wxHtmlContainerCell_InsertCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlContainerCell", (PyCFunction) _wrap_new_wxHtmlContainerCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWordCell", (PyCFunction) _wrap_new_wxHtmlWordCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_ConvertToText", (PyCFunction) _wrap_wxHtmlCell_ConvertToText, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_IsBefore", (PyCFunction) _wrap_wxHtmlCell_IsBefore, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetDepth", (PyCFunction) _wrap_wxHtmlCell_GetDepth, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetLastTerminal", (PyCFunction) _wrap_wxHtmlCell_GetLastTerminal, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetFirstTerminal", (PyCFunction) _wrap_wxHtmlCell_GetFirstTerminal, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetAbsPos", (PyCFunction) _wrap_wxHtmlCell_GetAbsPos, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_FindCellByPos", (PyCFunction) _wrap_wxHtmlCell_FindCellByPos, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_IsTerminalCell", (PyCFunction) _wrap_wxHtmlCell_IsTerminalCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_IsLinebreakAllowed", (PyCFunction) _wrap_wxHtmlCell_IsLinebreakAllowed, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_SetCanLiveOnPagebreak", (PyCFunction) _wrap_wxHtmlCell_SetCanLiveOnPagebreak, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_AdjustPagebreak", (PyCFunction) _wrap_wxHtmlCell_AdjustPagebreak, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_Find", (PyCFunction) _wrap_wxHtmlCell_Find, METH_VARARGS | METH_KEYWORDS }, @@ -7890,6 +8366,9 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlCell_SetParent", (PyCFunction) _wrap_wxHtmlCell_SetParent, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_SetNext", (PyCFunction) _wrap_wxHtmlCell_SetNext, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_SetLink", (PyCFunction) _wrap_wxHtmlCell_SetLink, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_IsFormattingCell", (PyCFunction) _wrap_wxHtmlCell_IsFormattingCell, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetCursor", (PyCFunction) _wrap_wxHtmlCell_GetCursor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlCell_GetFirstChild", (PyCFunction) _wrap_wxHtmlCell_GetFirstChild, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_GetParent", (PyCFunction) _wrap_wxHtmlCell_GetParent, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_GetNext", (PyCFunction) _wrap_wxHtmlCell_GetNext, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlCell_GetLink", (PyCFunction) _wrap_wxHtmlCell_GetLink, METH_VARARGS | METH_KEYWORDS }, @@ -8170,6 +8649,8 @@ SWIGEXPORT(void) inithtmlc() { PyDict_SetItemString(d,"wxHTML_COND_USER", PyInt_FromLong((long) wxHTML_COND_USER)); PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER)); PyDict_SetItemString(d,"wxHW_SCROLLBAR_AUTO", PyInt_FromLong((long) wxHW_SCROLLBAR_AUTO)); + PyDict_SetItemString(d,"wxHW_NO_SELECTION", PyInt_FromLong((long) wxHW_NO_SELECTION)); + PyDict_SetItemString(d,"wxHW_DEFAULT_STYLE", PyInt_FromLong((long) wxHW_DEFAULT_STYLE)); PyDict_SetItemString(d,"wxHTML_OPEN", PyInt_FromLong((long) wxHTML_OPEN)); PyDict_SetItemString(d,"wxHTML_BLOCK", PyInt_FromLong((long) wxHTML_BLOCK)); PyDict_SetItemString(d,"wxHTML_REDIRECT", PyInt_FromLong((long) wxHTML_REDIRECT)); @@ -8179,6 +8660,9 @@ SWIGEXPORT(void) inithtmlc() { PyDict_SetItemString(d,"wxHTML_SEL_OUT", PyInt_FromLong((long) wxHTML_SEL_OUT)); PyDict_SetItemString(d,"wxHTML_SEL_IN", PyInt_FromLong((long) wxHTML_SEL_IN)); PyDict_SetItemString(d,"wxHTML_SEL_CHANGING", PyInt_FromLong((long) wxHTML_SEL_CHANGING)); + PyDict_SetItemString(d,"wxHTML_FIND_EXACT", PyInt_FromLong((long) wxHTML_FIND_EXACT)); + PyDict_SetItemString(d,"wxHTML_FIND_NEAREST_BEFORE", PyInt_FromLong((long) wxHTML_FIND_NEAREST_BEFORE)); + PyDict_SetItemString(d,"wxHTML_FIND_NEAREST_AFTER", PyInt_FromLong((long) wxHTML_FIND_NEAREST_AFTER)); PyDict_SetItemString(d,"wxPAGE_ODD", PyInt_FromLong((long) wxPAGE_ODD)); PyDict_SetItemString(d,"wxPAGE_EVEN", PyInt_FromLong((long) wxPAGE_EVEN)); PyDict_SetItemString(d,"wxPAGE_ALL", PyInt_FromLong((long) wxPAGE_ALL)); diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index 7491e86399..a846e9e5b1 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -537,6 +537,17 @@ class wxHtmlCellPtr(wxObjectPtr): val = htmlc.wxHtmlCell_GetParent(self, *_args, **_kwargs) if val: val = wxHtmlContainerCellPtr(val) return val + def GetFirstChild(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_GetFirstChild(self, *_args, **_kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def GetCursor(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_GetCursor(self, *_args, **_kwargs) + if val: val = wxCursorPtr(val) ; val.thisown = 1 + return val + def IsFormattingCell(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_IsFormattingCell(self, *_args, **_kwargs) + return val def SetLink(self, *_args, **_kwargs): val = htmlc.wxHtmlCell_SetLink(self, *_args, **_kwargs) return val @@ -568,6 +579,37 @@ class wxHtmlCellPtr(wxObjectPtr): def SetCanLiveOnPagebreak(self, *_args, **_kwargs): val = htmlc.wxHtmlCell_SetCanLiveOnPagebreak(self, *_args, **_kwargs) return val + def IsLinebreakAllowed(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_IsLinebreakAllowed(self, *_args, **_kwargs) + return val + def IsTerminalCell(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_IsTerminalCell(self, *_args, **_kwargs) + return val + def FindCellByPos(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_FindCellByPos(self, *_args, **_kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def GetAbsPos(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_GetAbsPos(self, *_args, **_kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 + return val + def GetFirstTerminal(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_GetFirstTerminal(self, *_args, **_kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def GetLastTerminal(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_GetLastTerminal(self, *_args, **_kwargs) + if val: val = wxHtmlCellPtr(val) + return val + def GetDepth(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_GetDepth(self, *_args, **_kwargs) + return val + def IsBefore(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_IsBefore(self, *_args, **_kwargs) + return val + def ConvertToText(self, *_args, **_kwargs): + val = htmlc.wxHtmlCell_ConvertToText(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxHtmlCell instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlCell(wxHtmlCellPtr): @@ -964,6 +1006,10 @@ wxHtmlWinParser_AddTagHandler = htmlc.wxHtmlWinParser_AddTagHandler wxHtmlWindow_AddFilter = htmlc.wxHtmlWindow_AddFilter +wxHtmlPrintout_AddFilter = htmlc.wxHtmlPrintout_AddFilter + +wxHtmlPrintout_CleanUpStatics = htmlc.wxHtmlPrintout_CleanUpStatics + #-------------- VARIABLE WRAPPERS ------------------ @@ -989,6 +1035,8 @@ wxHTML_COND_ISIMAGEMAP = htmlc.wxHTML_COND_ISIMAGEMAP wxHTML_COND_USER = htmlc.wxHTML_COND_USER wxHW_SCROLLBAR_NEVER = htmlc.wxHW_SCROLLBAR_NEVER wxHW_SCROLLBAR_AUTO = htmlc.wxHW_SCROLLBAR_AUTO +wxHW_NO_SELECTION = htmlc.wxHW_NO_SELECTION +wxHW_DEFAULT_STYLE = htmlc.wxHW_DEFAULT_STYLE wxHTML_OPEN = htmlc.wxHTML_OPEN wxHTML_BLOCK = htmlc.wxHTML_BLOCK wxHTML_REDIRECT = htmlc.wxHTML_REDIRECT @@ -998,6 +1046,9 @@ wxHTML_URL_OTHER = htmlc.wxHTML_URL_OTHER wxHTML_SEL_OUT = htmlc.wxHTML_SEL_OUT wxHTML_SEL_IN = htmlc.wxHTML_SEL_IN wxHTML_SEL_CHANGING = htmlc.wxHTML_SEL_CHANGING +wxHTML_FIND_EXACT = htmlc.wxHTML_FIND_EXACT +wxHTML_FIND_NEAREST_BEFORE = htmlc.wxHTML_FIND_NEAREST_BEFORE +wxHTML_FIND_NEAREST_AFTER = htmlc.wxHTML_FIND_NEAREST_AFTER wxPAGE_ODD = htmlc.wxPAGE_ODD wxPAGE_EVEN = htmlc.wxPAGE_EVEN wxPAGE_ALL = htmlc.wxPAGE_ALL diff --git a/wxPython/src/gtk/image.cpp b/wxPython/src/gtk/image.cpp index b2c1017398..2e2978fb66 100644 --- a/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/image.cpp @@ -85,11 +85,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } - wxImage* wxEmptyImage(int width=0, int height=0) { - if (width == 0 && height == 0) - return new wxImage; + wxImage* wxEmptyImage(int width=0, int height=0, bool clear = TRUE) { + if (width > 0 && height > 0) + return new wxImage(width, height, clear); else - return new wxImage(width, height); + return new wxImage; } @@ -143,15 +143,18 @@ static PyObject *_wrap_wxEmptyImage(PyObject *self, PyObject *args, PyObject *kw wxImage * _result; int _arg0 = (int ) 0; int _arg1 = (int ) 0; - char *_kwnames[] = { "width","height", NULL }; + bool _arg2 = (bool ) TRUE; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "width","height","clear", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:wxEmptyImage",_kwnames,&_arg0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:wxEmptyImage",_kwnames,&_arg0,&_arg1,&tempbool2)) return NULL; + _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImage *)wxEmptyImage(_arg0,_arg1); + _result = (wxImage *)wxEmptyImage(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3536,6 +3539,33 @@ static PyObject *_wrap_wxImage_RemoveHandler(PyObject *self, PyObject *args, PyO return _resultobj; } +static PyObject *_wrap_wxImage_GetImageExtWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxImage_GetImageExtWildcard",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxImage::GetImageExtWildcard()); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + static wxBitmap wxImage_ConvertToBitmap(wxImage *self) { wxBitmap bitmap(*self); return bitmap; @@ -3609,6 +3639,7 @@ static PyObject *_wrap_wxImage_ConvertToMonoBitmap(PyObject *self, PyObject *arg static PyMethodDef imagecMethods[] = { { "wxImage_ConvertToMonoBitmap", (PyCFunction) _wrap_wxImage_ConvertToMonoBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxImage_ConvertToBitmap", (PyCFunction) _wrap_wxImage_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_GetImageExtWildcard", (PyCFunction) _wrap_wxImage_GetImageExtWildcard, METH_VARARGS | METH_KEYWORDS }, { "wxImage_RemoveHandler", (PyCFunction) _wrap_wxImage_RemoveHandler, METH_VARARGS | METH_KEYWORDS }, { "wxImage_InsertHandler", (PyCFunction) _wrap_wxImage_InsertHandler, METH_VARARGS | METH_KEYWORDS }, { "wxImage_AddHandler", (PyCFunction) _wrap_wxImage_AddHandler, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/image.py b/wxPython/src/gtk/image.py index 1aecd98a17..26849e2e6a 100644 --- a/wxPython/src/gtk/image.py +++ b/wxPython/src/gtk/image.py @@ -454,6 +454,8 @@ wxImage_InsertHandler = imagec.wxImage_InsertHandler wxImage_RemoveHandler = imagec.wxImage_RemoveHandler +wxImage_GetImageExtWildcard = imagec.wxImage_GetImageExtWildcard + #-------------- VARIABLE WRAPPERS ------------------ diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 644f446caa..90f52d9ca5 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -1313,6 +1313,76 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxSize_IncTo(_swigobj,_swigarg0) (_swigobj->IncTo(_swigarg0)) +static PyObject *_wrap_wxSize_IncTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _arg0; + wxSize * _arg1; + wxSize temp; + PyObject * _obj0 = 0; + wxSize temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","sz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSize_IncTo",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxSize_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSize_IncTo(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSize_DecTo(_swigobj,_swigarg0) (_swigobj->DecTo(_swigarg0)) +static PyObject *_wrap_wxSize_DecTo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _arg0; + wxSize * _arg1; + wxSize temp; + PyObject * _obj0 = 0; + wxSize temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","sz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSize_DecTo",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxSize_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSize_DecTo(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject * wxSize_asTuple(wxSize *self) { wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); @@ -5494,6 +5564,8 @@ static PyMethodDef misccMethods[] = { { "wxSize___ne__", (PyCFunction) _wrap_wxSize___ne__, METH_VARARGS | METH_KEYWORDS }, { "wxSize___eq__", (PyCFunction) _wrap_wxSize___eq__, METH_VARARGS | METH_KEYWORDS }, { "wxSize_asTuple", (PyCFunction) _wrap_wxSize_asTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxSize_DecTo", (PyCFunction) _wrap_wxSize_DecTo, METH_VARARGS | METH_KEYWORDS }, + { "wxSize_IncTo", (PyCFunction) _wrap_wxSize_IncTo, METH_VARARGS | METH_KEYWORDS }, { "wxSize_SetHeight", (PyCFunction) _wrap_wxSize_SetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxSize_SetWidth", (PyCFunction) _wrap_wxSize_SetWidth, METH_VARARGS | METH_KEYWORDS }, { "wxSize_GetHeight", (PyCFunction) _wrap_wxSize_GetHeight, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py index 747c3ff1c2..6cd20abb5c 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -50,6 +50,12 @@ class wxSizePtr : def SetHeight(self, *_args, **_kwargs): val = miscc.wxSize_SetHeight(self, *_args, **_kwargs) return val + def IncTo(self, *_args, **_kwargs): + val = miscc.wxSize_IncTo(self, *_args, **_kwargs) + return val + def DecTo(self, *_args, **_kwargs): + val = miscc.wxSize_DecTo(self, *_args, **_kwargs) + return val def asTuple(self, *_args, **_kwargs): val = miscc.wxSize_asTuple(self, *_args, **_kwargs) return val diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index c22bea9bfd..0fe5eff4fe 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -72,6 +72,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include static PyObject* t_output_helper(PyObject* target, PyObject* o) { @@ -2400,6 +2401,206 @@ static PyObject *_wrap_wxSystemSettings_SetScreenType(PyObject *self, PyObject * return _resultobj; } +static void *SwigwxSystemOptionsTowxObject(void *ptr) { + wxSystemOptions *src; + wxObject *dest; + src = (wxSystemOptions *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxSystemOptions() (new wxSystemOptions()) +static PyObject *_wrap_new_wxSystemOptions(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSystemOptions * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxSystemOptions",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSystemOptions *)new_wxSystemOptions(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSystemOptions_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static PyObject *_wrap_wxSystemOptions_SetOption(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + wxString * _arg1; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "name","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSystemOptions_SetOption",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSystemOptions::SetOption(*_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +static PyObject *_wrap_wxSystemOptions_SetOptionInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + int _arg1; + PyObject * _obj0 = 0; + char *_kwnames[] = { "name","value", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSystemOptions_SetOptionInt",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSystemOptions::SetOption(*_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxSystemOptions_GetOption(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSystemOptions_GetOption",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxSystemOptions::GetOption(*_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + if (_obj0) + delete _arg0; +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxSystemOptions_GetOptionInt(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSystemOptions_GetOptionInt",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSystemOptions::GetOptionInt(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + +static PyObject *_wrap_wxSystemOptions_HasOption(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSystemOptions_HasOption",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSystemOptions::HasOption(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static void *SwigwxToolTipTowxObject(void *ptr) { wxToolTip *src; wxObject *dest; @@ -11256,6 +11457,12 @@ 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 }, + { "wxSystemOptions_HasOption", (PyCFunction) _wrap_wxSystemOptions_HasOption, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemOptions_GetOptionInt", (PyCFunction) _wrap_wxSystemOptions_GetOptionInt, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemOptions_GetOption", (PyCFunction) _wrap_wxSystemOptions_GetOption, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemOptions_SetOptionInt", (PyCFunction) _wrap_wxSystemOptions_SetOptionInt, METH_VARARGS | METH_KEYWORDS }, + { "wxSystemOptions_SetOption", (PyCFunction) _wrap_wxSystemOptions_SetOption, METH_VARARGS | METH_KEYWORDS }, + { "new_wxSystemOptions", (PyCFunction) _wrap_new_wxSystemOptions, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_SetScreenType", (PyCFunction) _wrap_wxSystemSettings_SetScreenType, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_GetScreenType", (PyCFunction) _wrap_wxSystemSettings_GetScreenType, METH_VARARGS | METH_KEYWORDS }, { "wxSystemSettings_HasFeature", (PyCFunction) _wrap_wxSystemSettings_HasFeature, METH_VARARGS | METH_KEYWORDS }, @@ -11391,6 +11598,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxPyTimer",SwigwxPyTimerTowxObject}, { "_wxObject","_wxGenericDragImage",SwigwxGenericDragImageTowxObject}, { "_wxObject","_wxToolTip",SwigwxToolTipTowxObject}, + { "_wxObject","_wxSystemOptions",SwigwxSystemOptionsTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, { "_unsigned_char","_byte",0}, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index 7b26ea4b0f..828e615b42 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -72,6 +72,20 @@ class wxSystemSettings(wxSystemSettingsPtr): +class wxSystemOptionsPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "<%s.%s instance; proxy of C++ wxSystemOptions instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) +class wxSystemOptions(wxSystemOptionsPtr): + def __init__(self,*_args,**_kwargs): + self.this = misc2c.new_wxSystemOptions(*_args,**_kwargs) + self.thisown = 1 + + + + class wxToolTipPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -1311,6 +1325,16 @@ wxSystemSettings_GetScreenType = misc2c.wxSystemSettings_GetScreenType wxSystemSettings_SetScreenType = misc2c.wxSystemSettings_SetScreenType +wxSystemOptions_SetOption = misc2c.wxSystemOptions_SetOption + +wxSystemOptions_SetOptionInt = misc2c.wxSystemOptions_SetOptionInt + +wxSystemOptions_GetOption = misc2c.wxSystemOptions_GetOption + +wxSystemOptions_GetOptionInt = misc2c.wxSystemOptions_GetOptionInt + +wxSystemOptions_HasOption = misc2c.wxSystemOptions_HasOption + wxToolTip_Enable = misc2c.wxToolTip_Enable wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index fe2caa0657..993690dc9d 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -2290,6 +2290,35 @@ static PyObject *_wrap_wxToolBarBase_SetToolClientData(PyObject *self, PyObject return _resultobj; } +#define wxToolBarBase_GetToolPos(_swigobj,_swigarg0) (_swigobj->GetToolPos(_swigarg0)) +static PyObject *_wrap_wxToolBarBase_GetToolPos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxToolBarBase * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxToolBarBase_GetToolPos",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_GetToolPos. Expected _wxToolBarBase_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxToolBarBase_GetToolPos(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxToolBarBase_GetToolState(_swigobj,_swigarg0) (_swigobj->GetToolState(_swigarg0)) static PyObject *_wrap_wxToolBarBase_GetToolState(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3061,7 +3090,7 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k wxWindowID _arg1; wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; - long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + long _arg4 = (long ) wxNO_BORDER|(wxTB_HORIZONTAL); wxString * _arg5 = (wxString *) &wxPyToolBarNameStr; PyObject * _argo0 = 0; wxPoint temp; @@ -3155,7 +3184,7 @@ static PyObject *_wrap_wxToolBar_Create(PyObject *self, PyObject *args, PyObject wxWindowID _arg2; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; - long _arg5 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + long _arg5 = (long ) wxNO_BORDER|(wxTB_HORIZONTAL); wxString * _arg6 = (wxString *) &wxPyToolBarNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3293,7 +3322,7 @@ static PyObject *_wrap_new_wxToolBarSimple(PyObject *self, PyObject *args, PyObj wxWindowID _arg1; wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; - long _arg4 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + long _arg4 = (long ) wxNO_BORDER|(wxTB_HORIZONTAL); wxString * _arg5 = (wxString *) &wxPyToolBarNameStr; PyObject * _argo0 = 0; wxPoint temp; @@ -3387,7 +3416,7 @@ static PyObject *_wrap_wxToolBarSimple_Create(PyObject *self, PyObject *args, Py wxWindowID _arg2; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; - long _arg5 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + long _arg5 = (long ) wxNO_BORDER|(wxTB_HORIZONTAL); wxString * _arg6 = (wxString *) &wxPyToolBarNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -3509,6 +3538,7 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBarBase_SetToolShortHelp", (PyCFunction) _wrap_wxToolBarBase_SetToolShortHelp, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolEnabled", (PyCFunction) _wrap_wxToolBarBase_GetToolEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolState", (PyCFunction) _wrap_wxToolBarBase_GetToolState, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarBase_GetToolPos", (PyCFunction) _wrap_wxToolBarBase_GetToolPos, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_SetToolClientData", (PyCFunction) _wrap_wxToolBarBase_SetToolClientData, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolClientData", (PyCFunction) _wrap_wxToolBarBase_GetToolClientData, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_SetToggle", (PyCFunction) _wrap_wxToolBarBase_SetToggle, METH_VARARGS | METH_KEYWORDS }, @@ -3705,6 +3735,17 @@ SWIGEXPORT(void) initstattoolc() { PyDict_SetItemString(d,"wxTOOL_STYLE_BUTTON", PyInt_FromLong((long) wxTOOL_STYLE_BUTTON)); PyDict_SetItemString(d,"wxTOOL_STYLE_SEPARATOR", PyInt_FromLong((long) wxTOOL_STYLE_SEPARATOR)); PyDict_SetItemString(d,"wxTOOL_STYLE_CONTROL", PyInt_FromLong((long) wxTOOL_STYLE_CONTROL)); + PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL)); + PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL)); + PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS)); + PyDict_SetItemString(d,"wxTB_FLAT", PyInt_FromLong((long) wxTB_FLAT)); + PyDict_SetItemString(d,"wxTB_DOCKABLE", PyInt_FromLong((long) wxTB_DOCKABLE)); + PyDict_SetItemString(d,"wxTB_NOICONS", PyInt_FromLong((long) wxTB_NOICONS)); + PyDict_SetItemString(d,"wxTB_TEXT", PyInt_FromLong((long) wxTB_TEXT)); + PyDict_SetItemString(d,"wxTB_NODIVIDER", PyInt_FromLong((long) wxTB_NODIVIDER)); + PyDict_SetItemString(d,"wxTB_NOALIGN", PyInt_FromLong((long) wxTB_NOALIGN)); + PyDict_SetItemString(d,"wxTB_HORZ_LAYOUT", PyInt_FromLong((long) wxTB_HORZ_LAYOUT)); + PyDict_SetItemString(d,"wxTB_HORZ_TEXT", PyInt_FromLong((long) wxTB_HORZ_TEXT)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/stattool.py b/wxPython/src/gtk/stattool.py index 78a95dbfcd..6468b06517 100644 --- a/wxPython/src/gtk/stattool.py +++ b/wxPython/src/gtk/stattool.py @@ -241,6 +241,9 @@ class wxToolBarBasePtr(wxControlPtr): def SetToolClientData(self, *_args, **_kwargs): val = stattoolc.wxToolBarBase_SetToolClientData(self, *_args, **_kwargs) return val + def GetToolPos(self, *_args, **_kwargs): + val = stattoolc.wxToolBarBase_GetToolPos(self, *_args, **_kwargs) + return val def GetToolState(self, *_args, **_kwargs): val = stattoolc.wxToolBarBase_GetToolState(self, *_args, **_kwargs) return val @@ -512,3 +515,14 @@ def wxPreToolBarSimple(*_args,**_kwargs): wxTOOL_STYLE_BUTTON = stattoolc.wxTOOL_STYLE_BUTTON wxTOOL_STYLE_SEPARATOR = stattoolc.wxTOOL_STYLE_SEPARATOR wxTOOL_STYLE_CONTROL = stattoolc.wxTOOL_STYLE_CONTROL +wxTB_HORIZONTAL = stattoolc.wxTB_HORIZONTAL +wxTB_VERTICAL = stattoolc.wxTB_VERTICAL +wxTB_3DBUTTONS = stattoolc.wxTB_3DBUTTONS +wxTB_FLAT = stattoolc.wxTB_FLAT +wxTB_DOCKABLE = stattoolc.wxTB_DOCKABLE +wxTB_NOICONS = stattoolc.wxTB_NOICONS +wxTB_TEXT = stattoolc.wxTB_TEXT +wxTB_NODIVIDER = stattoolc.wxTB_NODIVIDER +wxTB_NOALIGN = stattoolc.wxTB_NOALIGN +wxTB_HORZ_LAYOUT = stattoolc.wxTB_HORZ_LAYOUT +wxTB_HORZ_TEXT = stattoolc.wxTB_HORZ_TEXT diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index 4ce68f2e12..422dc01ffe 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -1728,34 +1728,6 @@ static PyObject *_wrap_wxWindow_GetBackgroundColour(PyObject *self, PyObject *ar return _resultobj; } -#define wxWindow_GetBorder(_swigobj) (_swigobj->GetBorder()) -static PyObject *_wrap_wxWindow_GetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBorder _result; - wxWindow * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetBorder",_kwnames,&_argo0)) - 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 wxWindow_GetBorder. Expected _wxWindow_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBorder )wxWindow_GetBorder(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static PyObject * wxWindow_GetChildren(wxWindow *self) { wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list, "wxWindow"); @@ -5109,15 +5081,16 @@ static PyObject *_wrap_wxWindow_TransferDataToWindow(PyObject *self, PyObject *a return _resultobj; } -#define wxWindow_UpdateWindowUI(_swigobj) (_swigobj->UpdateWindowUI()) +#define wxWindow_UpdateWindowUI(_swigobj,_swigarg0) (_swigobj->UpdateWindowUI(_swigarg0)) static PyObject *_wrap_wxWindow_UpdateWindowUI(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxWindow * _arg0; + long _arg1 = (long ) wxUPDATE_UI_NONE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","flags", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_UpdateWindowUI",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|l:wxWindow_UpdateWindowUI",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5128,7 +5101,7 @@ static PyObject *_wrap_wxWindow_UpdateWindowUI(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxWindow_UpdateWindowUI(_arg0); + wxWindow_UpdateWindowUI(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6406,6 +6379,78 @@ static PyObject *_wrap_wxWindow_GetAcceleratorTable(PyObject *self, PyObject *ar return _resultobj; } +static bool wxWindow_RegisterHotKey(wxWindow *self,int hotkeyId,int modifiers,int keycode) { +#if wxUSE_HOTKEY + return self->RegisterHotKey(hotkeyId, modifiers, keycode); +#else + return FALSE; +#endif + } +static PyObject *_wrap_wxWindow_RegisterHotKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + int _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hotkeyId","modifiers","keycode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxWindow_RegisterHotKey",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + 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 wxWindow_RegisterHotKey. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxWindow_RegisterHotKey(_arg0,_arg1,_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxWindow_UnregisterHotKey(wxWindow *self,int hotkeyId) { +#if wxUSE_HOTKEY + return self->UnregisterHotKey(hotkeyId); +#else + return FALSE; +#endif + } +static PyObject *_wrap_wxWindow_UnregisterHotKey(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","hotkeyId", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_UnregisterHotKey",_kwnames,&_argo0,&_arg1)) + 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 wxWindow_UnregisterHotKey. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxWindow_UnregisterHotKey(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxWindow_GetDefaultItem(_swigobj) (_swigobj->GetDefaultItem()) static PyObject *_wrap_wxWindow_GetDefaultItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6699,6 +6744,63 @@ static PyObject *_wrap_wxWindow_GetThemeEnabled(PyObject *self, PyObject *args, return _resultobj; } +#define wxWindow_GetBorderFlags(_swigobj,_swigarg0) (_swigobj->GetBorder(_swigarg0)) +static PyObject *_wrap_wxWindow_GetBorderFlags(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBorder _result; + wxWindow * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","flags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxWindow_GetBorderFlags",_kwnames,&_argo0,&_arg1)) + 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 wxWindow_GetBorderFlags. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBorder )wxWindow_GetBorderFlags(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxWindow_GetBorder(_swigobj) (_swigobj->GetBorder()) +static PyObject *_wrap_wxWindow_GetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBorder _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetBorder",_kwnames,&_argo0)) + 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 wxWindow_GetBorder. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBorder )wxWindow_GetBorder(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxPanelTowxWindow(void *ptr) { wxPanel *src; wxWindow *dest; @@ -8966,6 +9068,35 @@ static PyObject *_wrap_wxMenu_FindItemById(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxMenu_FindItemByPosition(_swigobj,_swigarg0) (_swigobj->FindItemByPosition(_swigarg0)) +static PyObject *_wrap_wxMenu_FindItemByPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenuItem * _result; + wxMenu * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","position", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenu_FindItemByPosition",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenu_FindItemByPosition. Expected _wxMenu_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxMenuItem *)wxMenu_FindItemByPosition(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + #define wxMenu_GetTitle(_swigobj) (_swigobj->GetTitle()) static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11586,6 +11717,7 @@ static PyMethodDef windowscMethods[] = { { "wxMenu_GetLabel", (PyCFunction) _wrap_wxMenu_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_SetTitle", (PyCFunction) _wrap_wxMenu_SetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_GetTitle", (PyCFunction) _wrap_wxMenu_GetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxMenu_FindItemByPosition", (PyCFunction) _wrap_wxMenu_FindItemByPosition, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_FindItemById", (PyCFunction) _wrap_wxMenu_FindItemById, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_FindItem", (PyCFunction) _wrap_wxMenu_FindItem, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_IsEnabled", (PyCFunction) _wrap_wxMenu_IsEnabled, METH_VARARGS | METH_KEYWORDS }, @@ -11640,6 +11772,8 @@ static PyMethodDef windowscMethods[] = { { "wxPanel_Create", (PyCFunction) _wrap_wxPanel_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPrePanel", (PyCFunction) _wrap_new_wxPrePanel, METH_VARARGS | METH_KEYWORDS }, { "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetBorder", (PyCFunction) _wrap_wxWindow_GetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetBorderFlags", (PyCFunction) _wrap_wxWindow_GetBorderFlags, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetThemeEnabled", (PyCFunction) _wrap_wxWindow_GetThemeEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetThemeEnabled", (PyCFunction) _wrap_wxWindow_SetThemeEnabled, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_HasCapture", (PyCFunction) _wrap_wxWindow_HasCapture, METH_VARARGS | METH_KEYWORDS }, @@ -11650,6 +11784,8 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetTmpDefaultItem", (PyCFunction) _wrap_wxWindow_SetTmpDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetDefaultItem", (PyCFunction) _wrap_wxWindow_SetDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetDefaultItem", (PyCFunction) _wrap_wxWindow_GetDefaultItem, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_UnregisterHotKey", (PyCFunction) _wrap_wxWindow_UnregisterHotKey, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_RegisterHotKey", (PyCFunction) _wrap_wxWindow_RegisterHotKey, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetAcceleratorTable", (PyCFunction) _wrap_wxWindow_GetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetAcceleratorTable", (PyCFunction) _wrap_wxWindow_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS }, @@ -11791,7 +11927,6 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_GetCharWidth", (PyCFunction) _wrap_wxWindow_GetCharWidth, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetCharHeight", (PyCFunction) _wrap_wxWindow_GetCharHeight, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetChildren", (PyCFunction) _wrap_wxWindow_GetChildren, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_GetBorder", (PyCFunction) _wrap_wxWindow_GetBorder, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetBackgroundColour", (PyCFunction) _wrap_wxWindow_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FitInside", (PyCFunction) _wrap_wxWindow_FitInside, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Fit", (PyCFunction) _wrap_wxWindow_Fit, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 95570cbe9f..6aecaefa02 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -181,9 +181,6 @@ class wxWindowPtr(wxEvtHandlerPtr): val = windowsc.wxWindow_GetBackgroundColour(self, *_args, **_kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 return val - def GetBorder(self, *_args, **_kwargs): - val = windowsc.wxWindow_GetBorder(self, *_args, **_kwargs) - return val def GetChildren(self, *_args, **_kwargs): val = windowsc.wxWindow_GetChildren(self, *_args, **_kwargs) return val @@ -622,6 +619,12 @@ class wxWindowPtr(wxEvtHandlerPtr): val = windowsc.wxWindow_GetAcceleratorTable(self, *_args, **_kwargs) if val: val = wxAcceleratorTablePtr(val) return val + def RegisterHotKey(self, *_args, **_kwargs): + val = windowsc.wxWindow_RegisterHotKey(self, *_args, **_kwargs) + return val + def UnregisterHotKey(self, *_args, **_kwargs): + val = windowsc.wxWindow_UnregisterHotKey(self, *_args, **_kwargs) + return val def GetDefaultItem(self, *_args, **_kwargs): val = windowsc.wxWindow_GetDefaultItem(self, *_args, **_kwargs) return val @@ -649,6 +652,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetThemeEnabled(self, *_args, **_kwargs): val = windowsc.wxWindow_GetThemeEnabled(self, *_args, **_kwargs) return val + def GetBorderFlags(self, *_args, **_kwargs): + val = windowsc.wxWindow_GetBorderFlags(self, *_args, **_kwargs) + return val + def GetBorder(self, *_args, **_kwargs): + val = windowsc.wxWindow_GetBorder(self, *_args, **_kwargs) + return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) # replaces broken shadow method @@ -886,6 +895,9 @@ class wxMenuPtr(wxEvtHandlerPtr): def FindItemById(self, *_args, **_kwargs): val = windowsc.wxMenu_FindItemById(self, *_args, **_kwargs) return val + def FindItemByPosition(self, *_args, **_kwargs): + val = windowsc.wxMenu_FindItemByPosition(self, *_args, **_kwargs) + return val def GetTitle(self, *_args, **_kwargs): val = windowsc.wxMenu_GetTitle(self, *_args, **_kwargs) return val diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 54d802fd96..9bb776322f 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -700,63 +700,32 @@ static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, P return _resultobj; } -#define wxNotebook_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) +static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + wxWindow * _result; wxNotebook * _arg0; int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","page", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_SetSelection",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetSelection. Expected _wxNotebook_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxNotebook_AdvanceSelection(_swigobj,_swigarg0) (_swigobj->AdvanceSelection(_swigarg0)) -static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxNotebook * _arg0; - bool _arg1 = (bool ) TRUE; - PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","forward", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxNotebook_AdvanceSelection",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AdvanceSelection. Expected _wxNotebook_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPage. Expected _wxNotebook_p."); return NULL; } } - _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AdvanceSelection(_arg0,_arg1); + _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1005,7 +974,7 @@ static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, P int _arg1; int _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","page","image", NULL }; + char *_kwnames[] = { "self","page","nImage", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxNotebook_SetPageImage",_kwnames,&_argo0,&_arg1,&_arg2)) @@ -1127,6 +1096,80 @@ static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxNotebook_SetTabSize(_swigobj,_swigarg0) (_swigobj->SetTabSize(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetTabSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","sz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_SetTabSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetTabSize. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNotebook_SetTabSize(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNotebook_CalcSizeFromPage(_swigobj,_swigarg0) (_swigobj->CalcSizeFromPage(_swigarg0)) +static PyObject *_wrap_wxNotebook_CalcSizeFromPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxNotebook * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","sizePage", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_CalcSizeFromPage",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_CalcSizeFromPage. Expected _wxNotebook_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxNotebook_CalcSizeFromPage(_arg0,*_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxNotebook_DeletePage(_swigobj,_swigarg0) (_swigobj->DeletePage(_swigarg0)) static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1220,15 +1263,16 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje wxNotebook * _arg0; wxWindow * _arg1; wxString * _arg2; - int _arg3 = (int ) FALSE; + bool _arg3 = (bool ) FALSE; int _arg4 = (int ) -1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj2 = 0; - char *_kwnames[] = { "self","page","text","select","imageId", NULL }; + int tempbool3 = (int) FALSE; + char *_kwnames[] = { "self","page","text","telect","imageId", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxNotebook_AddPage",_kwnames,&_argo0,&_argo1,&_obj2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxNotebook_AddPage",_kwnames,&_argo0,&_argo1,&_obj2,&tempbool3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1249,6 +1293,7 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje if (_arg2 == NULL) return NULL; } + _arg3 = (bool ) tempbool3; { PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); @@ -1316,58 +1361,104 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxNotebook_GetPage(_swigobj,_swigarg0) (_swigobj->GetPage(_swigarg0)) -static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNotebook_SetSelection(_swigobj,_swigarg0) (_swigobj->SetSelection(_swigarg0)) +static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxWindow * _result; + int _result; wxNotebook * _arg0; int _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","page", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_SetSelection",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_GetPage. Expected _wxNotebook_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_SetSelection. Expected _wxNotebook_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); + _result = (int )wxNotebook_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -static void wxNotebook_ResizeChildren(wxNotebook *self) { - wxSizeEvent evt(self->GetClientSize()); - self->GetEventHandler()->ProcessEvent(evt); +#define wxNotebook_HitTest(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxNotebook_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNotebook * _arg0; + wxPoint * _arg1; + long * _arg2; + long temp; + PyObject * _argo0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; +{ + _arg2 = &temp; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNotebook_HitTest",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_HitTest. Expected _wxNotebook_p."); + return NULL; } -static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, PyObject *kwargs) { + } +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxNotebook_HitTest(_arg0,*_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxNotebook_AdvanceSelection(_swigobj,_swigarg0) (_swigobj->AdvanceSelection(_swigarg0)) +static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxNotebook * _arg0; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","forward", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNotebook_ResizeChildren",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxNotebook_AdvanceSelection",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNotebook_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_ResizeChildren. Expected _wxNotebook_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotebook_AdvanceSelection. Expected _wxNotebook_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_ResizeChildren(_arg0); + wxNotebook_AdvanceSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1617,7 +1708,7 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb wxWindowID _arg1; wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; - long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; + long _arg4 = (long ) (wxSP_3D)|wxCLIP_CHILDREN; wxString * _arg5 = (wxString *) &wxPySplitterNameStr; PyObject * _argo0 = 0; wxPoint temp; @@ -1711,7 +1802,7 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P wxWindowID _arg2; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; - long _arg5 = (long ) wxSP_3D|wxCLIP_CHILDREN; + long _arg5 = (long ) (wxSP_3D)|wxCLIP_CHILDREN; wxString * _arg6 = (wxString *) &wxPySplitterNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; @@ -4749,13 +4840,16 @@ static PyMethodDef windows2cMethods[] = { { "wxSplitterEvent_GetX", (PyCFunction) _wrap_wxSplitterEvent_GetX, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterEvent_GetSashPosition", (PyCFunction) _wrap_wxSplitterEvent_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, { "new_wxSplitterEvent", (PyCFunction) _wrap_new_wxSplitterEvent, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_ResizeChildren", (PyCFunction) _wrap_wxNotebook_ResizeChildren, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_AdvanceSelection", (PyCFunction) _wrap_wxNotebook_AdvanceSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_HitTest", (PyCFunction) _wrap_wxNotebook_HitTest, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetSelection", (PyCFunction) _wrap_wxNotebook_SetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_InsertPage", (PyCFunction) _wrap_wxNotebook_InsertPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_AddPage", (PyCFunction) _wrap_wxNotebook_AddPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeleteAllPages", (PyCFunction) _wrap_wxNotebook_DeleteAllPages, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_RemovePage", (PyCFunction) _wrap_wxNotebook_RemovePage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_DeletePage", (PyCFunction) _wrap_wxNotebook_DeletePage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_CalcSizeFromPage", (PyCFunction) _wrap_wxNotebook_CalcSizeFromPage, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_SetTabSize", (PyCFunction) _wrap_wxNotebook_SetTabSize, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPadding", (PyCFunction) _wrap_wxNotebook_SetPadding, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPageSize", (PyCFunction) _wrap_wxNotebook_SetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetRowCount", (PyCFunction) _wrap_wxNotebook_GetRowCount, METH_VARARGS | METH_KEYWORDS }, @@ -4767,8 +4861,7 @@ static PyMethodDef windows2cMethods[] = { { "wxNotebook_GetPageText", (PyCFunction) _wrap_wxNotebook_GetPageText, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_SetPageText", (PyCFunction) _wrap_wxNotebook_SetPageText, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetSelection", (PyCFunction) _wrap_wxNotebook_GetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_AdvanceSelection", (PyCFunction) _wrap_wxNotebook_AdvanceSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxNotebook_SetSelection", (PyCFunction) _wrap_wxNotebook_SetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxNotebook_GetPage", (PyCFunction) _wrap_wxNotebook_GetPage, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_GetPageCount", (PyCFunction) _wrap_wxNotebook_GetPageCount, METH_VARARGS | METH_KEYWORDS }, { "wxNotebook_Create", (PyCFunction) _wrap_wxNotebook_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreNotebook", (PyCFunction) _wrap_new_wxPreNotebook, METH_VARARGS | METH_KEYWORDS }, @@ -4920,6 +5013,16 @@ SWIGEXPORT(void) initwindows2c() { d = PyModule_GetDict(m); PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); + PyDict_SetItemString(d,"wxNB_FIXEDWIDTH", PyInt_FromLong((long) wxNB_FIXEDWIDTH)); + PyDict_SetItemString(d,"wxNB_TOP", PyInt_FromLong((long) wxNB_TOP)); + PyDict_SetItemString(d,"wxNB_LEFT", PyInt_FromLong((long) wxNB_LEFT)); + PyDict_SetItemString(d,"wxNB_RIGHT", PyInt_FromLong((long) wxNB_RIGHT)); + PyDict_SetItemString(d,"wxNB_BOTTOM", PyInt_FromLong((long) wxNB_BOTTOM)); + PyDict_SetItemString(d,"wxNB_MULTILINE", PyInt_FromLong((long) wxNB_MULTILINE)); + PyDict_SetItemString(d,"wxNB_HITTEST_NOWHERE", PyInt_FromLong((long) wxNB_HITTEST_NOWHERE)); + PyDict_SetItemString(d,"wxNB_HITTEST_ONICON", PyInt_FromLong((long) wxNB_HITTEST_ONICON)); + PyDict_SetItemString(d,"wxNB_HITTEST_ONLABEL", PyInt_FromLong((long) wxNB_HITTEST_ONLABEL)); + PyDict_SetItemString(d,"wxNB_HITTEST_ONITEM", PyInt_FromLong((long) wxNB_HITTEST_ONITEM)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED)); PyDict_SetItemString(d,"wxEVT_COMMAND_SPLITTER_UNSPLIT", PyInt_FromLong((long) wxEVT_COMMAND_SPLITTER_UNSPLIT)); @@ -4929,6 +5032,18 @@ SWIGEXPORT(void) initwindows2c() { PyDict_SetItemString(d,"wxSPLIT_DRAG_NONE", PyInt_FromLong((long) wxSPLIT_DRAG_NONE)); PyDict_SetItemString(d,"wxSPLIT_DRAG_DRAGGING", PyInt_FromLong((long) wxSPLIT_DRAG_DRAGGING)); PyDict_SetItemString(d,"wxSPLIT_DRAG_LEFT_DOWN", PyInt_FromLong((long) wxSPLIT_DRAG_LEFT_DOWN)); + PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL)); + PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL)); + PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS)); + PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); + PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); + PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); + PyDict_SetItemString(d,"wxSP_3DSASH", PyInt_FromLong((long) wxSP_3DSASH)); + PyDict_SetItemString(d,"wxSP_3DBORDER", PyInt_FromLong((long) wxSP_3DBORDER)); + PyDict_SetItemString(d,"wxSP_FULLSASH", PyInt_FromLong((long) wxSP_FULLSASH)); + PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); + PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE)); + PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/windows2.py b/wxPython/src/gtk/windows2.py index 3d88094351..6cb961308e 100644 --- a/wxPython/src/gtk/windows2.py +++ b/wxPython/src/gtk/windows2.py @@ -51,11 +51,8 @@ class wxNotebookPtr(wxControlPtr): def GetPageCount(self, *_args, **_kwargs): val = windows2c.wxNotebook_GetPageCount(self, *_args, **_kwargs) return val - def SetSelection(self, *_args, **_kwargs): - val = windows2c.wxNotebook_SetSelection(self, *_args, **_kwargs) - return val - def AdvanceSelection(self, *_args, **_kwargs): - val = windows2c.wxNotebook_AdvanceSelection(self, *_args, **_kwargs) + def GetPage(self, *_args, **_kwargs): + val = windows2c.wxNotebook_GetPage(self, *_args, **_kwargs) return val def GetSelection(self, *_args, **_kwargs): val = windows2c.wxNotebook_GetSelection(self, *_args, **_kwargs) @@ -91,6 +88,13 @@ class wxNotebookPtr(wxControlPtr): def SetPadding(self, *_args, **_kwargs): val = windows2c.wxNotebook_SetPadding(self, *_args, **_kwargs) return val + def SetTabSize(self, *_args, **_kwargs): + val = windows2c.wxNotebook_SetTabSize(self, *_args, **_kwargs) + return val + def CalcSizeFromPage(self, *_args, **_kwargs): + val = windows2c.wxNotebook_CalcSizeFromPage(self, *_args, **_kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def DeletePage(self, *_args, **_kwargs): val = windows2c.wxNotebook_DeletePage(self, *_args, **_kwargs) return val @@ -106,11 +110,14 @@ class wxNotebookPtr(wxControlPtr): def InsertPage(self, *_args, **_kwargs): val = windows2c.wxNotebook_InsertPage(self, *_args, **_kwargs) return val - def GetPage(self, *_args, **_kwargs): - val = windows2c.wxNotebook_GetPage(self, *_args, **_kwargs) + def SetSelection(self, *_args, **_kwargs): + val = windows2c.wxNotebook_SetSelection(self, *_args, **_kwargs) + return val + def HitTest(self, *_args, **_kwargs): + val = windows2c.wxNotebook_HitTest(self, *_args, **_kwargs) return val - def ResizeChildren(self, *_args, **_kwargs): - val = windows2c.wxNotebook_ResizeChildren(self, *_args, **_kwargs) + def AdvanceSelection(self, *_args, **_kwargs): + val = windows2c.wxNotebook_AdvanceSelection(self, *_args, **_kwargs) return val def __repr__(self): return "<%s.%s instance; proxy of C++ wxNotebook instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) @@ -483,6 +490,16 @@ class wxPyPanel(wxPyPanelPtr): wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = windows2c.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = windows2c.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING +wxNB_FIXEDWIDTH = windows2c.wxNB_FIXEDWIDTH +wxNB_TOP = windows2c.wxNB_TOP +wxNB_LEFT = windows2c.wxNB_LEFT +wxNB_RIGHT = windows2c.wxNB_RIGHT +wxNB_BOTTOM = windows2c.wxNB_BOTTOM +wxNB_MULTILINE = windows2c.wxNB_MULTILINE +wxNB_HITTEST_NOWHERE = windows2c.wxNB_HITTEST_NOWHERE +wxNB_HITTEST_ONICON = windows2c.wxNB_HITTEST_ONICON +wxNB_HITTEST_ONLABEL = windows2c.wxNB_HITTEST_ONLABEL +wxNB_HITTEST_ONITEM = windows2c.wxNB_HITTEST_ONITEM wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING = windows2c.wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED = windows2c.wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED wxEVT_COMMAND_SPLITTER_UNSPLIT = windows2c.wxEVT_COMMAND_SPLITTER_UNSPLIT @@ -492,3 +509,15 @@ wxSPLIT_VERTICAL = windows2c.wxSPLIT_VERTICAL wxSPLIT_DRAG_NONE = windows2c.wxSPLIT_DRAG_NONE wxSPLIT_DRAG_DRAGGING = windows2c.wxSPLIT_DRAG_DRAGGING wxSPLIT_DRAG_LEFT_DOWN = windows2c.wxSPLIT_DRAG_LEFT_DOWN +wxSP_VERTICAL = windows2c.wxSP_VERTICAL +wxSP_HORIZONTAL = windows2c.wxSP_HORIZONTAL +wxSP_ARROW_KEYS = windows2c.wxSP_ARROW_KEYS +wxSP_WRAP = windows2c.wxSP_WRAP +wxSP_NOBORDER = windows2c.wxSP_NOBORDER +wxSP_3D = windows2c.wxSP_3D +wxSP_3DSASH = windows2c.wxSP_3DSASH +wxSP_3DBORDER = windows2c.wxSP_3DBORDER +wxSP_FULLSASH = windows2c.wxSP_FULLSASH +wxSP_BORDER = windows2c.wxSP_BORDER +wxSP_LIVE_UPDATE = windows2c.wxSP_LIVE_UPDATE +wxSP_PERMIT_UNSPLIT = windows2c.wxSP_PERMIT_UNSPLIT diff --git a/wxPython/src/gtk/wizard.cpp b/wxPython/src/gtk/wizard.cpp index fedb5d0455..cb764d07e9 100644 --- a/wxPython/src/gtk/wizard.cpp +++ b/wxPython/src/gtk/wizard.cpp @@ -1640,7 +1640,7 @@ static void *SwigwxWizardTowxObject(void *ptr) { return (void *) dest; } -#define new_wxWizard(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxWizard(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +#define new_wxWizard(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxWizard(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_new_wxWizard(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxWizard * _result; @@ -1649,16 +1649,17 @@ static PyObject *_wrap_new_wxWizard(PyObject *self, PyObject *args, PyObject *kw wxString * _arg2 = (wxString *) &wxEmptyString; wxBitmap * _arg3 = (wxBitmap *) &wxNullBitmap; wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + long _arg5 = (long ) wxDEFAULT_DIALOG_STYLE; PyObject * _argo0 = 0; PyObject * _obj2 = 0; PyObject * _argo3 = 0; wxPoint temp; PyObject * _obj4 = 0; - char *_kwnames[] = { "parent","id","title","bitmap","pos", NULL }; + char *_kwnames[] = { "parent","id","title","bitmap","pos","style", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOO:new_wxWizard",_kwnames,&_argo0,&_arg1,&_obj2,&_argo3,&_obj4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOl:new_wxWizard",_kwnames,&_argo0,&_arg1,&_obj2,&_argo3,&_obj4,&_arg5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1687,7 +1688,7 @@ static PyObject *_wrap_new_wxWizard(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWizard *)new_wxWizard(_arg0,_arg1,*_arg2,*_arg3,*_arg4); + _result = (wxWizard *)new_wxWizard(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1994,6 +1995,63 @@ static PyObject *_wrap_wxWizard_FitToPage(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxWizard_GetPageAreaSizer(_swigobj) (_swigobj->GetPageAreaSizer()) +static PyObject *_wrap_wxWizard_GetPageAreaSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _result; + wxWizard * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWizard_GetPageAreaSizer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWizard_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWizard_GetPageAreaSizer. Expected _wxWizard_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSizer *)wxWizard_GetPageAreaSizer(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxSizer(_result); } + return _resultobj; +} + +#define wxWizard_SetBorder(_swigobj,_swigarg0) (_swigobj->SetBorder(_swigarg0)) +static PyObject *_wrap_wxWizard_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWizard * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","border", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWizard_SetBorder",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWizard_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWizard_SetBorder. Expected _wxWizard_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWizard_SetBorder(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWizard_IsRunning(_swigobj) (_swigobj->IsRunning()) static PyObject *_wrap_wxWizard_IsRunning(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2141,6 +2199,8 @@ static PyMethodDef wizardcMethods[] = { { "wxWizard_HasNextPage", (PyCFunction) _wrap_wxWizard_HasNextPage, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_ShowPage", (PyCFunction) _wrap_wxWizard_ShowPage, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_IsRunning", (PyCFunction) _wrap_wxWizard_IsRunning, METH_VARARGS | METH_KEYWORDS }, + { "wxWizard_SetBorder", (PyCFunction) _wrap_wxWizard_SetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxWizard_GetPageAreaSizer", (PyCFunction) _wrap_wxWizard_GetPageAreaSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_FitToPage", (PyCFunction) _wrap_wxWizard_FitToPage, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_GetPageSize", (PyCFunction) _wrap_wxWizard_GetPageSize, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_SetPageSize", (PyCFunction) _wrap_wxWizard_SetPageSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/wizard.py b/wxPython/src/gtk/wizard.py index 9acf81282b..bd385ce0b9 100644 --- a/wxPython/src/gtk/wizard.py +++ b/wxPython/src/gtk/wizard.py @@ -223,6 +223,12 @@ class wxWizardPtr(wxDialogPtr): def FitToPage(self, *_args, **_kwargs): val = wizardc.wxWizard_FitToPage(self, *_args, **_kwargs) return val + def GetPageAreaSizer(self, *_args, **_kwargs): + val = wizardc.wxWizard_GetPageAreaSizer(self, *_args, **_kwargs) + return val + def SetBorder(self, *_args, **_kwargs): + val = wizardc.wxWizard_SetBorder(self, *_args, **_kwargs) + return val def IsRunning(self, *_args, **_kwargs): val = wizardc.wxWizard_IsRunning(self, *_args, **_kwargs) return val diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 646088cbda..771e3b7cea 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -83,6 +83,18 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } +#if ! wxUSE_HOTKEY +enum wxHotkeyModifier +{ + wxMOD_NONE = 0, + wxMOD_ALT = 1, + wxMOD_CONTROL = 2, + wxMOD_SHIFT = 4, + wxMOD_WIN = 8 +}; +#define wxEVT_HOTKEY 9999 +#endif + #include @@ -2252,15 +2264,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxCLIP_SIBLINGS", PyInt_FromLong((long) wxCLIP_SIBLINGS)); PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED)); PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE)); - PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL)); - PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL)); - PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS)); - PyDict_SetItemString(d,"wxTB_FLAT", PyInt_FromLong((long) wxTB_FLAT)); - PyDict_SetItemString(d,"wxTB_DOCKABLE", PyInt_FromLong((long) wxTB_DOCKABLE)); - PyDict_SetItemString(d,"wxTB_NOICONS", PyInt_FromLong((long) wxTB_NOICONS)); - PyDict_SetItemString(d,"wxTB_TEXT", PyInt_FromLong((long) wxTB_TEXT)); - PyDict_SetItemString(d,"wxTB_NODIVIDER", PyInt_FromLong((long) wxTB_NODIVIDER)); - PyDict_SetItemString(d,"wxTB_NOALIGN", PyInt_FromLong((long) wxTB_NOALIGN)); PyDict_SetItemString(d,"wxCOLOURED", PyInt_FromLong((long) wxCOLOURED)); PyDict_SetItemString(d,"wxFIXED_LENGTH", PyInt_FromLong((long) wxFIXED_LENGTH)); PyDict_SetItemString(d,"wxALIGN_LEFT", PyInt_FromLong((long) wxALIGN_LEFT)); @@ -2285,24 +2288,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL)); PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER)); PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD)); - PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY)); - 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)); - PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD)); - PyDict_SetItemString(d,"wxTE_AUTO_URL", PyInt_FromLong((long) wxTE_AUTO_URL)); - PyDict_SetItemString(d,"wxTE_NOHIDESEL", PyInt_FromLong((long) wxTE_NOHIDESEL)); - PyDict_SetItemString(d,"wxTE_DONTWRAP", PyInt_FromLong((long) wxTE_DONTWRAP)); - PyDict_SetItemString(d,"wxTE_LINEWRAP", PyInt_FromLong((long) wxTE_LINEWRAP)); - PyDict_SetItemString(d,"wxTE_WORDWRAP", PyInt_FromLong((long) wxTE_WORDWRAP)); - PyDict_SetItemString(d,"wxTE_LEFT", PyInt_FromLong((long) wxTE_LEFT)); - PyDict_SetItemString(d,"wxTE_RIGHT", PyInt_FromLong((long) wxTE_RIGHT)); - PyDict_SetItemString(d,"wxTE_CENTER", PyInt_FromLong((long) wxTE_CENTER)); - PyDict_SetItemString(d,"wxTE_CENTRE", PyInt_FromLong((long) wxTE_CENTRE)); PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE)); PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN)); PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT)); @@ -2338,18 +2323,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxBU_RIGHT", PyInt_FromLong((long) wxBU_RIGHT)); PyDict_SetItemString(d,"wxBU_BOTTOM", PyInt_FromLong((long) wxBU_BOTTOM)); PyDict_SetItemString(d,"wxBU_EXACTFIT", PyInt_FromLong((long) wxBU_EXACTFIT)); - PyDict_SetItemString(d,"wxSP_VERTICAL", PyInt_FromLong((long) wxSP_VERTICAL)); - PyDict_SetItemString(d,"wxSP_HORIZONTAL", PyInt_FromLong((long) wxSP_HORIZONTAL)); - PyDict_SetItemString(d,"wxSP_ARROW_KEYS", PyInt_FromLong((long) wxSP_ARROW_KEYS)); - PyDict_SetItemString(d,"wxSP_WRAP", PyInt_FromLong((long) wxSP_WRAP)); - PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER)); - PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D)); - PyDict_SetItemString(d,"wxSP_3DSASH", PyInt_FromLong((long) wxSP_3DSASH)); - PyDict_SetItemString(d,"wxSP_3DBORDER", PyInt_FromLong((long) wxSP_3DBORDER)); - PyDict_SetItemString(d,"wxSP_FULLSASH", PyInt_FromLong((long) wxSP_FULLSASH)); - PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER)); - PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE)); - PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT)); PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE)); PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER)); PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE)); @@ -2421,6 +2394,18 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxID_FIND", PyInt_FromLong((long) wxID_FIND)); PyDict_SetItemString(d,"wxID_DUPLICATE", PyInt_FromLong((long) wxID_DUPLICATE)); PyDict_SetItemString(d,"wxID_SELECTALL", PyInt_FromLong((long) wxID_SELECTALL)); + PyDict_SetItemString(d,"wxID_DELETE", PyInt_FromLong((long) wxID_DELETE)); + PyDict_SetItemString(d,"wxID_REPLACE", PyInt_FromLong((long) wxID_REPLACE)); + PyDict_SetItemString(d,"wxID_REPLACE_ALL", PyInt_FromLong((long) wxID_REPLACE_ALL)); + PyDict_SetItemString(d,"wxID_PROPERTIES", PyInt_FromLong((long) wxID_PROPERTIES)); + PyDict_SetItemString(d,"wxID_VIEW_DETAILS", PyInt_FromLong((long) wxID_VIEW_DETAILS)); + PyDict_SetItemString(d,"wxID_VIEW_LARGEICONS", PyInt_FromLong((long) wxID_VIEW_LARGEICONS)); + PyDict_SetItemString(d,"wxID_VIEW_SMALLICONS", PyInt_FromLong((long) wxID_VIEW_SMALLICONS)); + PyDict_SetItemString(d,"wxID_VIEW_LIST", PyInt_FromLong((long) wxID_VIEW_LIST)); + PyDict_SetItemString(d,"wxID_VIEW_SORTDATE", PyInt_FromLong((long) wxID_VIEW_SORTDATE)); + PyDict_SetItemString(d,"wxID_VIEW_SORTNAME", PyInt_FromLong((long) wxID_VIEW_SORTNAME)); + PyDict_SetItemString(d,"wxID_VIEW_SORTSIZE", PyInt_FromLong((long) wxID_VIEW_SORTSIZE)); + PyDict_SetItemString(d,"wxID_VIEW_SORTTYPE", PyInt_FromLong((long) wxID_VIEW_SORTTYPE)); PyDict_SetItemString(d,"wxID_FILE1", PyInt_FromLong((long) wxID_FILE1)); PyDict_SetItemString(d,"wxID_FILE2", PyInt_FromLong((long) wxID_FILE2)); PyDict_SetItemString(d,"wxID_FILE3", PyInt_FromLong((long) wxID_FILE3)); @@ -2485,12 +2470,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxSHRINK", PyInt_FromLong((long) wxSHRINK)); PyDict_SetItemString(d,"wxGROW", PyInt_FromLong((long) wxGROW)); PyDict_SetItemString(d,"wxEXPAND", PyInt_FromLong((long) wxEXPAND)); - PyDict_SetItemString(d,"wxNB_FIXEDWIDTH", PyInt_FromLong((long) wxNB_FIXEDWIDTH)); - PyDict_SetItemString(d,"wxNB_TOP", PyInt_FromLong((long) wxNB_TOP)); - PyDict_SetItemString(d,"wxNB_LEFT", PyInt_FromLong((long) wxNB_LEFT)); - PyDict_SetItemString(d,"wxNB_RIGHT", PyInt_FromLong((long) wxNB_RIGHT)); - PyDict_SetItemString(d,"wxNB_BOTTOM", PyInt_FromLong((long) wxNB_BOTTOM)); - PyDict_SetItemString(d,"wxNB_MULTILINE", PyInt_FromLong((long) wxNB_MULTILINE)); PyDict_SetItemString(d,"wxLI_HORIZONTAL", PyInt_FromLong((long) wxLI_HORIZONTAL)); PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL)); PyDict_SetItemString(d,"wxJOYSTICK1", PyInt_FromLong((long) wxJOYSTICK1)); @@ -2503,6 +2482,9 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY)); PyDict_SetItemString(d,"wxWS_EX_BLOCK_EVENTS", PyInt_FromLong((long) wxWS_EX_BLOCK_EVENTS)); PyDict_SetItemString(d,"wxWS_EX_TRANSIENT", PyInt_FromLong((long) wxWS_EX_TRANSIENT)); + PyDict_SetItemString(d,"wxWS_EX_THEMED_BACKGROUND", PyInt_FromLong((long) wxWS_EX_THEMED_BACKGROUND)); + PyDict_SetItemString(d,"wxWS_EX_PROCESS_IDLE", PyInt_FromLong((long) wxWS_EX_PROCESS_IDLE)); + PyDict_SetItemString(d,"wxWS_EX_PROCESS_UI_UPDATES", PyInt_FromLong((long) wxWS_EX_PROCESS_UI_UPDATES)); PyDict_SetItemString(d,"wxMM_TEXT", PyInt_FromLong((long) wxMM_TEXT)); PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC)); PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC)); @@ -2838,6 +2820,14 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxHT_WINDOW_HORZ_SCROLLBAR", PyInt_FromLong((long) wxHT_WINDOW_HORZ_SCROLLBAR)); PyDict_SetItemString(d,"wxHT_WINDOW_CORNER", PyInt_FromLong((long) wxHT_WINDOW_CORNER)); PyDict_SetItemString(d,"wxHT_MAX", PyInt_FromLong((long) wxHT_MAX)); + PyDict_SetItemString(d,"wxMOD_NONE", PyInt_FromLong((long) wxMOD_NONE)); + PyDict_SetItemString(d,"wxMOD_ALT", PyInt_FromLong((long) wxMOD_ALT)); + PyDict_SetItemString(d,"wxMOD_CONTROL", PyInt_FromLong((long) wxMOD_CONTROL)); + PyDict_SetItemString(d,"wxMOD_SHIFT", PyInt_FromLong((long) wxMOD_SHIFT)); + PyDict_SetItemString(d,"wxMOD_WIN", PyInt_FromLong((long) wxMOD_WIN)); + PyDict_SetItemString(d,"wxUPDATE_UI_NONE", PyInt_FromLong((long) wxUPDATE_UI_NONE)); + PyDict_SetItemString(d,"wxUPDATE_UI_RECURSE", PyInt_FromLong((long) wxUPDATE_UI_RECURSE)); + PyDict_SetItemString(d,"wxUPDATE_UI_FROMIDLE", PyInt_FromLong((long) wxUPDATE_UI_FROMIDLE)); PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL)); PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST)); PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED)); @@ -2895,6 +2885,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_KEY_DOWN", PyInt_FromLong((long) wxEVT_KEY_DOWN)); PyDict_SetItemString(d,"wxEVT_KEY_UP", PyInt_FromLong((long) wxEVT_KEY_UP)); PyDict_SetItemString(d,"wxEVT_CHAR_HOOK", PyInt_FromLong((long) wxEVT_CHAR_HOOK)); + PyDict_SetItemString(d,"wxEVT_HOTKEY", PyInt_FromLong((long) wxEVT_HOTKEY)); PyDict_SetItemString(d,"wxEVT_SCROLL_TOP", PyInt_FromLong((long) wxEVT_SCROLL_TOP)); PyDict_SetItemString(d,"wxEVT_SCROLL_BOTTOM", PyInt_FromLong((long) wxEVT_SCROLL_BOTTOM)); PyDict_SetItemString(d,"wxEVT_SCROLL_LINEUP", PyInt_FromLong((long) wxEVT_SCROLL_LINEUP)); @@ -2914,6 +2905,8 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_SCROLLWIN_THUMBRELEASE", PyInt_FromLong((long) wxEVT_SCROLLWIN_THUMBRELEASE)); PyDict_SetItemString(d,"wxEVT_SIZE", PyInt_FromLong((long) wxEVT_SIZE)); PyDict_SetItemString(d,"wxEVT_MOVE", PyInt_FromLong((long) wxEVT_MOVE)); + PyDict_SetItemString(d,"wxEVT_SIZING", PyInt_FromLong((long) wxEVT_SIZING)); + PyDict_SetItemString(d,"wxEVT_MOVING", PyInt_FromLong((long) wxEVT_MOVING)); PyDict_SetItemString(d,"wxEVT_CLOSE_WINDOW", PyInt_FromLong((long) wxEVT_CLOSE_WINDOW)); PyDict_SetItemString(d,"wxEVT_END_SESSION", PyInt_FromLong((long) wxEVT_END_SESSION)); PyDict_SetItemString(d,"wxEVT_QUERY_END_SESSION", PyInt_FromLong((long) wxEVT_QUERY_END_SESSION)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 8dcae391b5..f69a9cdb32 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -250,15 +250,6 @@ wxCLIP_CHILDREN = wxc.wxCLIP_CHILDREN wxCLIP_SIBLINGS = wxc.wxCLIP_SIBLINGS wxRETAINED = wxc.wxRETAINED wxBACKINGSTORE = wxc.wxBACKINGSTORE -wxTB_HORIZONTAL = wxc.wxTB_HORIZONTAL -wxTB_VERTICAL = wxc.wxTB_VERTICAL -wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS -wxTB_FLAT = wxc.wxTB_FLAT -wxTB_DOCKABLE = wxc.wxTB_DOCKABLE -wxTB_NOICONS = wxc.wxTB_NOICONS -wxTB_TEXT = wxc.wxTB_TEXT -wxTB_NODIVIDER = wxc.wxTB_NODIVIDER -wxTB_NOALIGN = wxc.wxTB_NOALIGN wxCOLOURED = wxc.wxCOLOURED wxFIXED_LENGTH = wxc.wxFIXED_LENGTH wxALIGN_LEFT = wxc.wxALIGN_LEFT @@ -283,24 +274,6 @@ wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW wxLB_HSCROLL = wxc.wxLB_HSCROLL wxPROCESS_ENTER = wxc.wxPROCESS_ENTER wxPASSWORD = wxc.wxPASSWORD -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 -wxTE_PASSWORD = wxc.wxTE_PASSWORD -wxTE_AUTO_URL = wxc.wxTE_AUTO_URL -wxTE_NOHIDESEL = wxc.wxTE_NOHIDESEL -wxTE_DONTWRAP = wxc.wxTE_DONTWRAP -wxTE_LINEWRAP = wxc.wxTE_LINEWRAP -wxTE_WORDWRAP = wxc.wxTE_WORDWRAP -wxTE_LEFT = wxc.wxTE_LEFT -wxTE_RIGHT = wxc.wxTE_RIGHT -wxTE_CENTER = wxc.wxTE_CENTER -wxTE_CENTRE = wxc.wxTE_CENTRE wxCB_SIMPLE = wxc.wxCB_SIMPLE wxCB_DROPDOWN = wxc.wxCB_DROPDOWN wxCB_SORT = wxc.wxCB_SORT @@ -336,18 +309,6 @@ wxBU_TOP = wxc.wxBU_TOP wxBU_RIGHT = wxc.wxBU_RIGHT wxBU_BOTTOM = wxc.wxBU_BOTTOM wxBU_EXACTFIT = wxc.wxBU_EXACTFIT -wxSP_VERTICAL = wxc.wxSP_VERTICAL -wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL -wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS -wxSP_WRAP = wxc.wxSP_WRAP -wxSP_NOBORDER = wxc.wxSP_NOBORDER -wxSP_3D = wxc.wxSP_3D -wxSP_3DSASH = wxc.wxSP_3DSASH -wxSP_3DBORDER = wxc.wxSP_3DBORDER -wxSP_FULLSASH = wxc.wxSP_FULLSASH -wxSP_BORDER = wxc.wxSP_BORDER -wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE -wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE wxFLOOD_BORDER = wxc.wxFLOOD_BORDER wxODDEVEN_RULE = wxc.wxODDEVEN_RULE @@ -419,6 +380,18 @@ wxID_CLEAR = wxc.wxID_CLEAR wxID_FIND = wxc.wxID_FIND wxID_DUPLICATE = wxc.wxID_DUPLICATE wxID_SELECTALL = wxc.wxID_SELECTALL +wxID_DELETE = wxc.wxID_DELETE +wxID_REPLACE = wxc.wxID_REPLACE +wxID_REPLACE_ALL = wxc.wxID_REPLACE_ALL +wxID_PROPERTIES = wxc.wxID_PROPERTIES +wxID_VIEW_DETAILS = wxc.wxID_VIEW_DETAILS +wxID_VIEW_LARGEICONS = wxc.wxID_VIEW_LARGEICONS +wxID_VIEW_SMALLICONS = wxc.wxID_VIEW_SMALLICONS +wxID_VIEW_LIST = wxc.wxID_VIEW_LIST +wxID_VIEW_SORTDATE = wxc.wxID_VIEW_SORTDATE +wxID_VIEW_SORTNAME = wxc.wxID_VIEW_SORTNAME +wxID_VIEW_SORTSIZE = wxc.wxID_VIEW_SORTSIZE +wxID_VIEW_SORTTYPE = wxc.wxID_VIEW_SORTTYPE wxID_FILE1 = wxc.wxID_FILE1 wxID_FILE2 = wxc.wxID_FILE2 wxID_FILE3 = wxc.wxID_FILE3 @@ -483,12 +456,6 @@ wxSTRETCH_NOT = wxc.wxSTRETCH_NOT wxSHRINK = wxc.wxSHRINK wxGROW = wxc.wxGROW wxEXPAND = wxc.wxEXPAND -wxNB_FIXEDWIDTH = wxc.wxNB_FIXEDWIDTH -wxNB_TOP = wxc.wxNB_TOP -wxNB_LEFT = wxc.wxNB_LEFT -wxNB_RIGHT = wxc.wxNB_RIGHT -wxNB_BOTTOM = wxc.wxNB_BOTTOM -wxNB_MULTILINE = wxc.wxNB_MULTILINE wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL wxLI_VERTICAL = wxc.wxLI_VERTICAL wxJOYSTICK1 = wxc.wxJOYSTICK1 @@ -501,6 +468,9 @@ wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS wxWS_EX_TRANSIENT = wxc.wxWS_EX_TRANSIENT +wxWS_EX_THEMED_BACKGROUND = wxc.wxWS_EX_THEMED_BACKGROUND +wxWS_EX_PROCESS_IDLE = wxc.wxWS_EX_PROCESS_IDLE +wxWS_EX_PROCESS_UI_UPDATES = wxc.wxWS_EX_PROCESS_UI_UPDATES wxMM_TEXT = wxc.wxMM_TEXT wxMM_LOMETRIC = wxc.wxMM_LOMETRIC wxMM_HIMETRIC = wxc.wxMM_HIMETRIC @@ -836,6 +806,14 @@ wxHT_WINDOW_VERT_SCROLLBAR = wxc.wxHT_WINDOW_VERT_SCROLLBAR wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER wxHT_MAX = wxc.wxHT_MAX +wxMOD_NONE = wxc.wxMOD_NONE +wxMOD_ALT = wxc.wxMOD_ALT +wxMOD_CONTROL = wxc.wxMOD_CONTROL +wxMOD_SHIFT = wxc.wxMOD_SHIFT +wxMOD_WIN = wxc.wxMOD_WIN +wxUPDATE_UI_NONE = wxc.wxUPDATE_UI_NONE +wxUPDATE_UI_RECURSE = wxc.wxUPDATE_UI_RECURSE +wxUPDATE_UI_FROMIDLE = wxc.wxUPDATE_UI_FROMIDLE wxEVT_NULL = wxc.wxEVT_NULL wxEVT_FIRST = wxc.wxEVT_FIRST wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED @@ -893,6 +871,7 @@ wxEVT_CHAR = wxc.wxEVT_CHAR wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN wxEVT_KEY_UP = wxc.wxEVT_KEY_UP wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK +wxEVT_HOTKEY = wxc.wxEVT_HOTKEY wxEVT_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP @@ -912,6 +891,8 @@ wxEVT_SCROLLWIN_THUMBTRACK = wxc.wxEVT_SCROLLWIN_THUMBTRACK wxEVT_SCROLLWIN_THUMBRELEASE = wxc.wxEVT_SCROLLWIN_THUMBRELEASE wxEVT_SIZE = wxc.wxEVT_SIZE wxEVT_MOVE = wxc.wxEVT_MOVE +wxEVT_SIZING = wxc.wxEVT_SIZING +wxEVT_MOVING = wxc.wxEVT_MOVING wxEVT_CLOSE_WINDOW = wxc.wxEVT_CLOSE_WINDOW wxEVT_END_SESSION = wxc.wxEVT_END_SESSION wxEVT_QUERY_END_SESSION = wxc.wxEVT_QUERY_END_SESSION @@ -1010,6 +991,12 @@ def EVT_SIZE(win, func): def EVT_MOVE(win, func): win.Connect(-1, -1, wxEVT_MOVE, func) +def EVT_SIZING(win, func): + win.Connect(-1, -1, wxEVT_SIZING, func) + +def EVT_MOVING(win, func): + win.Connect(-1, -1, wxEVT_MOVING, func) + def EVT_CLOSE(win, func): win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func) @@ -1031,6 +1018,9 @@ def EVT_KEY_DOWN(win, func): def EVT_KEY_UP(win, func): win.Connect(-1, -1, wxEVT_KEY_UP, func) +def EVT_HOTKEY(win, func): + win.Connect(-1, -1, wxEVT_HOTKEY, func) + def EVT_MENU_OPEN(win, func): win.Connect(-1, -1, wxEVT_MENU_OPEN, func) @@ -1455,29 +1445,6 @@ def EVT_SPIN(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) -# wxTaskBarIcon -def EVT_TASKBAR_MOVE(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func) - -def EVT_TASKBAR_LEFT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func) - -def EVT_TASKBAR_LEFT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func) - -def EVT_TASKBAR_RIGHT_DOWN(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func) - -def EVT_TASKBAR_RIGHT_UP(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func) - -def EVT_TASKBAR_LEFT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func) - -def EVT_TASKBAR_RIGHT_DCLICK(win, func): - win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) - - # wxSashWindow def EVT_SASH_DRAGGED(win, id, func): win.Connect(id, -1, wxEVT_SASH_DRAGGED, func) @@ -1939,6 +1906,15 @@ of your Mac.""" if redirect: self.RedirectStdio(filename) + # Set the default handler for SIGINT. This fixes a problem + # where if Ctrl-C is pressed in the console that started this + # app then it will not appear to do anything, (not even send + # KeyboardInterrupt???) but will later segfault on exit. By + # setting the default handler then the app will exit, as + # expected (depending on platform.) + import signal + signal.signal(signal.SIGINT, signal.SIG_DFL) + # this initializes wxWindows and then calls our OnInit _wxStart(self.OnInit) diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 4c9f9beca8..adfc2c88ae 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -1563,8 +1563,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyEvent, wxEvent); IMPLEMENT_ABSTRACT_CLASS(wxPyCommandEvent, wxCommandEvent); -wxPyEvent::wxPyEvent(int id) - : wxEvent(id) { +wxPyEvent::wxPyEvent(int winid, wxEventType commandType) + : wxEvent(winid, commandType) { } diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index e90e872415..e3432295a6 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -194,7 +194,7 @@ protected: class wxPyEvent : public wxEvent, public wxPyEvtSelfRef { DECLARE_ABSTRACT_CLASS(wxPyEvent) public: - wxPyEvent(int id=0); + wxPyEvent(int winid=0, wxEventType commandType = wxEVT_NULL); wxPyEvent(const wxPyEvent& evt); ~wxPyEvent(); diff --git a/wxPython/src/html.i b/wxPython/src/html.i index fb04f2d16e..ca9bf5f49e 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -95,6 +95,8 @@ enum { enum { wxHW_SCROLLBAR_NEVER, wxHW_SCROLLBAR_AUTO, + wxHW_NO_SELECTION, + wxHW_DEFAULT_STYLE, }; @@ -466,6 +468,15 @@ public: //--------------------------------------------------------------------------- + +enum +{ + wxHTML_FIND_EXACT = 1, + wxHTML_FIND_NEAREST_BEFORE = 2, + wxHTML_FIND_NEAREST_AFTER = 4 +}; + + class wxHtmlCell : public wxObject { public: wxHtmlCell(); @@ -478,6 +489,16 @@ public: wxHtmlLinkInfo* GetLink(int x = 0, int y = 0); wxHtmlCell* GetNext(); wxHtmlContainerCell* GetParent(); + wxHtmlCell* GetFirstChild() const; + + // Returns cursor to be used when mouse is over the cell: + wxCursor GetCursor() const; + + // Formatting cells are not visible on the screen, they only alter + // renderer's state. + bool IsFormattingCell() const; + + void SetLink(const wxHtmlLinkInfo& link); void SetNext(wxHtmlCell *cell); void SetParent(wxHtmlContainerCell *p); @@ -492,6 +513,41 @@ public: bool AdjustPagebreak(int* INOUT); void SetCanLiveOnPagebreak(bool can); + // Can the line be broken before this cell? + bool IsLinebreakAllowed() const; + + // Returns true for simple == terminal cells, i.e. not composite ones. + // This if for internal usage only and may disappear in future versions! + bool IsTerminalCell() const; + + // Find a cell inside this cell positioned at the given coordinates + // (relative to this's positions). Returns NULL if no such cell exists. + // The flag can be used to specify whether to look for terminal or + // nonterminal cells or both. In either case, returned cell is deepest + // cell in cells tree that contains [x,y]. + wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y, + unsigned flags = wxHTML_FIND_EXACT) const; + + // Returns absolute position of the cell on HTML canvas + wxPoint GetAbsPos() const; + + // Returns first (last) terminal cell inside this cell. It may return NULL, + // but it is rare -- only if there are no terminals in the tree. + wxHtmlCell *GetFirstTerminal() const ; + wxHtmlCell *GetLastTerminal() const ; + + // Returns cell's depth, i.e. how far under the root cell it is + // (if it is the root, depth is 0) + unsigned GetDepth() const; + + // Returns true if the cell appears before 'cell' in natural order of + // cells (= as they are read). If cell A is (grand)parent of cell B, + // then both A.IsBefore(B) and B.IsBefore(A) always return true. + bool IsBefore(wxHtmlCell *cell) const; + + // Converts the cell into text representation. If sel != NULL then + // only part of the cell inside the selection is converted. + wxString ConvertToText(wxHtmlSelection *sel) const; }; @@ -626,7 +682,7 @@ public: wxPyHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxHW_SCROLLBAR_AUTO, + long style = wxHW_DEFAULT_STYLE, const wxString& name = wxPyHtmlWindowNameStr) : wxHtmlWindow(parent, id, pos, size, style, name) {}; wxPyHtmlWindow() : wxHtmlWindow() {}; @@ -718,7 +774,7 @@ public: wxPyHtmlWindow(wxWindow *parent, int id = -1, wxPoint& pos = wxDefaultPosition, wxSize& size = wxDefaultSize, - int style=wxHW_SCROLLBAR_AUTO, + int style=wxHW_DEFAULT_STYLE, const wxString& name = wxPyHtmlWindowNameStr); %name(wxPreHtmlWindow)wxPyHtmlWindow(); @@ -854,7 +910,10 @@ public: delete [] temp; } } - int Render(int x, int y, int from = 0, int dont_render = FALSE); + int Render(int x, int y, int from = 0, int dont_render = FALSE, int to = INT_MAX, + //int *known_pagebreaks = NULL, int number_of_pages = 0 + int* choices=NULL, int LCOUNT = 0 + ); int GetTotalHeight(); // returns total height of the html document // (compare Render's return value with this) @@ -891,6 +950,12 @@ public: void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5); + + // Adds input filter + static void AddFilter(wxHtmlFilter *filter); + + // Cleanup + static void CleanUpStatics(); }; @@ -898,7 +963,7 @@ public: class wxHtmlEasyPrinting : public wxObject { public: wxHtmlEasyPrinting(const wxString& name = wxPyHtmlPrintingTitleStr, - wxFrame *parent_frame = NULL); + wxWindow *parentWindow = NULL); ~wxHtmlEasyPrinting(); void PreviewFile(const wxString &htmlfile); diff --git a/wxPython/src/image.i b/wxPython/src/image.i index db19f47d72..be25dd688d 100644 --- a/wxPython/src/image.i +++ b/wxPython/src/image.i @@ -317,6 +317,7 @@ public: static void AddHandler( wxImageHandler *handler ); static void InsertHandler( wxImageHandler *handler ); static bool RemoveHandler( const wxString& name ); + static wxString GetImageExtWildcard(); %addmethods { @@ -339,7 +340,7 @@ public: // Alternate constructors -%new wxImage* wxEmptyImage(int width=0, int height=0); +%new wxImage* wxEmptyImage(int width=0, int height=0, bool clear = TRUE); %new wxImage* wxImageFromMime(const wxString& name, const wxString& mimetype, int index = -1); %new wxImage* wxImageFromBitmap(const wxBitmap &bitmap); %new wxImage* wxImageFromData(int width, int height, unsigned char* data); @@ -347,11 +348,11 @@ public: %new wxImage* wxImageFromStreamMime(wxInputStream& stream, const wxString& mimetype, int index = -1 ); %{ - wxImage* wxEmptyImage(int width=0, int height=0) { - if (width == 0 && height == 0) - return new wxImage; + wxImage* wxEmptyImage(int width=0, int height=0, bool clear = TRUE) { + if (width > 0 && height > 0) + return new wxImage(width, height, clear); else - return new wxImage(width, height); + return new wxImage; } diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index 97e7ffb2cf..417bd08263 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -69,6 +69,9 @@ public: void SetWidth(long w); void SetHeight(long h); + void IncTo(const wxSize& sz); + void DecTo(const wxSize& sz); + %addmethods { PyObject* asTuple() { wxPyBeginBlockThreads(); diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index 214c510dcd..97e1b99eb3 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -33,6 +33,7 @@ #include #include #include +#include %} //---------------------------------------------------------------------- @@ -72,6 +73,9 @@ wxString wxFileSelector(const wxString& message = wxPyFileSelectorPromptStr, wxWindow *parent = NULL, int x = -1, int y = -1); +// TODO: wxFileSelectorEx + + // Ask for filename to load wxString wxLoadFileSelector(const wxString& what, const wxString& extension, @@ -341,6 +345,23 @@ public: +class wxSystemOptions : public wxObject +{ +public: + wxSystemOptions() { } + + // User-customizable hints to wxWindows or associated libraries + // These could also be used to influence GetSystem... calls, indeed + // to implement SetSystemColour/Font/Metric + + static void SetOption(const wxString& name, const wxString& value); + %name(SetOptionInt)static void SetOption(const wxString& name, int value); + static wxString GetOption(const wxString& name) ; + static int GetOptionInt(const wxString& name) ; + static bool HasOption(const wxString& name) ; +}; + + //--------------------------------------------------------------------------- // wxToolTip diff --git a/wxPython/src/printfw.i b/wxPython/src/printfw.i index ea705ac36f..70c69cf84a 100644 --- a/wxPython/src/printfw.i +++ b/wxPython/src/printfw.i @@ -423,20 +423,23 @@ public: wxPyPrintout *GetPrintoutForPrinting(); void SetFrame(wxFrame *frame); - void SetCanvas(wxWindow *canvas); + void SetCanvas(wxPreviewCanvas *canvas); virtual wxFrame *GetFrame(); - virtual wxWindow *GetCanvas(); + virtual wxPreviewCanvas *GetCanvas(); // The preview canvas should call this from OnPaint - virtual bool PaintPage(wxWindow *canvas, wxDC& dc); + virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc); // This draws a blank page onto the preview canvas - virtual bool DrawBlankPage(wxWindow *canvas, wxDC& dc); + virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc); // This is called by wxPrintPreview to render a page into a wxMemoryDC. virtual bool RenderPage(int pageNum); + // Adjusts the scrollbars for the current scale + virtual void AdjustScrollbars(wxPreviewCanvas *canvas); + wxPrintDialogData& GetPrintDialogData(); virtual void SetZoom(int percent); @@ -468,6 +471,8 @@ public: void Initialize(); void CreateControlBar(); void CreateCanvas(); + + wxPreviewControlBar* GetControlBar() const; }; @@ -513,7 +518,7 @@ public: wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, + long style = wxTAB_TRAVERSAL, const wxString& name = wxPyPanelNameStr); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" @@ -533,6 +538,36 @@ public: // Python-derivable versions of the above preview classes %{ + +#define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \ + bool CBNAME(wxPreviewCanvas* a, wxDC& b); \ + bool base_##CBNAME(wxPreviewCanvas* a, wxDC& b) + + +#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \ + bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \ + bool rval=FALSE; \ + bool found; \ + wxPyBeginBlockThreads(); \ + if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ + PyObject* win = wxPyMake_wxObject(a); \ + PyObject* dc = wxPyMake_wxObject(&b); \ + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\ + Py_DECREF(win); \ + Py_DECREF(dc); \ + } \ + wxPyEndBlockThreads(); \ + if (! found) \ + rval = PCLASS::CBNAME(a, b); \ + return rval; \ + } \ + bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \ + return PCLASS::CBNAME(a, b); \ + } + + + + class wxPyPrintPreview : public wxPrintPreview { DECLARE_CLASS(wxPyPrintPreview) @@ -544,8 +579,8 @@ public: {} DEC_PYCALLBACK_BOOL_INT(SetCurrentPage); - DEC_PYCALLBACK_BOOL_WXWINDC(PaintPage); - DEC_PYCALLBACK_BOOL_WXWINDC(DrawBlankPage); + DEC_PYCALLBACK_BOOL_PREWINDC(PaintPage); + DEC_PYCALLBACK_BOOL_PREWINDC(DrawBlankPage); DEC_PYCALLBACK_BOOL_INT(RenderPage); DEC_PYCALLBACK_VOID_INT(SetZoom); DEC_PYCALLBACK_BOOL_BOOL(Print); @@ -563,13 +598,13 @@ IMPLEMENT_CLASS( wxPyPrintPreview, wxMacPrintPreview ); IMPLEMENT_CLASS( wxPyPrintPreview, wxPostScriptPrintPreview ); #endif -IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, SetCurrentPage); -IMP_PYCALLBACK_BOOL_WXWINDC(wxPyPrintPreview, wxPrintPreview, PaintPage); -IMP_PYCALLBACK_BOOL_WXWINDC(wxPyPrintPreview, wxPrintPreview, DrawBlankPage); -IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, RenderPage); -IMP_PYCALLBACK_VOID_INT (wxPyPrintPreview, wxPrintPreview, SetZoom); -IMP_PYCALLBACK_BOOL_BOOL (wxPyPrintPreview, wxPrintPreview, Print); -IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling); +IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, SetCurrentPage); +IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, PaintPage); +IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, DrawBlankPage); +IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, RenderPage); +IMP_PYCALLBACK_VOID_INT (wxPyPrintPreview, wxPrintPreview, SetZoom); +IMP_PYCALLBACK_BOOL_BOOL (wxPyPrintPreview, wxPrintPreview, Print); +IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling); %} @@ -584,8 +619,8 @@ public: %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPrintPreview)" bool base_SetCurrentPage(int pageNum); - bool base_PaintPage(wxWindow *canvas, wxDC& dc); - bool base_DrawBlankPage(wxWindow *canvas, wxDC& dc); + bool base_PaintPage(wxPreviewCanvas *canvas, wxDC& dc); + bool base_DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc); bool base_RenderPage(int pageNum); void base_SetZoom(int percent); bool base_Print(bool interactive); @@ -609,7 +644,7 @@ public: : wxPreviewFrame(preview, parent, title, pos, size, style, name) {} - void SetPreviewCanvas(wxWindow* canvas) { m_previewCanvas = canvas; } + void SetPreviewCanvas(wxPreviewCanvas* canvas) { m_previewCanvas = canvas; } void SetControlBar(wxPreviewControlBar* bar) { m_controlBar = bar; } DEC_PYCALLBACK_VOID_(Initialize); @@ -640,7 +675,7 @@ public: %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPreviewFrame)" %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" - void SetPreviewCanvas(wxWindow* canvas); + void SetPreviewCanvas(wxPreviewCanvas* canvas); void SetControlBar(wxPreviewControlBar* bar); void base_Initialize(); diff --git a/wxPython/src/stattool.i b/wxPython/src/stattool.i index e2b4183a11..e89fa20891 100644 --- a/wxPython/src/stattool.i +++ b/wxPython/src/stattool.i @@ -91,6 +91,20 @@ enum wxToolBarToolStyle wxTOOL_STYLE_CONTROL }; +enum { + wxTB_HORIZONTAL, + wxTB_VERTICAL, + wxTB_3DBUTTONS, + wxTB_FLAT, + wxTB_DOCKABLE, + wxTB_NOICONS, + wxTB_TEXT, + wxTB_NODIVIDER, + wxTB_NOALIGN, + wxTB_HORZ_LAYOUT, + wxTB_HORZ_TEXT, +}; + class wxToolBarToolBase : public wxObject { @@ -382,6 +396,8 @@ public: } } + // returns tool pos, or wxNOT_FOUND if tool isn't found + int GetToolPos(int id) const; bool GetToolState(int id); bool GetToolEnabled(int id); diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index d63b8d5f36..ca44e8ddb5 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -228,7 +228,6 @@ public: void FitInside(); wxColour GetBackgroundColour(); - wxBorder GetBorder() const; //wxList& GetChildren(); %addmethods { @@ -385,7 +384,10 @@ public: bool Show(bool show=TRUE); bool TransferDataFromWindow(); bool TransferDataToWindow(); - void UpdateWindowUI(); + + // send wxUpdateUIEvents to this window, and children if recurse is TRUE + void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); + bool Validate(); %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt); @@ -459,6 +461,25 @@ public: void SetAcceleratorTable(const wxAcceleratorTable& accel); wxAcceleratorTable *GetAcceleratorTable(); + %addmethods { + // hot keys (system wide accelerators) + bool RegisterHotKey(int hotkeyId, int modifiers, int keycode) { +#if wxUSE_HOTKEY + return self->RegisterHotKey(hotkeyId, modifiers, keycode); +#else + return FALSE; +#endif + } + + bool UnregisterHotKey(int hotkeyId) { +#if wxUSE_HOTKEY + return self->UnregisterHotKey(hotkeyId); +#else + return FALSE; +#endif + } + } + #ifdef __WXMSW__ // A way to do the native draw first... Too bad it isn't in wxGTK too. void OnPaint(wxPaintEvent& event); @@ -486,6 +507,15 @@ public: void SetThemeEnabled(bool enable); bool GetThemeEnabled(); + + // get the window border style from the given flags: this is different from + // simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to + // translate wxBORDER_DEFAULT to something reasonable + %name(GetBorderFlags) wxBorder GetBorder(long flags) const; + + // get border for the flags of this window + wxBorder GetBorder() const; + }; @@ -716,6 +746,7 @@ public: int FindItem(const wxString& itemString); %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/); + wxMenuItem* FindItemByPosition(size_t position) const; wxString GetTitle(); void SetTitle(const wxString& title); diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index a81eccdf38..83d279eff5 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -53,9 +53,24 @@ //--------------------------------------------------------------------------- enum { - /* notebook control event types */ + // notebook control event types wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, + + // styles + wxNB_FIXEDWIDTH, + wxNB_TOP, + wxNB_LEFT, + wxNB_RIGHT, + wxNB_BOTTOM, + wxNB_MULTILINE, + + // hittest flags + wxNB_HITTEST_NOWHERE = 1, // not on tab + wxNB_HITTEST_ONICON = 2, // on icon + wxNB_HITTEST_ONLABEL = 4, // on label + wxNB_HITTEST_ONITEM = wxNB_HITTEST_ONICON | wxNB_HITTEST_ONLABEL, + }; @@ -92,45 +107,87 @@ public: %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreNotebook:val._setOORInfo(val)" - int GetPageCount(); - int SetSelection(int page); - void AdvanceSelection(bool forward = TRUE); - int GetSelection(); - bool SetPageText(int page, const wxString& text); - wxString GetPageText(int page) const; - void SetImageList(wxImageList* imageList); - void AssignImageList(wxImageList *imageList) ; + // get number of pages in the dialog + int GetPageCount() const; + + // get the panel which represents the given page + wxWindow *GetPage(int page); + + // get the currently selected page + int GetSelection() const; + + // set/get the title of a page + bool SetPageText(int page, const wxString& text); + wxString GetPageText(int page) const; + + // image list stuff: each page may have an image associated with it (all + // images belong to the same image list) + void SetImageList(wxImageList* imageList); + + // as SetImageList() but the notebook will take ownership of the image list + void AssignImageList(wxImageList* imageList); %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0" - wxImageList* GetImageList(); - int GetPageImage(int page); - bool SetPageImage(int page, int image); - int GetRowCount(); - - void SetPageSize(const wxSize& size); - void SetPadding(const wxSize& padding); - bool DeletePage(int page); - bool RemovePage(int page); - bool DeleteAllPages(); - bool AddPage(/*wxNotebookPage*/ wxWindow *page, - const wxString& text, - int select = FALSE, - int imageId = -1); - bool InsertPage(int index, - /*wxNotebookPage*/ wxWindow *page, - const wxString& text, - bool select = FALSE, - int imageId = -1); - /*wxNotebookPage*/ wxWindow *GetPage(int page); - - %addmethods { - void ResizeChildren() { - wxSizeEvent evt(self->GetClientSize()); - self->GetEventHandler()->ProcessEvent(evt); - } - } + // get pointer (may be NULL) to the associated image list + wxImageList* GetImageList() const; + + // sets/returns item's image index in the current image list + int GetPageImage(int page) const; + bool SetPageImage(int page, int nImage); + + // get the number of rows for a control with wxNB_MULTILINE style (not all + // versions support it - they will always return 1 then) + int GetRowCount() const; + + // set the size (the same for all pages) + void SetPageSize(const wxSize& size); + + // set the padding between tabs (in pixels) + void SetPadding(const wxSize& padding); + + // set the size of the tabs for wxNB_FIXEDWIDTH controls + void SetTabSize(const wxSize& sz); + + // calculate the size of the notebook from the size of its page + wxSize CalcSizeFromPage(const wxSize& sizePage) const; + + + // remove one page from the notebook and delete it + bool DeletePage(int page); + + // remove one page from the notebook, without deleting it + bool RemovePage(int page); + + // remove all pages and delete them + bool DeleteAllPages(); + + // adds a new page to the notebook (it will be deleted by the notebook, + // don't delete it yourself) and make it the current one if select + bool AddPage(wxWindow *page, + const wxString& text, + bool telect = FALSE, + int imageId = -1); + + // the same as AddPage(), but adds the page at the specified position + bool InsertPage(int index, + wxWindow *page, + const wxString& text, + bool select = FALSE, + int imageId = -1); + // set the currently selected page, return the index of the previously + // selected one (or -1 on error) + // + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(int page); + + // hit test, returns which tab is hit and, optionally, where (icon, label) + // (not implemented on all platforms) + int HitTest(const wxPoint& pt, long* OUTPUT); + + // cycle thru the tabs + void AdvanceSelection(bool forward = TRUE); }; @@ -143,16 +200,25 @@ enum { wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, wxEVT_COMMAND_SPLITTER_UNSPLIT, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, -}; - -enum -{ wxSPLIT_HORIZONTAL, wxSPLIT_VERTICAL, wxSPLIT_DRAG_NONE, wxSPLIT_DRAG_DRAGGING, - wxSPLIT_DRAG_LEFT_DOWN + wxSPLIT_DRAG_LEFT_DOWN, + + wxSP_VERTICAL, + wxSP_HORIZONTAL, + wxSP_ARROW_KEYS, + wxSP_WRAP, + wxSP_NOBORDER, + wxSP_3D, + wxSP_3DSASH, + wxSP_3DBORDER, + wxSP_FULLSASH, + wxSP_BORDER, + wxSP_LIVE_UPDATE, + wxSP_PERMIT_UNSPLIT }; @@ -260,6 +326,7 @@ public: //--------------------------------------------------------------------------- +// TODO: This should be usable on wxGTK now too... #ifdef __WXMSW__ enum { @@ -273,6 +340,13 @@ enum { }; +class wxTaskBarIconEvent : public wxEvent +{ +public: + wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon); +}; + + class wxTaskBarIcon : public wxEvtHandler { public: wxTaskBarIcon(); @@ -295,6 +369,33 @@ public: bool IsIconInstalled(); bool IsOK(); }; + + + +%pragma(python) code = " +def EVT_TASKBAR_MOVE(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func) + +def EVT_TASKBAR_LEFT_DOWN(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func) + +def EVT_TASKBAR_LEFT_UP(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func) + +def EVT_TASKBAR_RIGHT_DOWN(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func) + +def EVT_TASKBAR_RIGHT_UP(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func) + +def EVT_TASKBAR_LEFT_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func) + +def EVT_TASKBAR_RIGHT_DCLICK(win, func): + win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func) +" + + #endif //--------------------------------------------------------------------------- diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index e63443348f..1781723e8b 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -318,7 +318,8 @@ public: int id = -1, const wxString& title = wxEmptyString, const wxBitmap& bitmap = wxNullBitmap, - const wxPoint& pos = wxDefaultPosition); + const wxPoint& pos = wxDefaultPosition, + long style = wxDEFAULT_DIALOG_STYLE); %name(wxPreWizard)wxWizard(); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" @@ -358,6 +359,13 @@ public: // default) virtual void FitToPage(const wxWizardPage *firstPage); + // Adding pages to page area sizer enlarges wizard + virtual wxSizer *GetPageAreaSizer() const; + + // Set border around page area. Default is 0 if you add at least one + // page to GetPageAreaSizer and 5 if you don't. + virtual void SetBorder(int border); + // is the wizard running? bool IsRunning() const { return m_page != NULL; } -- 2.45.2