wxFloatbar fixes
other odds and ends git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -137,6 +137,7 @@ class wxPythonDemo(wxFrame):
|
||||
tID = wxNewId()
|
||||
self.treeMap = {}
|
||||
self.tree = wxTreeCtrl(splitter, tID)
|
||||
#self.tree.SetBackgroundColour(wxNamedColour("Pink"))
|
||||
root = self.tree.AddRoot("Overview")
|
||||
firstChild = None
|
||||
for item in _treeList:
|
||||
|
@@ -10,7 +10,7 @@ class TestFloatBar(wxFrame):
|
||||
win = wxWindow(self, -1)
|
||||
win.SetBackgroundColour(wxNamedColour("WHITE"))
|
||||
wxStaticText(win, -1, "Drag the toolbar to float it,\n"
|
||||
"Toggle the last tool to remove the title.", wxPoint(15,15))
|
||||
"Toggle the last tool to remove\nthe title.", wxPoint(15,15))
|
||||
|
||||
tb = wxFloatBar(self, -1)
|
||||
self.SetToolBar(tb)
|
||||
@@ -57,6 +57,7 @@ class TestFloatBar(wxFrame):
|
||||
def OnToolClick(self, event):
|
||||
self.log.WriteText("tool %s clicked\n" % event.GetId())
|
||||
if event.GetId() == 60:
|
||||
print event.GetExtraLong(), event.Checked(), event.GetInt(), self.tb.GetToolState(60)
|
||||
if event.GetExtraLong():
|
||||
self.tb.SetTitle("")
|
||||
else:
|
||||
|
@@ -82,6 +82,9 @@ def main():
|
||||
validateFile(WXDIR + '/lib/ogl.lib')
|
||||
validateFile(WXDIR + '/lib/glcanvas.lib')
|
||||
|
||||
logSeparator("Cleaning wxPython build directory...")
|
||||
os.chdir(WXDIR + '/utils/wxPython')
|
||||
do("del /sxy *.*")
|
||||
|
||||
logSeparator("Copying wxPython workspace to build directory...")
|
||||
do("copy /s %s %s" % ('e:\\projects\\wxPython\*.*', WXDIR+'\\utils\\wxPython'))
|
||||
|
@@ -70,6 +70,7 @@ class wxFloatBar(wxToolBar):
|
||||
|
||||
|
||||
def SetTitle(self, title):
|
||||
print 'SetTitle', title
|
||||
self.title = title
|
||||
if self.IsFloating():
|
||||
self.floatframe.SetTitle(self.title)
|
||||
@@ -113,11 +114,12 @@ class wxFloatBar(wxToolBar):
|
||||
"Floats or docks the toolbar programmatically."
|
||||
if bool:
|
||||
self.parentframe = wxPyTypeCast(self.GetParent(), 'wxFrame')
|
||||
print self.title
|
||||
if self.title:
|
||||
useStyle = wxDEFAULT_FRAME_STYLE
|
||||
else:
|
||||
useStyle = 0 #wxTHICK_FRAME
|
||||
self.floatframe = wxMiniFrame(self.parentframe, -1, self.title,
|
||||
useStyle = wxTHICK_FRAME
|
||||
self.floatframe = wxFrame(self.parentframe, -1, self.title,
|
||||
style = useStyle)
|
||||
|
||||
self.Reparent(self.floatframe)
|
||||
@@ -180,13 +182,17 @@ class wxFloatBar(wxToolBar):
|
||||
if not self.IsFloatable():
|
||||
e.Skip()
|
||||
return
|
||||
if e.ButtonDown() or e.ButtonUp() or e.ButtonDClick(1) or e.ButtonDClick(2) or e.ButtonDClick(3):
|
||||
|
||||
if e.ButtonDClick(1) or e.ButtonDClick(2) or e.ButtonDClick(3) or e.ButtonDown() or e.ButtonUp():
|
||||
e.Skip()
|
||||
|
||||
if e.ButtonDown():
|
||||
self.CaptureMouse()
|
||||
self.oldpos = (e.GetX(), e.GetY())
|
||||
|
||||
if e.Entering():
|
||||
self.oldpos = (e.GetX(), e.GetY())
|
||||
|
||||
if e.ButtonUp():
|
||||
self.ReleaseMouse()
|
||||
if self.IsFloating():
|
||||
@@ -196,16 +202,17 @@ class wxFloatBar(wxToolBar):
|
||||
abs(homepos.y - floatpos.y) < _DOCKTHRESHOLD):
|
||||
self.Float(0)
|
||||
return
|
||||
if self.IsFloatable():
|
||||
if e.Dragging():
|
||||
if not self.IsFloating():
|
||||
self.Float(true)
|
||||
self.oldpos = (e.GetX(), e.GetY())
|
||||
else:
|
||||
if hasattr(self, 'oldpos'):
|
||||
loc = self.floatframe.GetPosition()
|
||||
pt = wxPoint(loc.x - (self.oldpos[0]-e.GetX()), loc.y - (self.oldpos[1]-e.GetY()))
|
||||
self.floatframe.SetPosition(pt)
|
||||
|
||||
if e.Dragging():
|
||||
if not self.IsFloating():
|
||||
self.Float(true)
|
||||
self.oldpos = (e.GetX(), e.GetY())
|
||||
else:
|
||||
if hasattr(self, 'oldpos'):
|
||||
loc = self.floatframe.GetPosition()
|
||||
pt = wxPoint(loc.x - (self.oldpos[0]-e.GetX()), loc.y - (self.oldpos[1]-e.GetY()))
|
||||
self.floatframe.Move(pt)
|
||||
|
||||
|
||||
|
||||
def _SetFauxBarVisible(self, vis):
|
||||
|
@@ -466,6 +466,10 @@ public:
|
||||
bool IsBold(const wxTreeItemId& item) const;
|
||||
wxTreeItemId HitTest(const wxPoint& point);
|
||||
|
||||
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
|
||||
void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
|
||||
void SetItemFont(const wxTreeItemId& item, const wxFont& font);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
void SetItemDropHighlight(const wxTreeItemId& item, int highlight = TRUE);
|
||||
|
||||
|
@@ -5779,6 +5779,141 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_SetItemTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemTextColour(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxTreeCtrl * _arg0;
|
||||
wxTreeItemId * _arg1;
|
||||
wxColour * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
char *_kwnames[] = { "self","item","col", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemTextColour",_kwnames,&_argo0,&_argo1,&_argo2))
|
||||
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_SetItemTextColour. 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_SetItemTextColour. Expected _wxTreeItemId_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemTextColour. Expected _wxColour_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_SetItemBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBackgroundColour(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxTreeCtrl * _arg0;
|
||||
wxTreeItemId * _arg1;
|
||||
wxColour * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
char *_kwnames[] = { "self","item","col", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_argo1,&_argo2))
|
||||
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_SetItemBackgroundColour. 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_SetItemBackgroundColour. Expected _wxTreeItemId_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxColour_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxColour_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_SetItemFont(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemFont(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxTreeCtrl * _arg0;
|
||||
wxTreeItemId * _arg1;
|
||||
wxFont * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
char *_kwnames[] = { "self","item","font", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_SetItemFont",_kwnames,&_argo0,&_argo1,&_argo2))
|
||||
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_SetItemFont. 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_SetItemFont. Expected _wxTreeItemId_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemFont. Expected _wxFont_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_SetItemDropHighlight(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemDropHighlight(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_SetItemDropHighlight(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5866,6 +6001,9 @@ static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args
|
||||
static PyMethodDef controls2cMethods[] = {
|
||||
{ "wxTreeCtrl_GetBoundingRect", (PyCFunction) _wrap_wxTreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTreeCtrl_SetItemDropHighlight", (PyCFunction) _wrap_wxTreeCtrl_SetItemDropHighlight, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTreeCtrl_SetItemFont", (PyCFunction) _wrap_wxTreeCtrl_SetItemFont, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTreeCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTreeCtrl_SetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_SetItemTextColour, 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 },
|
||||
|
@@ -592,6 +592,15 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
val = apply(controls2c.wxTreeCtrl_HitTest,(self,) + _args, _kwargs)
|
||||
if val: val = wxTreeItemIdPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def SetItemTextColour(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_SetItemTextColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetItemBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_SetItemBackgroundColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetItemFont(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_SetItemFont,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetItemDropHighlight(self, *_args, **_kwargs):
|
||||
val = apply(controls2c.wxTreeCtrl_SetItemDropHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
@@ -3112,6 +3112,42 @@ static PyObject *_wrap_wxWindow_ReleaseMouse(PyObject *self, PyObject *args, PyO
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxWindow_RemoveChild(_swigobj,_swigarg0) (_swigobj->RemoveChild(_swigarg0))
|
||||
static PyObject *_wrap_wxWindow_RemoveChild(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxWindow * _arg0;
|
||||
wxWindow * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","child", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_RemoveChild",_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_RemoveChild. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_RemoveChild. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxWindow_RemoveChild(_arg0,_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxWindow_Reparent(_swigobj,_swigarg0) (_swigobj->Reparent(_swigarg0))
|
||||
static PyObject *_wrap_wxWindow_Reparent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -3803,7 +3839,7 @@ static PyObject *_wrap_wxWindow_SetSize(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
|
||||
static void wxWindow_SetPosition(wxWindow *self,const wxPoint & pos) {
|
||||
self->SetSize(pos.x, pos.y, -1, -1);
|
||||
self->Move(pos);
|
||||
}
|
||||
static PyObject *_wrap_wxWindow_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5377,6 +5413,34 @@ static PyObject *_wrap_wxScrolledWindow_EnableScrolling(PyObject *self, PyObject
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_GetScrollPageSize(_swigobj,_swigarg0) (_swigobj->GetScrollPageSize(_swigarg0))
|
||||
static PyObject *_wrap_wxScrolledWindow_GetScrollPageSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
wxScrolledWindow * _arg0;
|
||||
int _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","orient", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxScrolledWindow_GetScrollPageSize",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetScrollPageSize. Expected _wxScrolledWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (int )wxScrolledWindow_GetScrollPageSize(_arg0,_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_GetScrollPixelsPerUnit(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetScrollPixelsPerUnit(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxScrolledWindow_GetScrollPixelsPerUnit(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5424,6 +5488,40 @@ static PyObject *_wrap_wxScrolledWindow_GetScrollPixelsPerUnit(PyObject *self, P
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_GetTargetWindow(_swigobj) (_swigobj->GetTargetWindow())
|
||||
static PyObject *_wrap_wxScrolledWindow_GetTargetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxWindow * _result;
|
||||
wxScrolledWindow * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrolledWindow_GetTargetWindow",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetTargetWindow. Expected _wxScrolledWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxWindow *)wxScrolledWindow_GetTargetWindow(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_GetVirtualSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetVirtualSize(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxScrolledWindow_GetVirtualSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5596,6 +5694,35 @@ static PyObject *_wrap_wxScrolledWindow_SetScrollbars(PyObject *self, PyObject *
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_SetScrollPageSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetScrollPageSize(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxScrolledWindow_SetScrollPageSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxScrolledWindow * _arg0;
|
||||
int _arg1;
|
||||
int _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","orient","pageSize", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_SetScrollPageSize",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_SetScrollPageSize. Expected _wxScrolledWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxScrolledWindow_SetScrollPageSize(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_SetTargetWindow(_swigobj,_swigarg0) (_swigobj->SetTargetWindow(_swigarg0))
|
||||
static PyObject *_wrap_wxScrolledWindow_SetTargetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -8642,12 +8769,15 @@ static PyMethodDef windowscMethods[] = {
|
||||
{ "wxScrolledWindow_CalcScrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcScrolledPosition, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_ViewStart", (PyCFunction) _wrap_wxScrolledWindow_ViewStart, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_SetTargetWindow", (PyCFunction) _wrap_wxScrolledWindow_SetTargetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_SetScrollPageSize", (PyCFunction) _wrap_wxScrolledWindow_SetScrollPageSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_SetScrollbars", (PyCFunction) _wrap_wxScrolledWindow_SetScrollbars, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_Scroll", (PyCFunction) _wrap_wxScrolledWindow_Scroll, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_PrepareDC", (PyCFunction) _wrap_wxScrolledWindow_PrepareDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_IsRetained", (PyCFunction) _wrap_wxScrolledWindow_IsRetained, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_GetVirtualSize", (PyCFunction) _wrap_wxScrolledWindow_GetVirtualSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_GetTargetWindow", (PyCFunction) _wrap_wxScrolledWindow_GetTargetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_GetScrollPixelsPerUnit", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPixelsPerUnit, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_GetScrollPageSize", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPageSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_EnableScrolling", (PyCFunction) _wrap_wxScrolledWindow_EnableScrolling, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxScrolledWindow", (PyCFunction) _wrap_new_wxScrolledWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDialog_SetReturnCode", (PyCFunction) _wrap_wxDialog_SetReturnCode, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -8714,6 +8844,7 @@ static PyMethodDef windowscMethods[] = {
|
||||
{ "wxWindow_ScreenToClient", (PyCFunction) _wrap_wxWindow_ScreenToClient, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_ScreenToClientXY", (PyCFunction) _wrap_wxWindow_ScreenToClientXY, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_Reparent", (PyCFunction) _wrap_wxWindow_Reparent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_RemoveChild", (PyCFunction) _wrap_wxWindow_RemoveChild, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_ReleaseMouse", (PyCFunction) _wrap_wxWindow_ReleaseMouse, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_Refresh", (PyCFunction) _wrap_wxWindow_Refresh, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_Raise", (PyCFunction) _wrap_wxWindow_Raise, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -329,6 +329,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
def ReleaseMouse(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_ReleaseMouse,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RemoveChild(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_RemoveChild,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Reparent(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_Reparent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -583,9 +586,16 @@ class wxScrolledWindowPtr(wxPanelPtr):
|
||||
def EnableScrolling(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_EnableScrolling,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetScrollPageSize(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_GetScrollPageSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetScrollPixelsPerUnit(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_GetScrollPixelsPerUnit,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetTargetWindow(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_GetTargetWindow,(self,) + _args, _kwargs)
|
||||
if val: val = wxWindowPtr(val)
|
||||
return val
|
||||
def GetVirtualSize(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_GetVirtualSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -601,6 +611,9 @@ class wxScrolledWindowPtr(wxPanelPtr):
|
||||
def SetScrollbars(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_SetScrollbars,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetScrollPageSize(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_SetScrollPageSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetTargetWindow(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_SetTargetWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
@@ -719,13 +719,12 @@ static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObjec
|
||||
bool _result;
|
||||
wxGrid * _arg0;
|
||||
int _arg1 = (int ) 1;
|
||||
bool _arg2 = (bool ) TRUE;
|
||||
int _arg2 = (int ) TRUE;
|
||||
PyObject * _argo0 = 0;
|
||||
int tempbool2 = (int) TRUE;
|
||||
char *_kwnames[] = { "self","n","updateLabels", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendCols",_kwnames,&_argo0,&_arg1,&tempbool2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendCols",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -734,7 +733,6 @@ static PyObject *_wrap_wxGrid_AppendCols(PyObject *self, PyObject *args, PyObjec
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxGrid_AppendCols(_arg0,_arg1,_arg2);
|
||||
@@ -750,13 +748,12 @@ static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObjec
|
||||
bool _result;
|
||||
wxGrid * _arg0;
|
||||
int _arg1 = (int ) 1;
|
||||
bool _arg2 = (bool ) TRUE;
|
||||
int _arg2 = (int ) TRUE;
|
||||
PyObject * _argo0 = 0;
|
||||
int tempbool2 = (int) TRUE;
|
||||
char *_kwnames[] = { "self","n","updateLabels", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendRows",_kwnames,&_argo0,&_arg1,&tempbool2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxGrid_AppendRows",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -765,7 +762,6 @@ static PyObject *_wrap_wxGrid_AppendRows(PyObject *self, PyObject *args, PyObjec
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxGrid_AppendRows(_arg0,_arg1,_arg2);
|
||||
|
@@ -975,10 +975,10 @@ def EVT_QUERY_NEW_PALETTE(win, func):
|
||||
win.Connect(-1, -1, wxEVT_QUERY_NEW_PALETTE, func)
|
||||
|
||||
def EVT_WINDOW_CREATE(win, func):
|
||||
win.Connect(-1, -1, wxEVT_WINDOW_CREATE, func)
|
||||
win.Connect(-1, -1, wxEVT_CREATE, func)
|
||||
|
||||
def EVT_WINDOW_DESTROY(win, func):
|
||||
win.Connect(-1, -1, wxEVT_WINDOW_DESTROY, func)
|
||||
win.Connect(-1, -1, wxEVT_DESTROY, func)
|
||||
|
||||
|
||||
|
||||
|
@@ -255,6 +255,7 @@ public:
|
||||
void Raise();
|
||||
void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
|
||||
void ReleaseMouse();
|
||||
void RemoveChild(wxWindow* child);
|
||||
bool Reparent( wxWindow* newParent );
|
||||
|
||||
// (uses apply'ed INOUT typemap, see above)
|
||||
@@ -280,11 +281,11 @@ public:
|
||||
%name(SetDimensions) void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO);
|
||||
%addmethods {
|
||||
void SetSize(const wxSize& size) {
|
||||
self->SetSize(size.x, size.y);
|
||||
self->SetSize(size);
|
||||
}
|
||||
|
||||
void SetPosition(const wxPoint& pos) {
|
||||
self->SetSize(pos.x, pos.y, -1, -1);
|
||||
self->Move(pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +435,9 @@ public:
|
||||
%pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)"
|
||||
|
||||
void EnableScrolling(bool xScrolling, bool yScrolling);
|
||||
int GetScrollPageSize(int orient);
|
||||
void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT);
|
||||
wxWindow* GetTargetWindow();
|
||||
void GetVirtualSize(int* OUTPUT, int* OUTPUT);
|
||||
bool IsRetained();
|
||||
void PrepareDC(wxDC& dc);
|
||||
@@ -442,6 +445,7 @@ public:
|
||||
void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0);
|
||||
void SetScrollPageSize(int orient, int pageSize);
|
||||
void SetTargetWindow(wxWindow* window);
|
||||
void ViewStart(int* OUTPUT, int* OUTPUT);
|
||||
|
||||
|
@@ -90,8 +90,8 @@ public:
|
||||
|
||||
|
||||
void AdjustScrollbars();
|
||||
bool AppendCols(int n=1, bool updateLabels=TRUE);
|
||||
bool AppendRows(int n=1, bool updateLabels=TRUE);
|
||||
bool AppendCols(int n=1, int updateLabels=TRUE);
|
||||
bool AppendRows(int n=1, int updateLabels=TRUE);
|
||||
void BeginBatch();
|
||||
bool CellHitTest(int x, int y, int *OUTPUT, int *OUTPUT);
|
||||
|
||||
|
Reference in New Issue
Block a user