Created add-on module with wxOGL classes.
+Added wxWindow.GetChildren(). Be careful of this. It returns a copy
+of the list of the window's children. While you are using the list if
+anything changes in the real list (a child is deleted, etc.) then the
+list you are holding will suddenly have window references to garbage
+memory and your app will likely crash. But if you are careful it works
+great!
+
+Added a bunch of new and missing methods to wxTreeCrtl. The
+SortChildren method is now supported, but currently only for the
+default sort order.
+
+
What's new in 2.1b3
class wxScreenDC;
class wxScrollBar;
class wxScrollEvent;
+class wxScrollWinEvent;
class wxScrolledWindow;
class wxShowEvent;
class wxSingleChoiceDialog;
def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func)
+#---
+def EVT_SCROLLWIN(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK,func)
+
+def EVT_SCROLLWIN_TOP(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
+
+def EVT_SCROLLWIN_BOTTOM(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+
+def EVT_SCROLLWIN_LINEUP(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
+
+def EVT_SCROLLWIN_LINEDOWN(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+
+def EVT_SCROLLWIN_PAGEUP(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+
+def EVT_SCROLLWIN_PAGEDOWN(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+
+def EVT_SCROLLWIN_THUMBTRACK(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
+
+
+
+# Scrolling, with an id
+def EVT_COMMAND_SCROLLWIN(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK,func)
+
+def EVT_COMMAND_SCROLLWIN_TOP(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
+
+def EVT_COMMAND_SCROLLWIN_BOTTOM(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+
+def EVT_COMMAND_SCROLLWIN_LINEUP(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
+
+def EVT_COMMAND_SCROLLWIN_LINEDOWN(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+
+def EVT_COMMAND_SCROLLWIN_PAGEUP(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+
+def EVT_COMMAND_SCROLLWIN_PAGEDOWN(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+
+def EVT_COMMAND_SCROLLWIN_THUMBTRACK(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
# Convenience commands
def EVT_BUTTON(win, id, func):
wxTreeItemId GetRootItem();
wxTreeItemId GetSelection();
wxTreeItemId GetParent(const wxTreeItemId& item);
+ //size_t GetSelections(wxArrayTreeItemIds& selection);
+ %addmethods {
+ PyObject* GetSelections() {
+ PyObject* rval = PyList_New(0);
+ wxArrayTreeItemIds array;
+ size_t num, x;
+ num = self->GetSelections(array);
+ for (x=0; x < num; x++) {
+ PyObject* item = wxPyConstructObject((void*)&array.Item(x),
+ "wxTreeItemId");
+ PyList_Append(rval, item);
+ }
+ return rval;
+ }
+ }
+
+
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = TRUE);
wxTreeItemId GetFirstVisibleItem();
wxTreeItemId GetNextVisible(const wxTreeItemId& item);
wxTreeItemId GetPrevVisible(const wxTreeItemId& item);
+ wxTreeItemId GetLastChild(const wxTreeItemId& item);
+
wxTreeItemId AddRoot(const wxString& text,
void EditLabel(const wxTreeItemId& item);
#endif
-// void SortChildren(const wxTreeItemId& item);
- // **** And this too
- // wxTreeItemCmpFunc *cmpFunction = NULL);
+ void SortChildren(const wxTreeItemId& item);
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
bool IsBold(const wxTreeItemId& item) const;
wxTreeItemId HitTest(const wxPoint& point);
+ //bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, int textOnly = FALSE)
+ %addmethods {
+ PyObject* GetBoundingRect(const wxTreeItemId& item, int textOnly = FALSE) {
+ wxRect rect;
+ if (self->GetBoundingRect(item, rect, textOnly))
+ return wxPyConstructObject((void*)&rect, "wxRect");
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+ }
+
%pragma(python) addtoclass = "
# Redefine a couple methods that SWIG gets a bit confused on...
def GetFirstChild(self,arg0,arg1):
//---------------------------------------------------------------------------
+class wxScrollWinEvent: public wxEvent {
+public:
+ int GetOrientation();
+ int GetPosition();
+};
+
+//---------------------------------------------------------------------------
+
class wxSpinEvent : public wxScrollEvent {
public:
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxProgressDialog","_wxProgressDialog",0},
{ "_class_wxDirDialog","_wxDirDialog",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
return _resultobj;
}
+static PyObject * wxTreeCtrl_GetSelections(wxTreeCtrl *self) {
+ PyObject* rval = PyList_New(0);
+ wxArrayTreeItemIds array;
+ size_t num, x;
+ num = self->GetSelections(array);
+ for (x=0; x < num; x++) {
+ PyObject* item = wxPyConstructObject((void*)&array.Item(x),
+ "wxTreeItemId");
+ PyList_Append(rval, item);
+ }
+ return rval;
+ }
+static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ PyObject * _result;
+ wxTreeCtrl * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetSelections",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetSelections. Expected _wxTreeCtrl_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (PyObject *)wxTreeCtrl_GetSelections(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+}{
+ _resultobj = _result;
+}
+ return _resultobj;
+}
+
#define wxTreeCtrl_GetChildrenCount(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetChildrenCount(_swigarg0,_swigarg1))
static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+#define wxTreeCtrl_GetLastChild(_swigobj,_swigarg0) (_swigobj->GetLastChild(_swigarg0))
+static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxTreeItemId * _result;
+ wxTreeCtrl * _arg0;
+ wxTreeItemId * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","item", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_GetLastChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetLastChild. Expected _wxTreeCtrl_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetLastChild. Expected _wxTreeItemId_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1));
+
+ wxPy_END_ALLOW_THREADS;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
#define wxTreeCtrl_AddRoot(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->AddRoot(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+#define wxTreeCtrl_SortChildren(_swigobj,_swigarg0) (_swigobj->SortChildren(_swigarg0))
+static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxTreeCtrl * _arg0;
+ wxTreeItemId * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","item", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_SortChildren",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SortChildren. Expected _wxTreeCtrl_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SortChildren. Expected _wxTreeItemId_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxTreeCtrl_SortChildren(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define wxTreeCtrl_SetItemBold(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBold(_swigarg0,_swigarg1))
static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+static PyObject * wxTreeCtrl_GetBoundingRect(wxTreeCtrl *self,const wxTreeItemId & item,int textOnly) {
+ wxRect rect;
+ if (self->GetBoundingRect(item, rect, textOnly))
+ return wxPyConstructObject((void*)&rect, "wxRect");
+ else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ PyObject * _result;
+ wxTreeCtrl * _arg0;
+ wxTreeItemId * _arg1;
+ int _arg2 = (int ) FALSE;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","item","textOnly", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxTreeCtrl_GetBoundingRect",_kwnames,&_argo0,&_argo1,&_arg2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeCtrl_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeItemId_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (PyObject *)wxTreeCtrl_GetBoundingRect(_arg0,*_arg1,_arg2);
+
+ wxPy_END_ALLOW_THREADS;
+}{
+ _resultobj = _result;
+}
+ return _resultobj;
+}
+
static PyMethodDef controls2cMethods[] = {
+ { "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_HitTest", (PyCFunction) _wrap_wxTreeCtrl_HitTest, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_IsBold", (PyCFunction) _wrap_wxTreeCtrl_IsBold, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_SetItemBold", (PyCFunction) _wrap_wxTreeCtrl_SetItemBold, METH_VARARGS | METH_KEYWORDS },
+ { "wxTreeCtrl_SortChildren", (PyCFunction) _wrap_wxTreeCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_EndEditLabel", (PyCFunction) _wrap_wxTreeCtrl_EndEditLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetEditControl", (PyCFunction) _wrap_wxTreeCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_EditLabel", (PyCFunction) _wrap_wxTreeCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_InsertItem", (PyCFunction) _wrap_wxTreeCtrl_InsertItem, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_PrependItem", (PyCFunction) _wrap_wxTreeCtrl_PrependItem, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_AddRoot", (PyCFunction) _wrap_wxTreeCtrl_AddRoot, METH_VARARGS | METH_KEYWORDS },
+ { "wxTreeCtrl_GetLastChild", (PyCFunction) _wrap_wxTreeCtrl_GetLastChild, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetPrevVisible", (PyCFunction) _wrap_wxTreeCtrl_GetPrevVisible, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetNextVisible", (PyCFunction) _wrap_wxTreeCtrl_GetNextVisible, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetFirstVisibleItem", (PyCFunction) _wrap_wxTreeCtrl_GetFirstVisibleItem, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetNextChild", (PyCFunction) _wrap_wxTreeCtrl_GetNextChild, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetFirstChild", (PyCFunction) _wrap_wxTreeCtrl_GetFirstChild, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetChildrenCount", (PyCFunction) _wrap_wxTreeCtrl_GetChildrenCount, METH_VARARGS | METH_KEYWORDS },
+ { "wxTreeCtrl_GetSelections", (PyCFunction) _wrap_wxTreeCtrl_GetSelections, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetParent", (PyCFunction) _wrap_wxTreeCtrl_GetParent, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetSelection", (PyCFunction) _wrap_wxTreeCtrl_GetSelection, METH_VARARGS | METH_KEYWORDS },
{ "wxTreeCtrl_GetRootItem", (PyCFunction) _wrap_wxTreeCtrl_GetRootItem, METH_VARARGS | METH_KEYWORDS },
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxTreeEvent","_wxTreeEvent",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
val = apply(controls2c.wxTreeCtrl_GetParent,(self,) + _args, _kwargs)
if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
return val
+ def GetSelections(self, *_args, **_kwargs):
+ val = apply(controls2c.wxTreeCtrl_GetSelections,(self,) + _args, _kwargs)
+ return val
def GetChildrenCount(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeCtrl_GetChildrenCount,(self,) + _args, _kwargs)
return val
val = apply(controls2c.wxTreeCtrl_GetPrevVisible,(self,) + _args, _kwargs)
if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
return val
+ def GetLastChild(self, *_args, **_kwargs):
+ val = apply(controls2c.wxTreeCtrl_GetLastChild,(self,) + _args, _kwargs)
+ if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
+ return val
def AddRoot(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeCtrl_AddRoot,(self,) + _args, _kwargs)
if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
def EndEditLabel(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs)
return val
+ def SortChildren(self, *_args, **_kwargs):
+ val = apply(controls2c.wxTreeCtrl_SortChildren,(self,) + _args, _kwargs)
+ return val
def SetItemBold(self, *_args, **_kwargs):
val = apply(controls2c.wxTreeCtrl_SetItemBold,(self,) + _args, _kwargs)
return val
val = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs)
if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
return val
+ def GetBoundingRect(self, *_args, **_kwargs):
+ val = apply(controls2c.wxTreeCtrl_GetBoundingRect,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxTreeCtrl instance at %s>" % (self.this,)
return _resultobj;
}
+static void *SwigwxScrollWinEventTowxEvent(void *ptr) {
+ wxScrollWinEvent *src;
+ wxEvent *dest;
+ src = (wxScrollWinEvent *) ptr;
+ dest = (wxEvent *) src;
+ return (void *) dest;
+}
+
+#define wxScrollWinEvent_GetOrientation(_swigobj) (_swigobj->GetOrientation())
+static PyObject *_wrap_wxScrollWinEvent_GetOrientation(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxScrollWinEvent * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrollWinEvent_GetOrientation",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrollWinEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollWinEvent_GetOrientation. Expected _wxScrollWinEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxScrollWinEvent_GetOrientation(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
+#define wxScrollWinEvent_GetPosition(_swigobj) (_swigobj->GetPosition())
+static PyObject *_wrap_wxScrollWinEvent_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxScrollWinEvent * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrollWinEvent_GetPosition",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrollWinEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollWinEvent_GetPosition. Expected _wxScrollWinEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxScrollWinEvent_GetPosition(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static void *SwigwxSpinEventTowxScrollEvent(void *ptr) {
wxSpinEvent *src;
wxScrollEvent *dest;
{ "wxMouseEvent_ButtonDClick", (PyCFunction) _wrap_wxMouseEvent_ButtonDClick, METH_VARARGS | METH_KEYWORDS },
{ "wxMouseEvent_ButtonDown", (PyCFunction) _wrap_wxMouseEvent_ButtonDown, METH_VARARGS | METH_KEYWORDS },
{ "wxMouseEvent_IsButton", (PyCFunction) _wrap_wxMouseEvent_IsButton, METH_VARARGS | METH_KEYWORDS },
+ { "wxScrollWinEvent_GetPosition", (PyCFunction) _wrap_wxScrollWinEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
+ { "wxScrollWinEvent_GetOrientation", (PyCFunction) _wrap_wxScrollWinEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
{ "wxScrollEvent_GetPosition", (PyCFunction) _wrap_wxScrollEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxScrollEvent_GetOrientation", (PyCFunction) _wrap_wxScrollEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_IsSelection", (PyCFunction) _wrap_wxCommandEvent_IsSelection, METH_VARARGS | METH_KEYWORDS },
{ "_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent},
{ "_wxEvent","_class_wxSpinEvent",SwigwxSpinEventTowxEvent},
{ "_wxEvent","_wxSpinEvent",SwigwxSpinEventTowxEvent},
+ { "_wxEvent","_class_wxScrollWinEvent",SwigwxScrollWinEventTowxEvent},
+ { "_wxEvent","_wxScrollWinEvent",SwigwxScrollWinEventTowxEvent},
{ "_wxEvent","_class_wxScrollEvent",SwigwxScrollEventTowxEvent},
{ "_wxEvent","_wxScrollEvent",SwigwxScrollEventTowxEvent},
{ "_wxEvent","_class_wxCommandEvent",SwigwxCommandEventTowxEvent},
{ "_class_wxEvent","_wxMouseEvent",SwigwxMouseEventTowxEvent},
{ "_class_wxEvent","_class_wxSpinEvent",SwigwxSpinEventTowxEvent},
{ "_class_wxEvent","_wxSpinEvent",SwigwxSpinEventTowxEvent},
+ { "_class_wxEvent","_class_wxScrollWinEvent",SwigwxScrollWinEventTowxEvent},
+ { "_class_wxEvent","_wxScrollWinEvent",SwigwxScrollWinEventTowxEvent},
{ "_class_wxEvent","_class_wxScrollEvent",SwigwxScrollEventTowxEvent},
{ "_class_wxEvent","_wxScrollEvent",SwigwxScrollEventTowxEvent},
{ "_class_wxEvent","_class_wxCommandEvent",SwigwxCommandEventTowxEvent},
{ "_wxCloseEvent","_class_wxCloseEvent",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
+class wxScrollWinEventPtr(wxEventPtr):
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def GetOrientation(self, *_args, **_kwargs):
+ val = apply(eventsc.wxScrollWinEvent_GetOrientation,(self,) + _args, _kwargs)
+ return val
+ def GetPosition(self, *_args, **_kwargs):
+ val = apply(eventsc.wxScrollWinEvent_GetPosition,(self,) + _args, _kwargs)
+ return val
+ def __repr__(self):
+ return "<C wxScrollWinEvent instance at %s>" % (self.this,)
+class wxScrollWinEvent(wxScrollWinEventPtr):
+ def __init__(self,this):
+ self.this = this
+
+
+
+
class wxSpinEventPtr(wxScrollEventPtr):
def __init__(self,this):
self.this = this
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_wxMDIParentFrame","_class_wxMDIParentFrame",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxProgressDialog","_wxProgressDialog",0},
{ "_class_wxDirDialog","_wxDirDialog",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
return _resultobj;
}
+static PyObject * wxWindow_GetChildren(wxWindow *self) {
+ wxWindowList& list = self->GetChildren();
+ return wxPy_ConvertList(&list, "wxWindow");
+ }
+static PyObject *_wrap_wxWindow_GetChildren(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ PyObject * _result;
+ wxWindow * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetChildren",_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_GetChildren. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (PyObject *)wxWindow_GetChildren(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+}{
+ _resultobj = _result;
+}
+ return _resultobj;
+}
+
#define wxWindow_GetCharHeight(_swigobj) (_swigobj->GetCharHeight())
static PyObject *_wrap_wxWindow_GetCharHeight(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxWindow_GetClientSizeTuple", (PyCFunction) _wrap_wxWindow_GetClientSizeTuple, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetCharWidth", (PyCFunction) _wrap_wxWindow_GetCharWidth, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetCharHeight", (PyCFunction) _wrap_wxWindow_GetCharHeight, METH_VARARGS | METH_KEYWORDS },
+ { "wxWindow_GetChildren", (PyCFunction) _wrap_wxWindow_GetChildren, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetBackgroundColour", (PyCFunction) _wrap_wxWindow_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Fit", (PyCFunction) _wrap_wxWindow_Fit, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_FindWindowByName", (PyCFunction) _wrap_wxWindow_FindWindowByName, METH_VARARGS | METH_KEYWORDS },
val = apply(windowsc.wxWindow_GetBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val) ; val.thisown = 1
return val
+ def GetChildren(self, *_args, **_kwargs):
+ val = apply(windowsc.wxWindow_GetChildren,(self,) + _args, _kwargs)
+ return val
def GetCharHeight(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetCharHeight,(self,) + _args, _kwargs)
return val
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_wxMDIParentFrame","_class_wxMDIParentFrame",0},
{ "_class_wxPyTimer","_wxPyTimer",0},
{ "_wxFocusEvent","_class_wxFocusEvent",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_unsigned_long","_long",0},
{ "_class_wxRect","_wxRect",0},
{ "_class_wxDC","_wxDC",0},
+ { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
{ "_class_wxProgressDialog","_wxProgressDialog",0},
{ "_wxPyApp","_class_wxPyApp",0},
{ "_wxMDIParentFrame","_class_wxMDIParentFrame",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
+ { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func)
+#---
+def EVT_SCROLLWIN(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK,func)
+
+def EVT_SCROLLWIN_TOP(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
+
+def EVT_SCROLLWIN_BOTTOM(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+
+def EVT_SCROLLWIN_LINEUP(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
+
+def EVT_SCROLLWIN_LINEDOWN(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+
+def EVT_SCROLLWIN_PAGEUP(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+
+def EVT_SCROLLWIN_PAGEDOWN(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+
+def EVT_SCROLLWIN_THUMBTRACK(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
+
+
+
+# Scrolling, with an id
+def EVT_COMMAND_SCROLLWIN(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+ win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK,func)
+
+def EVT_COMMAND_SCROLLWIN_TOP(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
+
+def EVT_COMMAND_SCROLLWIN_BOTTOM(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+
+def EVT_COMMAND_SCROLLWIN_LINEUP(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
+
+def EVT_COMMAND_SCROLLWIN_LINEDOWN(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+
+def EVT_COMMAND_SCROLLWIN_PAGEUP(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+
+def EVT_COMMAND_SCROLLWIN_PAGEDOWN(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+
+def EVT_COMMAND_SCROLLWIN_THUMBTRACK(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
# Convenience commands
def EVT_BUTTON(win, id, func):
%name(FindWindowByName) wxWindow* FindWindow(const wxString& name);
void Fit();
wxColour GetBackgroundColour();
+
+ //wxList& GetChildren();
+ %addmethods {
+ PyObject* GetChildren() {
+ wxWindowList& list = self->GetChildren();
+ return wxPy_ConvertList(&list, "wxWindow");
+ }
+ }
+
+
int GetCharHeight();
int GetCharWidth();
%name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);