From: Robin Dunn Date: Tue, 13 Nov 2001 03:18:00 +0000 (+0000) Subject: Various other tweaks and updates X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/98624b49d3abd7ebc1d5f8df4209f563b3e3323f?hp=25b00b4e8cde9aed9d19746e82bf5c0200f5699b Various other tweaks and updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/wxSingleChoiceDialog.py b/wxPython/demo/wxSingleChoiceDialog.py index 6e9c3a3af9..df2d2b1b0e 100644 --- a/wxPython/demo/wxSingleChoiceDialog.py +++ b/wxPython/demo/wxSingleChoiceDialog.py @@ -6,7 +6,7 @@ from wxPython.wx import * def runTest(frame, nb, log): dlg = wxSingleChoiceDialog(frame, 'Test Single Choice', 'The Caption', ['zero', 'one', 'two', 'three', 'four', 'five', - 'six', 'seven', 'eight']) + 'six', 'seven', 'eight'], wxOK|wxCANCEL) if dlg.ShowModal() == wxID_OK: log.WriteText('You selected: %s\n' % dlg.GetStringSelection()) dlg.Destroy() diff --git a/wxPython/samples/doodle/.cvsignore b/wxPython/samples/doodle/.cvsignore new file mode 100644 index 0000000000..9d0b71a3c7 --- /dev/null +++ b/wxPython/samples/doodle/.cvsignore @@ -0,0 +1,2 @@ +build +dist diff --git a/wxPython/samples/doodle/README.txt b/wxPython/samples/doodle/README.txt index 4fb087ca60..f4c80c50e7 100644 --- a/wxPython/samples/doodle/README.txt +++ b/wxPython/samples/doodle/README.txt @@ -19,7 +19,7 @@ and much more. this command to build the .exe and collect the other needed files: - python setup.py py2exe + python setup.py py2exe -w superdoodle.iss An InnoSetup script to build a self-installer of diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index dc6294feaa..f209d1d1c6 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -520,6 +520,9 @@ public: const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; const wxFont& GetFont() const; + + // returns false if we have any attributes set, true otherwise + bool IsDefault(); }; @@ -544,48 +547,80 @@ public: %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreTextCtrl:val._setOORInfo(val)" + + wxString GetValue() const; + void SetValue(const wxString& value); + + int GetLineLength(long lineNo) const; + wxString GetLineText(long lineNo) const; + int GetNumberOfLines() const; + + bool IsModified() const; + bool IsEditable() const; + + // If the return values from and to are the same, there is no selection. + void GetSelection(long* OUTPUT, long* OUTPUT) const; + void Clear(); - void Copy(); - void Cut(); - void DiscardEdits(); - long GetInsertionPoint(); - long GetLastPosition(); - int GetLineLength(long lineNo); - wxString GetLineText(long lineNo); - int GetNumberOfLines(); - wxString GetValue(); - bool IsModified(); - bool LoadFile(const wxString& filename); - void Paste(); - void PositionToXY(long pos, long *OUTPUT, long *OUTPUT); - void Remove(long from, long to); void Replace(long from, long to, const wxString& value); - bool SaveFile(const wxString& filename); - void SetEditable(bool editable); - void SetInsertionPoint(long pos); - void SetInsertionPointEnd(); - void SetSelection(long from, long to); - void SetValue(const wxString& value); - void ShowPosition(long pos); + void Remove(long from, long to); + + // load/save the controls contents from/to the file + bool LoadFile(const wxString& file); + bool SaveFile(const wxString& file = wxEmptyString); + + // clears the dirty flag + void DiscardEdits(); + + // set the max number of characters which may be entered in a single line + // text control + void SetMaxLength(unsigned long len); + + // writing text inserts it at the current position, appending always + // inserts it at the end void WriteText(const wxString& text); void AppendText(const wxString& text); - long XYToPosition(long x, long y); - - bool CanCopy(); - bool CanCut(); - bool CanPaste(); - bool CanRedo(); - bool CanUndo(); - void GetSelection(long* OUTPUT, long* OUTPUT); - bool IsEditable(); - void Undo(); - void Redo(); + // text control under some platforms supports the text styles: these + // methods allow to apply the given text style to the given selection or to + // set/get the style which will be used for all appended text bool SetStyle(long start, long end, const wxTextAttr& style); bool SetDefaultStyle(const wxTextAttr& style); const wxTextAttr& GetDefaultStyle() const; - void SetMaxLength(unsigned long len); + // 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 + // which represent column and line. + long XYToPosition(long x, long y) const; + bool PositionToXY(long pos, long *OUTPUT, long *OUTPUT) const; + + void ShowPosition(long pos); + + // Clipboard operations + void Copy(); + void Cut(); + void Paste(); + + bool CanCopy() const; + bool CanCut() const; + bool CanPaste() const; + + // Undo/redo + void Undo(); + void Redo(); + + bool CanUndo() const; + bool CanRedo() const; + + // Insertion point + void SetInsertionPoint(long pos); + void SetInsertionPointEnd(); + long GetInsertionPoint() const; + long GetLastPosition() const; + + void SetSelection(long from, long to); + void SelectAll(); + void SetEditable(bool editable); %addmethods { void write(const wxString& text) { diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index 48cbbb569b..46323e7589 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -362,6 +362,10 @@ enum wxFontEncoding wxFONTENCODING_CP866, // and another one // and for Windows wxFONTENCODING_CP874, // WinThai + wxFONTENCODING_CP932, // Japanese (shift-JIS) + wxFONTENCODING_CP936, // Chiniese simplified (GB) + wxFONTENCODING_CP949, // Korean (Hangul charset) + wxFONTENCODING_CP950, // Chinese (traditional - Big5) wxFONTENCODING_CP1250, // WinLatin2 wxFONTENCODING_CP1251, // WinCyrillic wxFONTENCODING_CP1252, // WinLatin1 diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index 84ea0870bb..f5c909de0e 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -5963,6 +5963,34 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxTextAttr_IsDefault(_swigobj) (_swigobj->IsDefault()) +static PyObject *_wrap_wxTextAttr_IsDefault(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_IsDefault",_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_IsDefault. Expected _wxTextAttr_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxTextAttr_IsDefault(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxTextCtrlTowxControl(void *ptr) { wxTextCtrl *src; wxControl *dest; @@ -6155,196 +6183,231 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxTextCtrl_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetValue(_swigobj) (_swigobj->GetValue()) +static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Clear",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetValue",_kwnames,&_argo0)) 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_Clear. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetValue. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Clear(_arg0); + _result = new wxString (wxTextCtrl_GetValue(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} return _resultobj; } -#define wxTextCtrl_Copy(_swigobj) (_swigobj->Copy()) -static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","value", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Copy",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_SetValue",_kwnames,&_argo0,&_obj1)) 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_Copy. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetValue. Expected _wxTextCtrl_p."); return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Copy(_arg0); + wxTextCtrl_SetValue(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxTextCtrl_Cut(_swigobj) (_swigobj->Cut()) -static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetLineLength(_swigobj,_swigarg0) (_swigobj->GetLineLength(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + int _result; wxTextCtrl * _arg0; + long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","lineNo", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Cut",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_GetLineLength",_kwnames,&_argo0,&_arg1)) 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_Cut. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLineLength. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Cut(_arg0); + _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_DiscardEdits(_swigobj) (_swigobj->DiscardEdits()) -static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetLineText(_swigobj,_swigarg0) (_swigobj->GetLineText(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxTextCtrl * _arg0; + long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","lineNo", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_DiscardEdits",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_GetLineText",_kwnames,&_argo0,&_arg1)) 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_DiscardEdits. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLineText. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_DiscardEdits(_arg0); + _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} return _resultobj; } -#define wxTextCtrl_GetInsertionPoint(_swigobj) (_swigobj->GetInsertionPoint()) -static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetNumberOfLines(_swigobj) (_swigobj->GetNumberOfLines()) +static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + int _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetInsertionPoint",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetNumberOfLines",_kwnames,&_argo0)) 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_GetInsertionPoint. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetNumberOfLines. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); + _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_GetLastPosition(_swigobj) (_swigobj->GetLastPosition()) -static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_IsModified(_swigobj) (_swigobj->IsModified()) +static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + bool _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetLastPosition",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_IsModified",_kwnames,&_argo0)) 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_GetLastPosition. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsModified. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxTextCtrl_GetLastPosition(_arg0); + _result = (bool )wxTextCtrl_IsModified(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_GetLineLength(_swigobj,_swigarg0) (_swigobj->GetLineLength(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_IsEditable(_swigobj) (_swigobj->IsEditable()) +static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxTextCtrl * _arg0; - long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","lineNo", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_GetLineLength",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_IsEditable",_kwnames,&_argo0)) 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_GetLineLength. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsEditable. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); + _result = (bool )wxTextCtrl_IsEditable(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -6352,126 +6415,163 @@ static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, return _resultobj; } -#define wxTextCtrl_GetLineText(_swigobj,_swigarg0) (_swigobj->GetLineText(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSelection(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxTextCtrl * _arg0; - long _arg1; + long * _arg1; + long temp; + long * _arg2; + long temp0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","lineNo", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_GetLineText",_kwnames,&_argo0,&_arg1)) +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetSelection",_kwnames,&_argo0)) 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_GetLineText. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetSelection. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); + wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); } { - delete _result; + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); } return _resultobj; } -#define wxTextCtrl_GetNumberOfLines(_swigobj) (_swigobj->GetNumberOfLines()) -static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Clear(_swigobj) (_swigobj->Clear()) +static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetNumberOfLines",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Clear",_kwnames,&_argo0)) 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_GetNumberOfLines. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Clear. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); + wxTextCtrl_Clear(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTextCtrl_GetValue(_swigobj) (_swigobj->GetValue()) -static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxTextCtrl * _arg0; + long _arg1; + long _arg2; + wxString * _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","from","to","value", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetValue",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO:wxTextCtrl_Replace",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) 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_GetValue. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Replace. Expected _wxTextCtrl_p."); return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxTextCtrl_GetValue(_arg0)); + wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj3) + delete _arg3; } return _resultobj; } -#define wxTextCtrl_IsModified(_swigobj) (_swigobj->IsModified()) -static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; +#define wxTextCtrl_Remove(_swigobj,_swigarg0,_swigarg1) (_swigobj->Remove(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; wxTextCtrl * _arg0; + long _arg1; + long _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","from","to", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_IsModified",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_Remove",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsModified. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Remove. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_IsModified(_arg0); + wxTextCtrl_Remove(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -6483,7 +6583,7 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","filename", NULL }; + char *_kwnames[] = { "self","file", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_LoadFile",_kwnames,&_argo0,&_obj1)) @@ -6527,105 +6627,108 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxTextCtrl_Paste(_swigobj) (_swigobj->Paste()) -static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SaveFile(_swigobj,_swigarg0) (_swigobj->SaveFile(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; + wxString * _arg1 = (wxString *) &wxEmptyString; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","file", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Paste",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxTextCtrl_SaveFile",_kwnames,&_argo0,&_obj1)) 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_Paste. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SaveFile. Expected _wxTextCtrl_p."); return NULL; } } + if (_obj1) +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Paste(_arg0); + _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxTextCtrl_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_DiscardEdits(_swigobj) (_swigobj->DiscardEdits()) +static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; - long _arg1; - long * _arg2; - long temp; - long * _arg3; - long temp0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pos", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; -{ - _arg2 = &temp; -} -{ - _arg3 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_PositionToXY",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_DiscardEdits",_kwnames,&_argo0)) 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_PositionToXY. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_DiscardEdits. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + wxTextCtrl_DiscardEdits(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg3)); - _resultobj = t_output_helper(_resultobj, o); -} return _resultobj; } -#define wxTextCtrl_Remove(_swigobj,_swigarg0,_swigarg1) (_swigobj->Remove(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetMaxLength(_swigobj,_swigarg0) (_swigobj->SetMaxLength(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SetMaxLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; - long _arg1; - long _arg2; + unsigned long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","from","to", NULL }; + char *_kwnames[] = { "self","len", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_Remove",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_SetMaxLength",_kwnames,&_argo0,&_arg1)) 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_Remove. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetMaxLength. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Remove(_arg0,_arg1,_arg2); + wxTextCtrl_SetMaxLength(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -6634,77 +6737,74 @@ static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxTextCtrl_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_WriteText(_swigobj,_swigarg0) (_swigobj->WriteText(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; - long _arg1; - long _arg2; - wxString * _arg3; + wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj3 = 0; - char *_kwnames[] = { "self","from","to","value", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO:wxTextCtrl_Replace",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_WriteText",_kwnames,&_argo0,&_obj1)) 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_Replace. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_WriteText. Expected _wxTextCtrl_p."); return NULL; } } { #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); + _arg1 = new wxString(tmpPtr, tmpSize); #else - if (!PyString_Check(_obj3)) { + if (!PyString_Check(_obj1)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); #endif } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); + wxTextCtrl_WriteText(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; { - if (_obj3) - delete _arg3; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxTextCtrl_SaveFile(_swigobj,_swigarg0) (_swigobj->SaveFile(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_AppendText(_swigobj,_swigarg0) (_swigobj->AppendText(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxTextCtrl * _arg0; wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","filename", NULL }; + char *_kwnames[] = { "self","text", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_SaveFile",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_AppendText",_kwnames,&_argo0,&_obj1)) 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_SaveFile. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_AppendText. Expected _wxTextCtrl_p."); return NULL; } } @@ -6728,11 +6828,12 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); + wxTextCtrl_AppendText(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; { if (_obj1) delete _arg1; @@ -6740,172 +6841,193 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxTextCtrl_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetStyle(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetStyle(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; - bool _arg1; + long _arg1; + long _arg2; + wxTextAttr * _arg3; PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","editable", NULL }; + PyObject * _argo3 = 0; + char *_kwnames[] = { "self","start","end","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextCtrl_SetEditable",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO:wxTextCtrl_SetStyle",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) 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_SetEditable. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetStyle. Expected _wxTextCtrl_p."); + return NULL; + } + } + if (_argo3) { + if (_argo3 == Py_None) { _arg3 = NULL; } + else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxTextCtrl_SetStyle. Expected _wxTextAttr_p."); return NULL; } } - _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetEditable(_arg0,_arg1); + _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_SetInsertionPoint(_swigobj,_swigarg0) (_swigobj->SetInsertionPoint(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetDefaultStyle(_swigobj,_swigarg0) (_swigobj->SetDefaultStyle(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; - long _arg1; + wxTextAttr * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pos", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_SetInsertionPoint",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_SetDefaultStyle",_kwnames,&_argo0,&_argo1)) 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_SetInsertionPoint. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetDefaultStyle. Expected _wxTextCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_SetDefaultStyle. Expected _wxTextAttr_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); + _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_SetInsertionPointEnd(_swigobj) (_swigobj->SetInsertionPointEnd()) -static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetDefaultStyle(_swigobj) (_swigobj->GetDefaultStyle()) +static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxTextAttr * _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_SetInsertionPointEnd",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetDefaultStyle",_kwnames,&_argo0)) 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_SetInsertionPointEnd. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetDefaultStyle. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetInsertionPointEnd(_arg0); + const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); + _result = (wxTextAttr *) &_result_ref; wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } -#define wxTextCtrl_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_XYToPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->XYToPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + long _result; wxTextCtrl * _arg0; long _arg1; long _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","from","to", NULL }; + char *_kwnames[] = { "self","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_SetSelection",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_XYToPosition",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetSelection. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_XYToPosition. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxTextCtrl_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; - wxString * _arg1; + long _arg1; + long * _arg2; + long temp; + long * _arg3; + long temp0; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","value", NULL }; + char *_kwnames[] = { "self","pos", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_SetValue",_kwnames,&_argo0,&_obj1)) +{ + _arg2 = &temp; +} +{ + _arg3 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_PositionToXY",_kwnames,&_argo0,&_arg1)) 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_SetValue. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_PositionToXY. Expected _wxTextCtrl_p."); return NULL; } } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetValue(_arg0,*_arg1); + _result = (bool )wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); { - if (_obj1) - delete _arg1; + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); } return _resultobj; } @@ -6939,137 +7061,87 @@ static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args, P return _resultobj; } -#define wxTextCtrl_WriteText(_swigobj,_swigarg0) (_swigobj->WriteText(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Copy(_swigobj) (_swigobj->Copy()) +static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","text", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_WriteText",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Copy",_kwnames,&_argo0)) 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_WriteText. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Copy. Expected _wxTextCtrl_p."); return NULL; } } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_WriteText(_arg0,*_arg1); + wxTextCtrl_Copy(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} return _resultobj; } -#define wxTextCtrl_AppendText(_swigobj,_swigarg0) (_swigobj->AppendText(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Cut(_swigobj) (_swigobj->Cut()) +static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","text", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_AppendText",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Cut",_kwnames,&_argo0)) 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_AppendText. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Cut. Expected _wxTextCtrl_p."); return NULL; } } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_AppendText(_arg0,*_arg1); + wxTextCtrl_Cut(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} return _resultobj; } -#define wxTextCtrl_XYToPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->XYToPosition(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Paste(_swigobj) (_swigobj->Paste()) +static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; wxTextCtrl * _arg0; - long _arg1; - long _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_XYToPosition",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Paste",_kwnames,&_argo0)) 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_XYToPosition. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Paste. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); + wxTextCtrl_Paste(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -7157,112 +7229,92 @@ static PyObject *_wrap_wxTextCtrl_CanPaste(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxTextCtrl_CanRedo(_swigobj) (_swigobj->CanRedo()) -static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Undo(_swigobj) (_swigobj->Undo()) +static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_CanRedo",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Undo",_kwnames,&_argo0)) 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_CanRedo. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Undo. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanRedo(_arg0); + wxTextCtrl_Undo(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTextCtrl_CanUndo(_swigobj) (_swigobj->CanUndo()) -static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_Redo(_swigobj) (_swigobj->Redo()) +static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_CanUndo",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Redo",_kwnames,&_argo0)) 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_CanUndo. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_Redo. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanUndo(_arg0); + wxTextCtrl_Redo(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTextCtrl_GetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSelection(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_CanUndo(_swigobj) (_swigobj->CanUndo()) +static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetSelection",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_CanUndo",_kwnames,&_argo0)) 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_GetSelection. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_CanUndo. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); + _result = (bool )wxTextCtrl_CanUndo(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_IsEditable(_swigobj) (_swigobj->IsEditable()) -static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_CanRedo(_swigobj) (_swigobj->CanRedo()) +static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxTextCtrl * _arg0; @@ -7270,18 +7322,18 @@ static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyO char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_IsEditable",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_CanRedo",_kwnames,&_argo0)) 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_IsEditable. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_CanRedo. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_IsEditable(_arg0); + _result = (bool )wxTextCtrl_CanRedo(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -7289,26 +7341,27 @@ static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxTextCtrl_Undo(_swigobj) (_swigobj->Undo()) -static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetInsertionPoint(_swigobj,_swigarg0) (_swigobj->SetInsertionPoint(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; + long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","pos", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Undo",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_SetInsertionPoint",_kwnames,&_argo0,&_arg1)) 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_Undo. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetInsertionPoint. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Undo(_arg0); + wxTextCtrl_SetInsertionPoint(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -7317,26 +7370,26 @@ static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxTextCtrl_Redo(_swigobj) (_swigobj->Redo()) -static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetInsertionPointEnd(_swigobj) (_swigobj->SetInsertionPointEnd()) +static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_Redo",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_SetInsertionPointEnd",_kwnames,&_argo0)) 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_Redo. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetInsertionPointEnd. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Redo(_arg0); + wxTextCtrl_SetInsertionPointEnd(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -7345,139 +7398,143 @@ static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxTextCtrl_SetStyle(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetStyle(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetInsertionPoint(_swigobj) (_swigobj->GetInsertionPoint()) +static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + long _result; wxTextCtrl * _arg0; - long _arg1; - long _arg2; - wxTextAttr * _arg3; PyObject * _argo0 = 0; - PyObject * _argo3 = 0; - char *_kwnames[] = { "self","start","end","style", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO:wxTextCtrl_SetStyle",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetInsertionPoint",_kwnames,&_argo0)) 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_SetStyle. Expected _wxTextCtrl_p."); - return NULL; - } - } - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTextAttr_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxTextCtrl_SetStyle. Expected _wxTextAttr_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetInsertionPoint. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); + _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxTextCtrl_SetDefaultStyle(_swigobj,_swigarg0) (_swigobj->SetDefaultStyle(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_GetLastPosition(_swigobj) (_swigobj->GetLastPosition()) +static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + long _result; wxTextCtrl * _arg0; - wxTextAttr * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","style", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_SetDefaultStyle",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetLastPosition",_kwnames,&_argo0)) 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_SetDefaultStyle. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetLastPosition. Expected _wxTextCtrl_p."); return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_SetDefaultStyle. Expected _wxTextAttr_p."); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxTextCtrl_GetLastPosition(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxTextCtrl_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _arg0; + long _arg1; + long _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","from","to", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_SetSelection",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetSelection. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); + wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTextCtrl_GetDefaultStyle(_swigobj) (_swigobj->GetDefaultStyle()) -static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SelectAll(_swigobj) (_swigobj->SelectAll()) +static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTextAttr * _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetDefaultStyle",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_SelectAll",_kwnames,&_argo0)) 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_GetDefaultStyle. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SelectAll. Expected _wxTextCtrl_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); - _result = (wxTextAttr *) &_result_ref; + wxTextCtrl_SelectAll(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextAttr_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxTextCtrl_SetMaxLength(_swigobj,_swigarg0) (_swigobj->SetMaxLength(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetMaxLength(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _arg0; - unsigned long _arg1; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","len", NULL }; + int tempbool1; + char *_kwnames[] = { "self","editable", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxTextCtrl_SetMaxLength",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextCtrl_SetEditable",_kwnames,&_argo0,&tempbool1)) 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_SetMaxLength. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetEditable. Expected _wxTextCtrl_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetMaxLength(_arg0,_arg1); + wxTextCtrl_SetEditable(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -11094,48 +11151,50 @@ static PyMethodDef controlscMethods[] = { { "new_wxPreScrollBar", (PyCFunction) _wrap_new_wxPreScrollBar, METH_VARARGS | METH_KEYWORDS }, { "new_wxScrollBar", (PyCFunction) _wrap_new_wxScrollBar, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_write", (PyCFunction) _wrap_wxTextCtrl_write, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_SetMaxLength", (PyCFunction) _wrap_wxTextCtrl_SetMaxLength, 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 }, + { "wxTextCtrl_SetEditable", (PyCFunction) _wrap_wxTextCtrl_SetEditable, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_SelectAll", (PyCFunction) _wrap_wxTextCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_SetSelection", (PyCFunction) _wrap_wxTextCtrl_SetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetLastPosition", (PyCFunction) _wrap_wxTextCtrl_GetLastPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetInsertionPoint", (PyCFunction) _wrap_wxTextCtrl_GetInsertionPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_SetInsertionPointEnd", (PyCFunction) _wrap_wxTextCtrl_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_SetInsertionPoint", (PyCFunction) _wrap_wxTextCtrl_SetInsertionPoint, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_CanRedo", (PyCFunction) _wrap_wxTextCtrl_CanRedo, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_CanUndo", (PyCFunction) _wrap_wxTextCtrl_CanUndo, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Redo", (PyCFunction) _wrap_wxTextCtrl_Redo, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Undo", (PyCFunction) _wrap_wxTextCtrl_Undo, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_IsEditable", (PyCFunction) _wrap_wxTextCtrl_IsEditable, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_GetSelection", (PyCFunction) _wrap_wxTextCtrl_GetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_CanUndo", (PyCFunction) _wrap_wxTextCtrl_CanUndo, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_CanRedo", (PyCFunction) _wrap_wxTextCtrl_CanRedo, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_CanPaste", (PyCFunction) _wrap_wxTextCtrl_CanPaste, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_CanCut", (PyCFunction) _wrap_wxTextCtrl_CanCut, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_CanCopy", (PyCFunction) _wrap_wxTextCtrl_CanCopy, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Paste", (PyCFunction) _wrap_wxTextCtrl_Paste, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Cut", (PyCFunction) _wrap_wxTextCtrl_Cut, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Copy", (PyCFunction) _wrap_wxTextCtrl_Copy, METH_VARARGS | METH_KEYWORDS }, + { "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_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 }, { "wxTextCtrl_AppendText", (PyCFunction) _wrap_wxTextCtrl_AppendText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_WriteText", (PyCFunction) _wrap_wxTextCtrl_WriteText, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_ShowPosition", (PyCFunction) _wrap_wxTextCtrl_ShowPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_SetValue", (PyCFunction) _wrap_wxTextCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_SetSelection", (PyCFunction) _wrap_wxTextCtrl_SetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_SetInsertionPointEnd", (PyCFunction) _wrap_wxTextCtrl_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_SetInsertionPoint", (PyCFunction) _wrap_wxTextCtrl_SetInsertionPoint, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_SetEditable", (PyCFunction) _wrap_wxTextCtrl_SetEditable, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_SetMaxLength", (PyCFunction) _wrap_wxTextCtrl_SetMaxLength, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_DiscardEdits", (PyCFunction) _wrap_wxTextCtrl_DiscardEdits, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SaveFile", (PyCFunction) _wrap_wxTextCtrl_SaveFile, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_Replace", (PyCFunction) _wrap_wxTextCtrl_Replace, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_Remove", (PyCFunction) _wrap_wxTextCtrl_Remove, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_PositionToXY", (PyCFunction) _wrap_wxTextCtrl_PositionToXY, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_Paste", (PyCFunction) _wrap_wxTextCtrl_Paste, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_LoadFile", (PyCFunction) _wrap_wxTextCtrl_LoadFile, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Remove", (PyCFunction) _wrap_wxTextCtrl_Remove, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Replace", (PyCFunction) _wrap_wxTextCtrl_Replace, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_Clear", (PyCFunction) _wrap_wxTextCtrl_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetSelection", (PyCFunction) _wrap_wxTextCtrl_GetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_IsEditable", (PyCFunction) _wrap_wxTextCtrl_IsEditable, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_IsModified", (PyCFunction) _wrap_wxTextCtrl_IsModified, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_GetValue", (PyCFunction) _wrap_wxTextCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetNumberOfLines", (PyCFunction) _wrap_wxTextCtrl_GetNumberOfLines, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineText", (PyCFunction) _wrap_wxTextCtrl_GetLineText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineLength", (PyCFunction) _wrap_wxTextCtrl_GetLineLength, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_GetLastPosition", (PyCFunction) _wrap_wxTextCtrl_GetLastPosition, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_GetInsertionPoint", (PyCFunction) _wrap_wxTextCtrl_GetInsertionPoint, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_DiscardEdits", (PyCFunction) _wrap_wxTextCtrl_DiscardEdits, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_Cut", (PyCFunction) _wrap_wxTextCtrl_Cut, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_Copy", (PyCFunction) _wrap_wxTextCtrl_Copy, METH_VARARGS | METH_KEYWORDS }, - { "wxTextCtrl_Clear", (PyCFunction) _wrap_wxTextCtrl_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_SetValue", (PyCFunction) _wrap_wxTextCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetValue", (PyCFunction) _wrap_wxTextCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreTextCtrl", (PyCFunction) _wrap_new_wxPreTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextCtrl", (PyCFunction) _wrap_new_wxTextCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_IsDefault", (PyCFunction) _wrap_wxTextAttr_IsDefault, 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 }, diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index 153ebc99a2..a5ba51fdd9 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -591,6 +591,9 @@ class wxTextAttrPtr : val = apply(controlsc.wxTextAttr_GetFont,(self,) + _args, _kwargs) if val: val = wxFontPtr(val) return val + def IsDefault(self, *_args, **_kwargs): + val = apply(controlsc.wxTextAttr_IsDefault,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxTextAttr(wxTextAttrPtr): @@ -608,23 +611,11 @@ class wxTextCtrlPtr(wxControlPtr): def Create(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_Create,(self,) + _args, _kwargs) return val - def Clear(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Clear,(self,) + _args, _kwargs) - return val - def Copy(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Copy,(self,) + _args, _kwargs) - return val - def Cut(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Cut,(self,) + _args, _kwargs) - return val - def DiscardEdits(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_DiscardEdits,(self,) + _args, _kwargs) - return val - def GetInsertionPoint(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_GetInsertionPoint,(self,) + _args, _kwargs) + def GetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_GetValue,(self,) + _args, _kwargs) return val - def GetLastPosition(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_GetLastPosition,(self,) + _args, _kwargs) + def SetValue(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetValue,(self,) + _args, _kwargs) return val def GetLineLength(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_GetLineLength,(self,) + _args, _kwargs) @@ -635,47 +626,35 @@ class wxTextCtrlPtr(wxControlPtr): def GetNumberOfLines(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_GetNumberOfLines,(self,) + _args, _kwargs) return val - def GetValue(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_GetValue,(self,) + _args, _kwargs) - return val def IsModified(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_IsModified,(self,) + _args, _kwargs) return val - def LoadFile(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_LoadFile,(self,) + _args, _kwargs) + def IsEditable(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_IsEditable,(self,) + _args, _kwargs) return val - def Paste(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Paste,(self,) + _args, _kwargs) + def GetSelection(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_GetSelection,(self,) + _args, _kwargs) return val - def PositionToXY(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_PositionToXY,(self,) + _args, _kwargs) + def Clear(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Clear,(self,) + _args, _kwargs) + return val + def Replace(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Replace,(self,) + _args, _kwargs) return val def Remove(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_Remove,(self,) + _args, _kwargs) return val - def Replace(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Replace,(self,) + _args, _kwargs) + def LoadFile(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_LoadFile,(self,) + _args, _kwargs) return val def SaveFile(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_SaveFile,(self,) + _args, _kwargs) return val - def SetEditable(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetEditable,(self,) + _args, _kwargs) - return val - def SetInsertionPoint(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetInsertionPoint,(self,) + _args, _kwargs) - return val - def SetInsertionPointEnd(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetInsertionPointEnd,(self,) + _args, _kwargs) - return val - def SetSelection(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetSelection,(self,) + _args, _kwargs) - return val - def SetValue(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetValue,(self,) + _args, _kwargs) + def DiscardEdits(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_DiscardEdits,(self,) + _args, _kwargs) return val - def ShowPosition(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_ShowPosition,(self,) + _args, _kwargs) + def SetMaxLength(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetMaxLength,(self,) + _args, _kwargs) return val def WriteText(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_WriteText,(self,) + _args, _kwargs) @@ -683,9 +662,34 @@ class wxTextCtrlPtr(wxControlPtr): def AppendText(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_AppendText,(self,) + _args, _kwargs) return val + def SetStyle(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetStyle,(self,) + _args, _kwargs) + return val + def SetDefaultStyle(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetDefaultStyle,(self,) + _args, _kwargs) + return val + def GetDefaultStyle(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_GetDefaultStyle,(self,) + _args, _kwargs) + if val: val = wxTextAttrPtr(val) + return val def XYToPosition(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_XYToPosition,(self,) + _args, _kwargs) return val + def PositionToXY(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_PositionToXY,(self,) + _args, _kwargs) + return val + def ShowPosition(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_ShowPosition,(self,) + _args, _kwargs) + return val + def Copy(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Copy,(self,) + _args, _kwargs) + return val + def Cut(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Cut,(self,) + _args, _kwargs) + return val + def Paste(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Paste,(self,) + _args, _kwargs) + return val def CanCopy(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_CanCopy,(self,) + _args, _kwargs) return val @@ -695,36 +699,38 @@ class wxTextCtrlPtr(wxControlPtr): def CanPaste(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_CanPaste,(self,) + _args, _kwargs) return val - def CanRedo(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_CanRedo,(self,) + _args, _kwargs) + def Undo(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Undo,(self,) + _args, _kwargs) + return val + def Redo(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Redo,(self,) + _args, _kwargs) return val def CanUndo(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_CanUndo,(self,) + _args, _kwargs) return val - def GetSelection(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_GetSelection,(self,) + _args, _kwargs) + def CanRedo(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_CanRedo,(self,) + _args, _kwargs) return val - def IsEditable(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_IsEditable,(self,) + _args, _kwargs) + def SetInsertionPoint(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetInsertionPoint,(self,) + _args, _kwargs) return val - def Undo(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Undo,(self,) + _args, _kwargs) + def SetInsertionPointEnd(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetInsertionPointEnd,(self,) + _args, _kwargs) return val - def Redo(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_Redo,(self,) + _args, _kwargs) + def GetInsertionPoint(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_GetInsertionPoint,(self,) + _args, _kwargs) return val - def SetStyle(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetStyle,(self,) + _args, _kwargs) + def GetLastPosition(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_GetLastPosition,(self,) + _args, _kwargs) return val - def SetDefaultStyle(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetDefaultStyle,(self,) + _args, _kwargs) + def SetSelection(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetSelection,(self,) + _args, _kwargs) return val - def GetDefaultStyle(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_GetDefaultStyle,(self,) + _args, _kwargs) - if val: val = wxTextAttrPtr(val) + def SelectAll(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SelectAll,(self,) + _args, _kwargs) return val - def SetMaxLength(self, *_args, **_kwargs): - val = apply(controlsc.wxTextCtrl_SetMaxLength,(self,) + _args, _kwargs) + def SetEditable(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_SetEditable,(self,) + _args, _kwargs) return val def write(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_write,(self,) + _args, _kwargs) diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 92966e3144..0f17d0f885 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -12661,6 +12661,10 @@ SWIGEXPORT(void) initgdic() { PyDict_SetItemString(d,"wxFONTENCODING_CP855", PyInt_FromLong((long) wxFONTENCODING_CP855)); PyDict_SetItemString(d,"wxFONTENCODING_CP866", PyInt_FromLong((long) wxFONTENCODING_CP866)); PyDict_SetItemString(d,"wxFONTENCODING_CP874", PyInt_FromLong((long) wxFONTENCODING_CP874)); + PyDict_SetItemString(d,"wxFONTENCODING_CP932", PyInt_FromLong((long) wxFONTENCODING_CP932)); + PyDict_SetItemString(d,"wxFONTENCODING_CP936", PyInt_FromLong((long) wxFONTENCODING_CP936)); + PyDict_SetItemString(d,"wxFONTENCODING_CP949", PyInt_FromLong((long) wxFONTENCODING_CP949)); + PyDict_SetItemString(d,"wxFONTENCODING_CP950", PyInt_FromLong((long) wxFONTENCODING_CP950)); PyDict_SetItemString(d,"wxFONTENCODING_CP1250", PyInt_FromLong((long) wxFONTENCODING_CP1250)); PyDict_SetItemString(d,"wxFONTENCODING_CP1251", PyInt_FromLong((long) wxFONTENCODING_CP1251)); PyDict_SetItemString(d,"wxFONTENCODING_CP1252", PyInt_FromLong((long) wxFONTENCODING_CP1252)); diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 6d5eb1b922..d872897b39 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -1390,6 +1390,10 @@ wxFONTENCODING_CP852 = gdic.wxFONTENCODING_CP852 wxFONTENCODING_CP855 = gdic.wxFONTENCODING_CP855 wxFONTENCODING_CP866 = gdic.wxFONTENCODING_CP866 wxFONTENCODING_CP874 = gdic.wxFONTENCODING_CP874 +wxFONTENCODING_CP932 = gdic.wxFONTENCODING_CP932 +wxFONTENCODING_CP936 = gdic.wxFONTENCODING_CP936 +wxFONTENCODING_CP949 = gdic.wxFONTENCODING_CP949 +wxFONTENCODING_CP950 = gdic.wxFONTENCODING_CP950 wxFONTENCODING_CP1250 = gdic.wxFONTENCODING_CP1250 wxFONTENCODING_CP1251 = gdic.wxFONTENCODING_CP1251 wxFONTENCODING_CP1252 = gdic.wxFONTENCODING_CP1252 diff --git a/wxPython/src/windows3.i b/wxPython/src/windows3.i index 15dddb012f..75ad798db9 100644 --- a/wxPython/src/windows3.i +++ b/wxPython/src/windows3.i @@ -219,6 +219,7 @@ public: bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + // the point must be given in screen coordinates! void Position(const wxPoint& ptOrigin, const wxSize& size); };