reSWIGged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2543,6 +2543,14 @@ class ToolBarBase(core.Control):
|
||||
return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.ITEM_RADIO,
|
||||
shortHelp, longHelp, clientData)
|
||||
|
||||
def AddToolItem(*args, **kwargs):
|
||||
"""AddToolItem(ToolBarToolBase tool) -> ToolBarToolBase"""
|
||||
return _controls.ToolBarBase_AddToolItem(*args, **kwargs)
|
||||
|
||||
def InsertToolItem(*args, **kwargs):
|
||||
"""InsertToolItem(size_t pos, ToolBarToolBase tool) -> ToolBarToolBase"""
|
||||
return _controls.ToolBarBase_InsertToolItem(*args, **kwargs)
|
||||
|
||||
def AddControl(*args, **kwargs):
|
||||
"""AddControl(Control control) -> ToolBarToolBase"""
|
||||
return _controls.ToolBarBase_AddControl(*args, **kwargs)
|
||||
@@ -2695,6 +2703,10 @@ class ToolBarBase(core.Control):
|
||||
"""FindToolForPosition(int x, int y) -> ToolBarToolBase"""
|
||||
return _controls.ToolBarBase_FindToolForPosition(*args, **kwargs)
|
||||
|
||||
def FindById(*args, **kwargs):
|
||||
"""FindById(int toolid) -> ToolBarToolBase"""
|
||||
return _controls.ToolBarBase_FindById(*args, **kwargs)
|
||||
|
||||
def IsVertical(*args, **kwargs):
|
||||
"""IsVertical() -> bool"""
|
||||
return _controls.ToolBarBase_IsVertical(*args, **kwargs)
|
||||
|
@@ -13660,6 +13660,70 @@ static PyObject *_wrap_ToolBarBase_DoInsertTool(PyObject *self, PyObject *args,
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_ToolBarBase_AddToolItem(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
wxToolBarToolBase *arg2 = (wxToolBarToolBase *) 0 ;
|
||||
wxToolBarToolBase *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "tool", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_AddToolItem",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxToolBarToolBase *)(arg1)->AddTool(arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = wxPyMake_wxObject(result);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_ToolBarBase_InsertToolItem(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
size_t arg2 ;
|
||||
wxToolBarToolBase *arg3 = (wxToolBarToolBase *) 0 ;
|
||||
wxToolBarToolBase *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "pos",(char *) "tool", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertToolItem",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
arg2 = (size_t) PyInt_AsLong(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxToolBarToolBase *)(arg1)->InsertTool(arg2,arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = wxPyMake_wxObject(result);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_ToolBarBase_AddControl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
@@ -14741,6 +14805,34 @@ static PyObject *_wrap_ToolBarBase_FindToolForPosition(PyObject *self, PyObject
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_ToolBarBase_FindById(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
int arg2 ;
|
||||
wxToolBarToolBase *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "toolid", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:ToolBarBase_FindById",kwnames,&obj0,&arg2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxToolBarToolBase *)((wxToolBarBase const *)arg1)->FindById(arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = wxPyMake_wxObject(result);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_ToolBarBase_IsVertical(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
@@ -26215,6 +26307,8 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"ToolBarToolBase_swigregister", ToolBarToolBase_swigregister, METH_VARARGS },
|
||||
{ (char *)"ToolBarBase_DoAddTool", (PyCFunction) _wrap_ToolBarBase_DoAddTool, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_DoInsertTool", (PyCFunction) _wrap_ToolBarBase_DoInsertTool, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_AddToolItem", (PyCFunction) _wrap_ToolBarBase_AddToolItem, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_InsertToolItem", (PyCFunction) _wrap_ToolBarBase_InsertToolItem, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_AddControl", (PyCFunction) _wrap_ToolBarBase_AddControl, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_InsertControl", (PyCFunction) _wrap_ToolBarBase_InsertControl, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_FindControl", (PyCFunction) _wrap_ToolBarBase_FindControl, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -26253,6 +26347,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"ToolBarBase_GetToolBitmapSize", (PyCFunction) _wrap_ToolBarBase_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_GetToolSize", (PyCFunction) _wrap_ToolBarBase_GetToolSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_FindToolForPosition", (PyCFunction) _wrap_ToolBarBase_FindToolForPosition, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_FindById", (PyCFunction) _wrap_ToolBarBase_FindById, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_IsVertical", (PyCFunction) _wrap_ToolBarBase_IsVertical, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"ToolBarBase_swigregister", ToolBarBase_swigregister, METH_VARARGS },
|
||||
{ (char *)"new_ToolBar", (PyCFunction) _wrap_new_ToolBar, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -585,6 +585,8 @@ class ObjectPtr(Object):
|
||||
_core.Object_swigregister(ObjectPtr)
|
||||
_wxPySetDictionary = _core._wxPySetDictionary
|
||||
|
||||
_wxPyFixStockObjects = _core._wxPyFixStockObjects
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -7974,7 +7976,6 @@ if RELEASE_VERSION != _core.RELEASE_VERSION:
|
||||
class PyDeadObjectError(AttributeError):
|
||||
pass
|
||||
|
||||
|
||||
class _wxPyDeadObject(object):
|
||||
"""
|
||||
Instances of wx objects that are OOR capable will have their __class__
|
||||
@@ -7984,15 +7985,46 @@ class _wxPyDeadObject(object):
|
||||
reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
|
||||
attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
|
||||
|
||||
def __repr__( self ):
|
||||
def __repr__(self):
|
||||
if not hasattr(self, "_name"):
|
||||
self._name = "[unknown]"
|
||||
return self.reprStr % self._name
|
||||
|
||||
def __getattr__( self, *args ):
|
||||
def __getattr__(self, *args):
|
||||
if not hasattr(self, "_name"):
|
||||
self._name = "[unknown]"
|
||||
raise PyDeadObjectError( self.attrStr % self._name )
|
||||
raise PyDeadObjectError(self.attrStr % self._name)
|
||||
|
||||
def __nonzero__(self):
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
class PyUnbornObjectError(AttributeError):
|
||||
pass
|
||||
|
||||
class _wxPyUnbornObject(object):
|
||||
"""
|
||||
Some stock objects are created when the wx.core module is
|
||||
imported, but their C++ instance is not created until the wx.App
|
||||
object is created and initialized. These object instances will
|
||||
temporarily have their __class__ changed to this class so an
|
||||
exception will be raised if they are used before the C++ instance
|
||||
is ready.
|
||||
"""
|
||||
|
||||
reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
|
||||
attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
|
||||
|
||||
def __repr__(self):
|
||||
#if not hasattr(self, "_name"):
|
||||
# self._name = "[unknown]"
|
||||
return self.reprStr #% self._name
|
||||
|
||||
def __getattr__(self, *args):
|
||||
#if not hasattr(self, "_name"):
|
||||
# self._name = "[unknown]"
|
||||
raise PyUnbornObjectError(self.attrStr) # % self._name )
|
||||
|
||||
def __nonzero__(self):
|
||||
return 0
|
||||
@@ -8127,6 +8159,11 @@ from windows import *
|
||||
from controls import *
|
||||
from misc import *
|
||||
|
||||
|
||||
# Fixup the stock objects since they can't be used yet. (They will be
|
||||
# restored in wx.PyApp.OnInit.)
|
||||
_core._wxPyFixStockObjects()
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@@ -35468,6 +35468,7 @@ static PyObject * LayoutConstraints_swigregister(PyObject *self, PyObject *args)
|
||||
}
|
||||
static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"_wxPySetDictionary", __wxPySetDictionary, METH_VARARGS },
|
||||
{ (char *)"_wxPyFixStockObjects", __wxPyFixStockObjects, METH_VARARGS },
|
||||
{ (char *)"Object_GetClassName", (PyCFunction) _wrap_Object_GetClassName, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Object_Destroy", (PyCFunction) _wrap_Object_Destroy, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Object_swigregister", Object_swigregister, METH_VARARGS },
|
||||
|
@@ -101,7 +101,7 @@ class Colour(core.Object):
|
||||
|
||||
asTuple = Get
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return 'wxColour' + str(self.asTuple())
|
||||
def __repr__(self): return 'wx.Colour' + str(self.asTuple())
|
||||
def __nonzero__(self): return self.Ok()
|
||||
def __getinitargs__(self): return ()
|
||||
def __getstate__(self): return self.asTuple()
|
||||
|
Reference in New Issue
Block a user