more 2.0b9 updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -120,7 +120,7 @@ class wxPythonDemo(wxFrame):
|
|||||||
self.log = wxTextCtrl(splitter2, -1, '', wxDefaultPosition, wxDefaultSize,
|
self.log = wxTextCtrl(splitter2, -1, '', wxDefaultPosition, wxDefaultSize,
|
||||||
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
||||||
(w, self.charHeight) = self.log.GetTextExtent('X')
|
(w, self.charHeight) = self.log.GetTextExtent('X')
|
||||||
self.WriteText('wxPython Demo Log:\n')
|
#self.WriteText('wxPython Demo Log:\n')
|
||||||
|
|
||||||
|
|
||||||
# add the windows to the splitter and split it.
|
# add the windows to the splitter and split it.
|
||||||
@@ -138,7 +138,6 @@ class wxPythonDemo(wxFrame):
|
|||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
def WriteText(self, text):
|
def WriteText(self, text):
|
||||||
self.log.WriteText(text)
|
self.log.WriteText(text)
|
||||||
if wxPlatform == '__WXMSW__':
|
|
||||||
w, h = self.log.GetClientSizeTuple()
|
w, h = self.log.GetClientSizeTuple()
|
||||||
numLines = h/self.charHeight
|
numLines = h/self.charHeight
|
||||||
x, y = self.log.PositionToXY(self.log.GetLastPosition())
|
x, y = self.log.PositionToXY(self.log.GetLastPosition())
|
||||||
|
@@ -4175,6 +4175,201 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args) {
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_CanCopy(_swigobj) (_swigobj->CanCopy())
|
||||||
|
static PyObject *_wrap_wxTextCtrl_CanCopy(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_CanCopy",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_CanCopy. Expected _wxTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxTextCtrl_CanCopy(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_CanCut(_swigobj) (_swigobj->CanCut())
|
||||||
|
static PyObject *_wrap_wxTextCtrl_CanCut(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_CanCut",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_CanCut. Expected _wxTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxTextCtrl_CanCut(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_CanPaste(_swigobj) (_swigobj->CanPaste())
|
||||||
|
static PyObject *_wrap_wxTextCtrl_CanPaste(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_CanPaste",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_CanPaste. Expected _wxTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxTextCtrl_CanPaste(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_CanRedo(_swigobj) (_swigobj->CanRedo())
|
||||||
|
static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_CanRedo",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_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_CanRedo(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_CanUndo(_swigobj) (_swigobj->CanUndo())
|
||||||
|
static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_CanUndo",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_CanUndo. Expected _wxTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxTextCtrl_CanUndo(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_GetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSelection(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
long * _arg1;
|
||||||
|
long temp;
|
||||||
|
long * _arg2;
|
||||||
|
long temp0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
{
|
||||||
|
_arg1 = &temp;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg2 = &temp0;
|
||||||
|
}
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_GetSelection",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetSelection. Expected _wxTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxTextCtrl_GetSelection(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
{
|
||||||
|
PyObject *o;
|
||||||
|
o = PyInt_FromLong((long) (*_arg1));
|
||||||
|
_resultobj = t_output_helper(_resultobj, o);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyObject *o;
|
||||||
|
o = PyInt_FromLong((long) (*_arg2));
|
||||||
|
_resultobj = t_output_helper(_resultobj, o);
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxTextCtrl_IsEditable(_swigobj) (_swigobj->IsEditable())
|
||||||
|
static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxTextCtrl * _arg0;
|
||||||
|
char * _argc0 = 0;
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTuple(args,"s:wxTextCtrl_IsEditable",&_argc0))
|
||||||
|
return NULL;
|
||||||
|
if (_argc0) {
|
||||||
|
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsEditable. Expected _wxTextCtrl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxTextCtrl_IsEditable(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxScrollBarTowxControl(void *ptr) {
|
static void *SwigwxScrollBarTowxControl(void *ptr) {
|
||||||
wxScrollBar *src;
|
wxScrollBar *src;
|
||||||
wxControl *dest;
|
wxControl *dest;
|
||||||
@@ -6062,6 +6257,13 @@ static PyMethodDef controlscMethods[] = {
|
|||||||
{ "wxScrollBar_GetPageSize", _wrap_wxScrollBar_GetPageSize, 1 },
|
{ "wxScrollBar_GetPageSize", _wrap_wxScrollBar_GetPageSize, 1 },
|
||||||
{ "wxScrollBar_GetRange", _wrap_wxScrollBar_GetRange, 1 },
|
{ "wxScrollBar_GetRange", _wrap_wxScrollBar_GetRange, 1 },
|
||||||
{ "new_wxScrollBar", _wrap_new_wxScrollBar, 1 },
|
{ "new_wxScrollBar", _wrap_new_wxScrollBar, 1 },
|
||||||
|
{ "wxTextCtrl_IsEditable", _wrap_wxTextCtrl_IsEditable, 1 },
|
||||||
|
{ "wxTextCtrl_GetSelection", _wrap_wxTextCtrl_GetSelection, 1 },
|
||||||
|
{ "wxTextCtrl_CanUndo", _wrap_wxTextCtrl_CanUndo, 1 },
|
||||||
|
{ "wxTextCtrl_CanRedo", _wrap_wxTextCtrl_CanRedo, 1 },
|
||||||
|
{ "wxTextCtrl_CanPaste", _wrap_wxTextCtrl_CanPaste, 1 },
|
||||||
|
{ "wxTextCtrl_CanCut", _wrap_wxTextCtrl_CanCut, 1 },
|
||||||
|
{ "wxTextCtrl_CanCopy", _wrap_wxTextCtrl_CanCopy, 1 },
|
||||||
{ "wxTextCtrl_XYToPosition", _wrap_wxTextCtrl_XYToPosition, 1 },
|
{ "wxTextCtrl_XYToPosition", _wrap_wxTextCtrl_XYToPosition, 1 },
|
||||||
{ "wxTextCtrl_AppendText", _wrap_wxTextCtrl_AppendText, 1 },
|
{ "wxTextCtrl_AppendText", _wrap_wxTextCtrl_AppendText, 1 },
|
||||||
{ "wxTextCtrl_WriteText", _wrap_wxTextCtrl_WriteText, 1 },
|
{ "wxTextCtrl_WriteText", _wrap_wxTextCtrl_WriteText, 1 },
|
||||||
|
@@ -545,6 +545,27 @@ class wxTextCtrlPtr(wxControlPtr):
|
|||||||
def XYToPosition(self,arg0,arg1):
|
def XYToPosition(self,arg0,arg1):
|
||||||
val = controlsc.wxTextCtrl_XYToPosition(self.this,arg0,arg1)
|
val = controlsc.wxTextCtrl_XYToPosition(self.this,arg0,arg1)
|
||||||
return val
|
return val
|
||||||
|
def CanCopy(self):
|
||||||
|
val = controlsc.wxTextCtrl_CanCopy(self.this)
|
||||||
|
return val
|
||||||
|
def CanCut(self):
|
||||||
|
val = controlsc.wxTextCtrl_CanCut(self.this)
|
||||||
|
return val
|
||||||
|
def CanPaste(self):
|
||||||
|
val = controlsc.wxTextCtrl_CanPaste(self.this)
|
||||||
|
return val
|
||||||
|
def CanRedo(self):
|
||||||
|
val = controlsc.wxTextCtrl_CanRedo(self.this)
|
||||||
|
return val
|
||||||
|
def CanUndo(self):
|
||||||
|
val = controlsc.wxTextCtrl_CanUndo(self.this)
|
||||||
|
return val
|
||||||
|
def GetSelection(self):
|
||||||
|
val = controlsc.wxTextCtrl_GetSelection(self.this)
|
||||||
|
return val
|
||||||
|
def IsEditable(self):
|
||||||
|
val = controlsc.wxTextCtrl_IsEditable(self.this)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxTextCtrl instance>"
|
return "<C wxTextCtrl instance>"
|
||||||
class wxTextCtrl(wxTextCtrlPtr):
|
class wxTextCtrl(wxTextCtrlPtr):
|
||||||
|
Reference in New Issue
Block a user