small fixes and cleanups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,27 +15,27 @@ class TestTreeCtrlPanel(wxPanel):
|
|||||||
self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
|
self.tree = wxTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
|
||||||
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)# | wxTR_MULTIPLE)
|
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)# | wxTR_MULTIPLE)
|
||||||
|
|
||||||
il = wxImageList(16, 16)
|
#il = wxImageList(16, 16)
|
||||||
idx1 = il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
|
#idx1 = il.Add(wxBitmap('bitmaps/smiles.bmp', wxBITMAP_TYPE_BMP))
|
||||||
idx2 = il.Add(wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP))
|
#idx2 = il.Add(wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP))
|
||||||
idx3 = il.Add(wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP))
|
#idx3 = il.Add(wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP))
|
||||||
idx4 = il.Add(wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP))
|
#idx4 = il.Add(wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP))
|
||||||
idx5 = il.Add(wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP))
|
#idx5 = il.Add(wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP))
|
||||||
|
|
||||||
self.tree.SetImageList(il)
|
#self.tree.SetImageList(il)
|
||||||
self.il = il
|
#self.il = il
|
||||||
|
|
||||||
self.root = self.tree.AddRoot("The Root Item")
|
self.root = self.tree.AddRoot("The Root Item")
|
||||||
self.tree.SetItemImage(self.root, idx1)
|
#self.tree.SetItemImage(self.root, idx1)
|
||||||
|
|
||||||
for x in range(15):
|
for x in range(15):
|
||||||
child = self.tree.AppendItem(self.root, "Item %d" % x)
|
child = self.tree.AppendItem(self.root, "Item %d" % x)
|
||||||
self.tree.SetItemImage(child, idx2)
|
#self.tree.SetItemImage(child, idx2)
|
||||||
self.tree.SetItemSelectedImage(child, idx3)
|
#self.tree.SetItemSelectedImage(child, idx3)
|
||||||
for y in range(5):
|
for y in range(5):
|
||||||
last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
|
last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y)))
|
||||||
self.tree.SetItemImage(last, idx4)
|
#self.tree.SetItemImage(last, idx4)
|
||||||
self.tree.SetItemSelectedImage(last, idx5)
|
#self.tree.SetItemSelectedImage(last, idx5)
|
||||||
for z in range(5):
|
for z in range(5):
|
||||||
self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
|
self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z))
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@ class wxBitmap;
|
|||||||
class wxBrush;
|
class wxBrush;
|
||||||
class wxButton;
|
class wxButton;
|
||||||
class wxCalculateLayoutEvent;
|
class wxCalculateLayoutEvent;
|
||||||
|
class wxCaret;
|
||||||
class wxCheckBox;
|
class wxCheckBox;
|
||||||
class wxCheckListBox;
|
class wxCheckListBox;
|
||||||
class wxChoice;
|
class wxChoice;
|
||||||
|
@@ -733,15 +733,18 @@ class wxPyOnDemandOutputWindow:
|
|||||||
self.frame = None
|
self.frame = None
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
||||||
|
|
||||||
def SetParent(self, parent):
|
def SetParent(self, parent):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
|
||||||
|
|
||||||
def OnCloseWindow(self, event):
|
def OnCloseWindow(self, event):
|
||||||
if self.frame != None:
|
if self.frame != None:
|
||||||
self.frame.Destroy()
|
self.frame.Destroy()
|
||||||
self.frame = None
|
self.frame = None
|
||||||
self.text = None
|
self.text = None
|
||||||
|
|
||||||
|
|
||||||
# this provides the file-like behaviour
|
# this provides the file-like behaviour
|
||||||
def write(self, str):
|
def write(self, str):
|
||||||
if not self.frame:
|
if not self.frame:
|
||||||
@@ -753,7 +756,10 @@ class wxPyOnDemandOutputWindow:
|
|||||||
EVT_CLOSE(self.frame, self.OnCloseWindow)
|
EVT_CLOSE(self.frame, self.OnCloseWindow)
|
||||||
self.text.AppendText(str)
|
self.text.AppendText(str)
|
||||||
|
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
if self.frame != None:
|
||||||
|
self.frame.Destroy()
|
||||||
self.frame = None
|
self.frame = None
|
||||||
self.text = None
|
self.text = None
|
||||||
|
|
||||||
@@ -789,19 +795,22 @@ class wxApp(wxPyApp):
|
|||||||
def SetTopWindow(self, frame):
|
def SetTopWindow(self, frame):
|
||||||
if self.stdioWin:
|
if self.stdioWin:
|
||||||
self.stdioWin.SetParent(frame)
|
self.stdioWin.SetParent(frame)
|
||||||
sys.stdout = self.stdioWin #sys.stderr =
|
sys.stderr = sys.stdout = self.stdioWin
|
||||||
wxPyApp.SetTopWindow(self, frame)
|
wxPyApp.SetTopWindow(self, frame)
|
||||||
|
|
||||||
|
|
||||||
def MainLoop(self):
|
def MainLoop(self):
|
||||||
wxPyApp.MainLoop(self)
|
wxPyApp.MainLoop(self)
|
||||||
self.RestoreStdio()
|
self.RestoreStdio()
|
||||||
|
|
||||||
|
|
||||||
def RedirectStdio(self, filename):
|
def RedirectStdio(self, filename):
|
||||||
if filename:
|
if filename:
|
||||||
sys.stdout = sys.stderr = open(filename, 'a')
|
sys.stdout = sys.stderr = open(filename, 'a')
|
||||||
else:
|
else:
|
||||||
self.stdioWin = self.outputWindowClass() # wxPyOnDemandOutputWindow
|
self.stdioWin = self.outputWindowClass() # wxPyOnDemandOutputWindow
|
||||||
|
|
||||||
|
|
||||||
def RestoreStdio(self):
|
def RestoreStdio(self):
|
||||||
sys.stdout, sys.stderr = self.saveStdio
|
sys.stdout, sys.stderr = self.saveStdio
|
||||||
if self.stdioWin != None:
|
if self.stdioWin != None:
|
||||||
|
@@ -274,6 +274,8 @@ public:
|
|||||||
wxWindow *GetWindow();
|
wxWindow *GetWindow();
|
||||||
%name(MoveXY)void Move(int x, int y);
|
%name(MoveXY)void Move(int x, int y);
|
||||||
void Move(const wxPoint& pt);
|
void Move(const wxPoint& pt);
|
||||||
|
%name(SetSizeWH) void SetSize(int width, int height);
|
||||||
|
void SetSize(const wxSize& size);
|
||||||
void Show(int show = TRUE);
|
void Show(int show = TRUE);
|
||||||
void Hide();
|
void Hide();
|
||||||
void OnSetFocus();
|
void OnSetFocus();
|
||||||
|
@@ -1670,6 +1670,70 @@ static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kw
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxCaret_SetSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSize(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxCaret_SetSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxCaret * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
int _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","width","height", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_SetSizeWH",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSizeWH. Expected _wxCaret_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxCaret_SetSizeWH(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxCaret_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxCaret_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxCaret * _arg0;
|
||||||
|
wxSize * _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
wxSize temp;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
char *_kwnames[] = { "self","size", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_SetSize",_kwnames,&_argo0,&_obj1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_SetSize. Expected _wxCaret_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg1 = &temp;
|
||||||
|
if (! wxSize_helper(_obj1, &_arg1))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxCaret_SetSize(_arg0,*_arg1);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0))
|
#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0))
|
||||||
static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -2067,6 +2131,8 @@ static PyMethodDef misc2cMethods[] = {
|
|||||||
{ "wxCaret_OnSetFocus", (PyCFunction) _wrap_wxCaret_OnSetFocus, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_OnSetFocus", (PyCFunction) _wrap_wxCaret_OnSetFocus, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxCaret_SetSize", (PyCFunction) _wrap_wxCaret_SetSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxCaret_SetSizeWH", (PyCFunction) _wrap_wxCaret_SetSizeWH, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -71,6 +71,12 @@ class wxCaretPtr :
|
|||||||
def Move(self, *_args, **_kwargs):
|
def Move(self, *_args, **_kwargs):
|
||||||
val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs)
|
val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetSizeWH(self, *_args, **_kwargs):
|
||||||
|
val = apply(misc2c.wxCaret_SetSizeWH,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetSize(self, *_args, **_kwargs):
|
||||||
|
val = apply(misc2c.wxCaret_SetSize,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def Show(self, *_args, **_kwargs):
|
def Show(self, *_args, **_kwargs):
|
||||||
val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs)
|
val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
@@ -168,6 +168,16 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
|
|||||||
win->SubclassWin(hWnd);
|
win->SubclassWin(hWnd);
|
||||||
return win;
|
return win;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wxWindow_NewControlId() {
|
||||||
|
return wxWindow::NewControlId();
|
||||||
|
}
|
||||||
|
int wxWindow_NextControlId(int id) {
|
||||||
|
return wxWindow::NextControlId(id);
|
||||||
|
}
|
||||||
|
int wxWindow_PrevControlId(int id) {
|
||||||
|
return wxWindow::PrevControlId(id);
|
||||||
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -255,6 +265,59 @@ static PyObject *_wrap_wxWindow_FromHWND(PyObject *self, PyObject *args, PyObjec
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxWindow_NewControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxWindow_NewControlId",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (int )wxWindow_NewControlId();
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxWindow_NextControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
int _arg0;
|
||||||
|
char *_kwnames[] = { "id", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_NextControlId",_kwnames,&_arg0))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (int )wxWindow_NextControlId(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxWindow_PrevControlId(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
int _arg0;
|
||||||
|
char *_kwnames[] = { "id", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxWindow_PrevControlId",_kwnames,&_arg0))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (int )wxWindow_PrevControlId(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0))
|
#define wxEvtHandler_ProcessEvent(_swigobj,_swigarg0) (_swigobj->ProcessEvent(_swigarg0))
|
||||||
static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -3802,7 +3865,7 @@ static PyObject *_wrap_wxWindow_SetDimensions(PyObject *self, PyObject *args, Py
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void wxWindow_SetSize(wxWindow *self,const wxSize & size) {
|
static void wxWindow_SetSize(wxWindow *self,const wxSize & size) {
|
||||||
self->SetSize(size.x, size.y);
|
self->SetSize(size);
|
||||||
}
|
}
|
||||||
static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -4687,6 +4750,76 @@ static PyObject *_wrap_wxWindow_GetBestSize(PyObject *self, PyObject *args, PyOb
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxWindow_SetCaret(_swigobj,_swigarg0) (_swigobj->SetCaret(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxWindow * _arg0;
|
||||||
|
wxCaret * _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _argo1 = 0;
|
||||||
|
char *_kwnames[] = { "self","caret", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetCaret",_kwnames,&_argo0,&_argo1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_SetCaret. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_argo1) {
|
||||||
|
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCaret_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetCaret. Expected _wxCaret_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxWindow_SetCaret(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxWindow_GetCaret(_swigobj) (_swigobj->GetCaret())
|
||||||
|
static PyObject *_wrap_wxWindow_GetCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxCaret * _result;
|
||||||
|
wxWindow * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetCaret",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetCaret. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (wxCaret *)wxWindow_GetCaret(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxPanelTowxWindow(void *ptr) {
|
static void *SwigwxPanelTowxWindow(void *ptr) {
|
||||||
wxPanel *src;
|
wxPanel *src;
|
||||||
wxWindow *dest;
|
wxWindow *dest;
|
||||||
@@ -8797,6 +8930,8 @@ static PyMethodDef windowscMethods[] = {
|
|||||||
{ "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS },
|
{ "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxWindow_SetCaret", (PyCFunction) _wrap_wxWindow_SetCaret, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_GetDropTarget", (PyCFunction) _wrap_wxWindow_GetDropTarget, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_GetDropTarget", (PyCFunction) _wrap_wxWindow_GetDropTarget, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_SetDropTarget", (PyCFunction) _wrap_wxWindow_SetDropTarget, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_SetDropTarget", (PyCFunction) _wrap_wxWindow_SetDropTarget, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -8929,6 +9064,9 @@ static PyMethodDef windowscMethods[] = {
|
|||||||
{ "wxEvtHandler_SetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_SetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEvtHandler_SetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_SetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEvtHandler_GetEvtHandlerEnabled", (PyCFunction) _wrap_wxEvtHandler_GetEvtHandlerEnabled, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEvtHandler_ProcessEvent", (PyCFunction) _wrap_wxEvtHandler_ProcessEvent, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxWindow_PrevControlId", (PyCFunction) _wrap_wxWindow_PrevControlId, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxWindow_NextControlId", (PyCFunction) _wrap_wxWindow_NextControlId, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxWindow_NewControlId", (PyCFunction) _wrap_wxWindow_NewControlId, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_FromHWND", (PyCFunction) _wrap_wxWindow_FromHWND, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_FindFocus", (PyCFunction) _wrap_wxWindow_FindFocus, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS },
|
{ "wxValidator_SetBellOnError", (PyCFunction) _wrap_wxValidator_SetBellOnError, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -485,8 +485,22 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
val = apply(windowsc.wxWindow_GetBestSize,(self,) + _args, _kwargs)
|
val = apply(windowsc.wxWindow_GetBestSize,(self,) + _args, _kwargs)
|
||||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||||
return val
|
return val
|
||||||
|
def SetCaret(self, *_args, **_kwargs):
|
||||||
|
val = apply(windowsc.wxWindow_SetCaret,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetCaret(self, *_args, **_kwargs):
|
||||||
|
val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxCaretPtr(val)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxWindow instance at %s>" % (self.this,)
|
return "<C wxWindow instance at %s>" % (self.this,)
|
||||||
|
# replaces broken shadow method
|
||||||
|
def GetCaret(self, *_args, **_kwargs):
|
||||||
|
from misc2 import wxCaretPtr
|
||||||
|
val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxCaretPtr(val)
|
||||||
|
return val
|
||||||
|
|
||||||
class wxWindow(wxWindowPtr):
|
class wxWindow(wxWindowPtr):
|
||||||
def __init__(self,*_args,**_kwargs):
|
def __init__(self,*_args,**_kwargs):
|
||||||
self.this = apply(windowsc.new_wxWindow,_args,_kwargs)
|
self.this = apply(windowsc.new_wxWindow,_args,_kwargs)
|
||||||
@@ -939,6 +953,12 @@ def wxWindow_FromHWND(*_args, **_kwargs):
|
|||||||
if val: val = wxWindowPtr(val)
|
if val: val = wxWindowPtr(val)
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
wxWindow_NewControlId = windowsc.wxWindow_NewControlId
|
||||||
|
|
||||||
|
wxWindow_NextControlId = windowsc.wxWindow_NextControlId
|
||||||
|
|
||||||
|
wxWindow_PrevControlId = windowsc.wxWindow_PrevControlId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------- VARIABLE WRAPPERS ------------------
|
#-------------- VARIABLE WRAPPERS ------------------
|
||||||
|
@@ -324,6 +324,16 @@ public:
|
|||||||
%pragma(python) addtomethod = "SetDropTarget:_args[0].thisown = 0"
|
%pragma(python) addtomethod = "SetDropTarget:_args[0].thisown = 0"
|
||||||
|
|
||||||
wxSize GetBestSize();
|
wxSize GetBestSize();
|
||||||
|
|
||||||
|
void SetCaret(wxCaret *caret);
|
||||||
|
wxCaret *GetCaret();
|
||||||
|
%pragma(python) addtoclass = "# replaces broken shadow method
|
||||||
|
def GetCaret(self, *_args, **_kwargs):
|
||||||
|
from misc2 import wxCaretPtr
|
||||||
|
val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxCaretPtr(val)
|
||||||
|
return val
|
||||||
|
"
|
||||||
};
|
};
|
||||||
|
|
||||||
//%clear int* x, int* y;
|
//%clear int* x, int* y;
|
||||||
@@ -362,6 +372,17 @@ wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
|
|||||||
%}
|
%}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
int wxWindow_NewControlId() {
|
||||||
|
return wxWindow::NewControlId();
|
||||||
|
}
|
||||||
|
int wxWindow_NextControlId(int id) {
|
||||||
|
return wxWindow::NextControlId(id);
|
||||||
|
}
|
||||||
|
int wxWindow_PrevControlId(int id) {
|
||||||
|
return wxWindow::PrevControlId(id);
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user