// OOR Support
-%typemap(python, out) wxPyShape* { $target = wxPyMake_wxObject($source); }
-%typemap(python, out) wxPyShapeEvtHandler* { $target = wxPyMake_wxObject($source); }
+%typemap(python, out) wxPyShape* { $target = wxPyMake_wxShapeEvtHandler($source); }
+%typemap(python, out) wxPyShapeEvtHandler* { $target = wxPyMake_wxShapeEvtHandler($source); }
+%typemap(python, out) wxPyDivisionShape* { $target = wxPyMake_wxShapeEvtHandler($source); }
+
%typemap(python, out) wxPyShapeCanvas* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxDiagram* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxOGLConstraint* { $target = wxPyMake_wxObject($source); }
-%typemap(python, out) wxPyDivisionShape* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxPseudoMetaFile* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxArrowHead* { $target = wxPyMake_wxObject($source); }
char errmsg[1024];
sprintf(errmsg, "Type error, expected list of %s objects", className);
PyErr_SetString(PyExc_TypeError, errmsg);
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads(state);
return NULL;
}
list->Append(wxo);
return list;
}
+//---------------------------------------------------------------------------
+
+PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
+ PyObject* target = NULL;
+
+ if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
+ // If it's derived from wxShapeEvtHandler then there may
+ // already be a pointer to a Python object that we can use
+ // in the OOR data.
+ wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
+ wxPyClientData* data = (wxPyClientData*)seh->GetClientObject();
+ if (data) {
+ target = data->m_obj;
+ Py_INCREF(target);
+ }
+ }
+ if (! target) {
+ target = wxPyMake_wxObject2(source, FALSE);
+ if (target != Py_None)
+ ((wxShapeEvtHandler*)source)->SetClientObject(new wxPyClientData(target));
+ }
+ return target;
+}
+
+
//---------------------------------------------------------------------------
char errmsg[1024];
sprintf(errmsg, "Type error, expected list of %s objects", className);
PyErr_SetString(PyExc_TypeError, errmsg);
- wxPyEndBlockThreads(state);
+ wxPyEndBlockThreads(state);
return NULL;
}
list->Append(wxo);
return list;
}
+//---------------------------------------------------------------------------
+
+PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
+ PyObject* target = NULL;
+
+ if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
+ // If it's derived from wxShapeEvtHandler then there may
+ // already be a pointer to a Python object that we can use
+ // in the OOR data.
+ wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
+ wxPyClientData* data = (wxPyClientData*)seh->GetClientObject();
+ if (data) {
+ target = data->m_obj;
+ Py_INCREF(target);
+ }
+ }
+ if (! target) {
+ target = wxPyMake_wxObject2(source, FALSE);
+ if (target != Py_None)
+ ((wxShapeEvtHandler*)source)->SetClientObject(new wxPyClientData(target));
+ }
+ return target;
+}
+
+
//---------------------------------------------------------------------------
return _resultobj;
}
+static void wxPyShapeEvtHandler__setOORInfo(wxPyShapeEvtHandler *self,PyObject * _self) {
+ self->SetClientObject(new wxPyClientData(_self));
+ }
+static PyObject *_wrap_wxPyShapeEvtHandler__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyShapeEvtHandler * _arg0;
+ PyObject * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","_self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShapeEvtHandler__setOORInfo",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShapeEvtHandler_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShapeEvtHandler__setOORInfo. Expected _wxPyShapeEvtHandler_p.");
+ return NULL;
+ }
+ }
+{
+ _arg1 = _obj1;
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxPyShapeEvtHandler__setOORInfo(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define wxPyShapeEvtHandler_SetShape(_swigobj,_swigarg0) (_swigobj->SetShape(_swigarg0))
static PyObject *_wrap_wxPyShapeEvtHandler_SetShape(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
_result = (wxPyShape *)wxPyShapeEvtHandler_GetShape(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_GetPreviousHandler(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_CreateNewCopy(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
return _resultobj;
}
-static void wxPyShape_Destroy(wxPyShape *self) { delete self; }
-static PyObject *_wrap_wxPyShape_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- wxPyShape * _arg0;
- PyObject * _argo0 = 0;
- char *_kwnames[] = { "self", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_Destroy",_kwnames,&_argo0))
- return NULL;
- if (_argo0) {
- if (_argo0 == Py_None) { _arg0 = NULL; }
- else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_Destroy. Expected _wxPyShape_p.");
- return NULL;
- }
- }
-{
- wxPy_BEGIN_ALLOW_THREADS;
- wxPyShape_Destroy(_arg0);
-
- wxPy_END_ALLOW_THREADS;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
- return _resultobj;
-}
-
#define wxPyShape_GetBoundingBoxMax(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetBoundingBoxMax(_swigarg0,_swigarg1))
static PyObject *_wrap_wxPyShape_GetBoundingBoxMax(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
_result = (wxPyShape *)wxPyShape_GetParent(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShape *)wxPyShape_GetTopAncestor(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShapeEvtHandler *)wxPyShape_GetEventHandler(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg2));
_result = (wxPyShape *)wxPyShape_CreateNewCopy(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
return _resultobj;
}
+#define wxPyShape_GetBackgroundPen(_swigobj) (_swigobj->GetBackgroundPen())
+static PyObject *_wrap_wxPyShape_GetBackgroundPen(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPen * _result;
+ wxPyShape * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetBackgroundPen",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_GetBackgroundPen. Expected _wxPyShape_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxPen (wxPyShape_GetBackgroundPen(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPen_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
+#define wxPyShape_GetBackgroundBrush(_swigobj) (_swigobj->GetBackgroundBrush())
+static PyObject *_wrap_wxPyShape_GetBackgroundBrush(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxBrush * _result;
+ wxPyShape * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetBackgroundBrush",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_GetBackgroundBrush. Expected _wxPyShape_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxBrush (wxPyShape_GetBackgroundBrush(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
#define wxPyShape_base_OnDelete(_swigobj) (_swigobj->base_OnDelete())
static PyObject *_wrap_wxPyShape_base_OnDelete(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxPyShape_base_OnDrawContents", (PyCFunction) _wrap_wxPyShape_base_OnDrawContents, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_base_OnDraw", (PyCFunction) _wrap_wxPyShape_base_OnDraw, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_base_OnDelete", (PyCFunction) _wrap_wxPyShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyShape_GetBackgroundBrush", (PyCFunction) _wrap_wxPyShape_GetBackgroundBrush, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyShape_GetBackgroundPen", (PyCFunction) _wrap_wxPyShape_GetBackgroundPen, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_ClearPointList", (PyCFunction) _wrap_wxPyShape_ClearPointList, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_Recentre", (PyCFunction) _wrap_wxPyShape_Recentre, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_ClearAttachments", (PyCFunction) _wrap_wxPyShape_ClearAttachments, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_GetPerimeterPoint", (PyCFunction) _wrap_wxPyShape_GetPerimeterPoint, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_GetBoundingBoxMin", (PyCFunction) _wrap_wxPyShape_GetBoundingBoxMin, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape_GetBoundingBoxMax", (PyCFunction) _wrap_wxPyShape_GetBoundingBoxMax, METH_VARARGS | METH_KEYWORDS },
- { "wxPyShape_Destroy", (PyCFunction) _wrap_wxPyShape_Destroy, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShape__setCallbackInfo", (PyCFunction) _wrap_wxPyShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler_base_OnEndSize", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler_base_OnBeginSize", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxPyShapeEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler_GetShape", (PyCFunction) _wrap_wxPyShapeEvtHandler_GetShape, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler_SetShape", (PyCFunction) _wrap_wxPyShapeEvtHandler_SetShape, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyShapeEvtHandler__setOORInfo", (PyCFunction) _wrap_wxPyShapeEvtHandler__setOORInfo, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler_Destroy", (PyCFunction) _wrap_wxPyShapeEvtHandler_Destroy, METH_VARARGS | METH_KEYWORDS },
{ "wxPyShapeEvtHandler__setCallbackInfo", (PyCFunction) _wrap_wxPyShapeEvtHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyShapeEvtHandler", (PyCFunction) _wrap_new_wxPyShapeEvtHandler, METH_VARARGS | METH_KEYWORDS },
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeEvtHandler)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%addmethods { void Destroy() { delete self; } }
+ %addmethods {
+ void _setOORInfo(PyObject* _self) {
+ self->SetClientObject(new wxPyClientData(_self));
+ }
+ }
+
void SetShape(wxPyShape *sh);
wxPyShape *GetShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShape)"
-
- %addmethods {
- void Destroy() { delete self; }
- }
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT);
void GetBoundingBoxMin(double *OUTPUT, double *OUTPUT);
void ClearAttachments();
void Recentre(wxDC& dc);
void ClearPointList(wxList& list);
+ wxPen GetBackgroundPen();
+ wxBrush GetBackgroundBrush();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
def Destroy(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_Destroy,(self,) + _args, _kwargs)
return val
+ def _setOORInfo(self, *_args, **_kwargs):
+ val = apply(oglbasicc.wxPyShapeEvtHandler__setOORInfo,(self,) + _args, _kwargs)
+ return val
def SetShape(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShapeEvtHandler_SetShape,(self,) + _args, _kwargs)
return val
self.this = apply(oglbasicc.new_wxPyShapeEvtHandler,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyShapeEvtHandler)
+ self._setOORInfo(self)
def _setCallbackInfo(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape__setCallbackInfo,(self,) + _args, _kwargs)
return val
- def Destroy(self, *_args, **_kwargs):
- val = apply(oglbasicc.wxPyShape_Destroy,(self,) + _args, _kwargs)
- return val
def GetBoundingBoxMax(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_GetBoundingBoxMax,(self,) + _args, _kwargs)
return val
def ClearPointList(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_ClearPointList,(self,) + _args, _kwargs)
return val
+ def GetBackgroundPen(self, *_args, **_kwargs):
+ val = apply(oglbasicc.wxPyShape_GetBackgroundPen,(self,) + _args, _kwargs)
+ if val: val = wxPenPtr(val) ; val.thisown = 1
+ return val
+ def GetBackgroundBrush(self, *_args, **_kwargs):
+ val = apply(oglbasicc.wxPyShape_GetBackgroundBrush,(self,) + _args, _kwargs)
+ if val: val = wxBrushPtr(val) ; val.thisown = 1
+ return val
def base_OnDelete(self, *_args, **_kwargs):
val = apply(oglbasicc.wxPyShape_base_OnDelete,(self,) + _args, _kwargs)
return val
_result = (wxPyShape *)wxDiagram_FindShape(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShape *)wxPyShapeCanvas_FindShape(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg3));
_result = (wxPyShape *)wxPyShapeCanvas_FindFirstSensitiveShape(_arg0,_arg1,_arg2,_arg3,_arg4);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg3));
//---------------------------------------------------------------------------
-// These are prototypes of some helper functions found in oglhelpers.cpp
+// These are prototypes of some helper functions found in ogl.i
wxList* wxPy_wxListHelper(PyObject* pyList, char* className);
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
+PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source);
_result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyRectangleShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void SetCornerRadius(double radius);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControlPoint)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void SetCornerRadius(double radius);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyBitmapShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxBitmap& GetBitmap();
wxString GetFilename();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDrawnShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void CalculateSize();
void DestroyClippingRect();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCompositeShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDividedShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void EditRegions();
void SetRegionSizes();
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDivisionShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AdjustBottom(double bottom, bool test);
void AdjustLeft(double left, bool test);
self.this = apply(oglshapesc.new_wxPyRectangleShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyRectangleShape)
+ self._setOORInfo(self)
self.this = apply(oglshapesc.new_wxPyControlPoint,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyControlPoint)
+ self._setOORInfo(self)
self.this = apply(oglshapesc.new_wxPyBitmapShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyBitmapShape)
+ self._setOORInfo(self)
self.this = apply(oglshapesc.new_wxPyDrawnShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyDrawnShape)
+ self._setOORInfo(self)
self.this = apply(oglshapesc.new_wxPyCompositeShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyCompositeShape)
+ self._setOORInfo(self)
self.this = apply(oglshapesc.new_wxPyDividedShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyDividedShape)
+ self._setOORInfo(self)
self.this = apply(oglshapesc.new_wxPyDivisionShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyDivisionShape)
+ self._setOORInfo(self)
_result = (wxPyShape *)wxPyLineShape_GetFrom(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
_result = (wxPyShape *)wxPyLineShape_GetTo(_arg0);
wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
return _resultobj;
}
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyEllipseShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCircleShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyLineShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void AddArrow(int type, int end = ARROW_POSITION_END,
double arrowSize = 10.0, double xOffset = 0.0,
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPolygonShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
// void Create(wxList* points);
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyTextShape)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void base_OnDelete();
self.this = apply(oglshapes2c.new_wxPyEllipseShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyEllipseShape)
+ self._setOORInfo(self)
self.this = apply(oglshapes2c.new_wxPyCircleShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyCircleShape)
+ self._setOORInfo(self)
self.this = apply(oglshapes2c.new_wxPyLineShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyLineShape)
+ self._setOORInfo(self)
self.this = apply(oglshapes2c.new_wxPyPolygonShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyPolygonShape)
+ self._setOORInfo(self)
self.this = apply(oglshapes2c.new_wxPyTextShape,_args,_kwargs)
self.thisown = 1
self._setCallbackInfo(self, wxPyTextShape)
+ self._setOORInfo(self)
def OnLeftClick(self, x, y, keys = 0, attachment = 0):
shape = self.GetShape()
+ print shape.__class__
canvas = shape.GetCanvas()
dc = wxClientDC(canvas)
canvas.PrepareDC(dc)
self.log = log
self.frame = frame
- self.SetBackgroundColour(wxWHITE)
+ self.SetBackgroundColour("LIGHT BLUE") #wxWHITE)
self.diagram = wxDiagram()
self.SetDiagram(self.diagram)
self.diagram.SetCanvas(self)
# for some reason, the shapes have to be moved for the line to show up...
fromShape.Move(dc, fromShape.GetX(), fromShape.GetY())
+## EVT_PAINT(self, self.OnPaint)
+
+## def OnPaint(self, evt):
+## evt.Skip()
+## print "TheLists:", wxThePenList.GetCount(), wxTheBrushList.GetCount(), wxTheFontList.GetCount()
def MyAddShape(self, shape, x, y, pen, brush, text):
ext = Extension('gizmosc', [
'%s/dynamicsash.cpp' % GIZMOLOC,
- #'%s/editlbox.cpp' % GIZMOLOC,
- #'%s/multicell.cpp' % GIZMOLOC,
+ '%s/editlbox.cpp' % GIZMOLOC,
+ '%s/multicell.cpp' % GIZMOLOC,
'%s/splittree.cpp' % GIZMOLOC,
] + swig_sources,
wxPROCESS_ENTER,
wxPASSWORD,
- wxTE_PROCESS_ENTER,
- wxTE_PROCESS_TAB,
- wxTE_PASSWORD,
wxTE_READONLY,
- wxTE_RICH,
wxTE_MULTILINE,
- wxTE_AUTO_SCROLL,
+ wxTE_PROCESS_TAB,
+ wxTE_RICH,
wxTE_NO_VSCROLL,
+ wxTE_AUTO_SCROLL,
+ wxTE_PROCESS_ENTER,
+ wxTE_PASSWORD,
wxTE_AUTO_URL,
wxTE_NOHIDESEL,
+ wxTE_DONTWRAP,
+ wxTE_LINEWRAP,
+ wxTE_WORDWRAP,
wxCB_SIMPLE,
wxCB_DROPDOWN,
// returns false if we have any attributes set, true otherwise
bool IsDefault();
+
+ // return the attribute having the valid font and colours: it uses the
+ // attributes set in attr and falls back first to attrDefault and then to
+ // the text control font/colours for those attributes which are not set
+ static wxTextAttr Combine(const wxTextAttr& attr,
+ const wxTextAttr& attrDef,
+ const wxTextCtrl *text);
};
self->AppendText(text);
}
}
+
+ // TODO: replace this when the method is really added to wxTextCtrl
+ %addmethods {
+ wxString GetString(long from, long to) {
+ return self->GetValue().Mid(from, to-from);
+ }
+ }
};
//----------------------------------------------------------------------
#define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
#define wxPyClassExists(a) (wxPyCoreAPIPtr->p_wxPyClassExists(a))
-#define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a))
+#define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,TRUE))
+#define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
+#define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
#define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
bool underline = FALSE, const char* facename = NULL,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
void RemoveFont(wxFont *font);
+
+ int GetCount();
};
void AddPen(wxPen* pen);
wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
void RemovePen(wxPen* pen);
+
+ int GetCount();
};
void AddBrush(wxBrush *brush);
wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
void RemoveBrush(wxBrush *brush);
+
+ int GetCount();
};
//----------------------------------------------------------------------
}
-PyObject* wxPyMake_wxObject(wxObject* source) {
+PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
PyObject* target = NULL;
bool isEvtHandler = FALSE;
if (source) {
// If it's derived from wxEvtHandler then there may
- // already be a pointer to a Python objec that we can use.
- if (wxIsKindOf(source, wxEvtHandler)) {
+ // already be a pointer to a Python object that we can use
+ // in the OOR data.
+ if (checkEvtHandler && wxIsKindOf(source, wxEvtHandler)) {
+ isEvtHandler = TRUE;
wxEvtHandler* eh = (wxEvtHandler*)source;
wxPyClientData* data = (wxPyClientData*)eh->GetClientObject();
if (data) {
Py_INCREF(target);
}
}
- else if (wxIsKindOf(source, wxSizer)) {
- // wxSizers also track the original object
- wxSizer* sz = (wxSizer*)source;
- wxPyClientData* data = (wxPyClientData*)sz->GetClientObject();
- if (data) {
- target = data->m_obj;
- Py_INCREF(target);
- }
- }
if (! target) {
// Otherwise make it the old fashioned way by making a
}
+PyObject* wxPyMake_wxSizer(wxSizer* source) {
+ PyObject* target = NULL;
+
+ if (source && wxIsKindOf(source, wxSizer)) {
+ // If it's derived from wxSizer then there may
+ // already be a pointer to a Python object that we can use
+ // in the OOR data.
+ wxSizer* sz = (wxSizer*)source;
+ wxPyClientData* data = (wxPyClientData*)sz->GetClientObject();
+ if (data) {
+ target = data->m_obj;
+ Py_INCREF(target);
+ }
+ }
+ if (! target) {
+ target = wxPyMake_wxObject(source, FALSE);
+ if (target != Py_None)
+ ((wxSizer*)source)->SetClientObject(new wxPyClientData(target));
+ }
+ return target;
+}
+
+
+
//---------------------------------------------------------------------------
PyObject* wxPyConstructObject(void* ptr,
PyObject* klass,
int setThisOwn=0);
PyObject* wxPyClassExists(const char* className);
-PyObject* wxPyMake_wxObject(wxObject* source);
+PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler=TRUE);
+PyObject* wxPyMake_wxSizer(wxSizer* source);
void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName);
PyObject* wxPy_ConvertList(wxListBase* list, const char* className);
void (*p_wxPyCBH_delete)(wxPyCallbackHelper* cbh);
PyObject* (*p_wxPyClassExists)(const char* className);
- PyObject* (*p_wxPyMake_wxObject)(wxObject* source);
+ PyObject* (*p_wxPyMake_wxObject)(wxObject* source, bool checkEvtHandler);
+ PyObject* (*p_wxPyMake_wxSizer)(wxSizer* source);
void (*p_wxPyPtrTypeMap_Add)(const char* commonName, const char* ptrName);
};
return _resultobj;
}
+static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxTextAttr * _result;
+ wxTextAttr * _arg0;
+ wxTextAttr * _arg1;
+ wxTextCtrl * _arg2;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _argo2 = 0;
+ char *_kwnames[] = { "attr","attrDef","text", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextAttr_Combine",_kwnames,&_argo0,&_argo1,&_argo2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_Combine. Expected _wxTextAttr_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_Combine. Expected _wxTextAttr_p.");
+ return NULL;
+ }
+ }
+ if (_argo2) {
+ if (_argo2 == Py_None) { _arg2 = NULL; }
+ else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTextCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTextAttr_Combine. Expected _wxTextCtrl_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTextAttr_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
static void *SwigwxTextCtrlTowxControl(void *ptr) {
wxTextCtrl *src;
wxControl *dest;
return _resultobj;
}
+static wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to) {
+ return self->GetValue().Mid(from, to-from);
+ }
+static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxTextCtrl * _arg0;
+ long _arg1;
+ long _arg2;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","from","to", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_GetString",_kwnames,&_argo0,&_arg1,&_arg2))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetString. Expected _wxTextCtrl_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
+ return _resultobj;
+}
+
static void *SwigwxScrollBarTowxControl(void *ptr) {
wxScrollBar *src;
wxControl *dest;
{ "wxScrollBar_Create", (PyCFunction) _wrap_wxScrollBar_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreScrollBar", (PyCFunction) _wrap_new_wxPreScrollBar, METH_VARARGS | METH_KEYWORDS },
{ "new_wxScrollBar", (PyCFunction) _wrap_new_wxScrollBar, METH_VARARGS | METH_KEYWORDS },
+ { "wxTextCtrl_GetString", (PyCFunction) _wrap_wxTextCtrl_GetString, METH_VARARGS | METH_KEYWORDS },
{ "wxTextCtrl_write", (PyCFunction) _wrap_wxTextCtrl_write, METH_VARARGS | METH_KEYWORDS },
{ "wxTextCtrl_SetEditable", (PyCFunction) _wrap_wxTextCtrl_SetEditable, METH_VARARGS | METH_KEYWORDS },
{ "wxTextCtrl_SelectAll", (PyCFunction) _wrap_wxTextCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS },
{ "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPreTextCtrl", (PyCFunction) _wrap_new_wxPreTextCtrl, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTextCtrl", (PyCFunction) _wrap_new_wxTextCtrl, METH_VARARGS | METH_KEYWORDS },
+ { "wxTextAttr_Combine", (PyCFunction) _wrap_wxTextAttr_Combine, METH_VARARGS | METH_KEYWORDS },
{ "wxTextAttr_IsDefault", (PyCFunction) _wrap_wxTextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS },
{ "wxTextAttr_GetFont", (PyCFunction) _wrap_wxTextAttr_GetFont, METH_VARARGS | METH_KEYWORDS },
{ "wxTextAttr_GetBackgroundColour", (PyCFunction) _wrap_wxTextAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
def write(self, *_args, **_kwargs):
val = apply(controlsc.wxTextCtrl_write,(self,) + _args, _kwargs)
return val
+ def GetString(self, *_args, **_kwargs):
+ val = apply(controlsc.wxTextCtrl_GetString,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxTextCtrl instance at %s>" % (self.this,)
class wxTextCtrl(wxTextCtrlPtr):
if val: val = wxSizePtr(val); val.thisown = 1
return val
+def wxTextAttr_Combine(*_args, **_kwargs):
+ val = apply(controlsc.wxTextAttr_Combine,_args,_kwargs)
+ if val: val = wxTextAttrPtr(val); val.thisown = 1
+ return val
+
#-------------- VARIABLE WRAPPERS ------------------
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
{
if (_obj1)
delete _arg1;
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
return _resultobj;
}
return _resultobj;
}
+#define wxFontList_GetCount(_swigobj) (_swigobj->GetCount())
+static PyObject *_wrap_wxFontList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxFontList * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontList_GetCount",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_GetCount. Expected _wxFontList_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxFontList_GetCount(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static void *SwigwxColourTowxObject(void *ptr) {
wxColour *src;
wxObject *dest;
return _resultobj;
}
+#define wxPenList_GetCount(_swigobj) (_swigobj->GetCount())
+static PyObject *_wrap_wxPenList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxPenList * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPenList_GetCount",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_GetCount. Expected _wxPenList_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxPenList_GetCount(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static void *SwigwxBrushTowxGDIObject(void *ptr) {
wxBrush *src;
wxGDIObject *dest;
return _resultobj;
}
+#define wxBrushList_GetCount(_swigobj) (_swigobj->GetCount())
+static PyObject *_wrap_wxBrushList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ int _result;
+ wxBrushList * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBrushList_GetCount",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_GetCount. Expected _wxBrushList_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (int )wxBrushList_GetCount(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static void *SwigwxDCTowxObject(void *ptr) {
wxDC *src;
wxObject *dest;
{ "wxDC_Blit", (PyCFunction) _wrap_wxDC_Blit, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_BeginDrawing", (PyCFunction) _wrap_wxDC_BeginDrawing, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxDC", (PyCFunction) _wrap_delete_wxDC, METH_VARARGS | METH_KEYWORDS },
+ { "wxBrushList_GetCount", (PyCFunction) _wrap_wxBrushList_GetCount, METH_VARARGS | METH_KEYWORDS },
{ "wxBrushList_RemoveBrush", (PyCFunction) _wrap_wxBrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS },
{ "wxBrushList_FindOrCreateBrush", (PyCFunction) _wrap_wxBrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS },
{ "wxBrushList_AddBrush", (PyCFunction) _wrap_wxBrushList_AddBrush, METH_VARARGS | METH_KEYWORDS },
{ "wxBrush_GetColour", (PyCFunction) _wrap_wxBrush_GetColour, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxBrush", (PyCFunction) _wrap_delete_wxBrush, METH_VARARGS | METH_KEYWORDS },
{ "new_wxBrush", (PyCFunction) _wrap_new_wxBrush, METH_VARARGS | METH_KEYWORDS },
+ { "wxPenList_GetCount", (PyCFunction) _wrap_wxPenList_GetCount, METH_VARARGS | METH_KEYWORDS },
{ "wxPenList_RemovePen", (PyCFunction) _wrap_wxPenList_RemovePen, METH_VARARGS | METH_KEYWORDS },
{ "wxPenList_FindOrCreatePen", (PyCFunction) _wrap_wxPenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS },
{ "wxPenList_AddPen", (PyCFunction) _wrap_wxPenList_AddPen, METH_VARARGS | METH_KEYWORDS },
{ "wxColour_Red", (PyCFunction) _wrap_wxColour_Red, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxColour", (PyCFunction) _wrap_delete_wxColour, METH_VARARGS | METH_KEYWORDS },
{ "new_wxColour", (PyCFunction) _wrap_new_wxColour, METH_VARARGS | METH_KEYWORDS },
+ { "wxFontList_GetCount", (PyCFunction) _wrap_wxFontList_GetCount, METH_VARARGS | METH_KEYWORDS },
{ "wxFontList_RemoveFont", (PyCFunction) _wrap_wxFontList_RemoveFont, METH_VARARGS | METH_KEYWORDS },
{ "wxFontList_FindOrCreateFont", (PyCFunction) _wrap_wxFontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS },
{ "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS },
def RemoveFont(self, *_args, **_kwargs):
val = apply(gdic.wxFontList_RemoveFont,(self,) + _args, _kwargs)
return val
+ def GetCount(self, *_args, **_kwargs):
+ val = apply(gdic.wxFontList_GetCount,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxFontList instance at %s>" % (self.this,)
class wxFontList(wxFontListPtr):
def RemovePen(self, *_args, **_kwargs):
val = apply(gdic.wxPenList_RemovePen,(self,) + _args, _kwargs)
return val
+ def GetCount(self, *_args, **_kwargs):
+ val = apply(gdic.wxPenList_GetCount,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxPenList instance at %s>" % (self.this,)
class wxPenList(wxPenListPtr):
def RemoveBrush(self, *_args, **_kwargs):
val = apply(gdic.wxBrushList_RemoveBrush,(self,) + _args, _kwargs)
return val
+ def GetCount(self, *_args, **_kwargs):
+ val = apply(gdic.wxBrushList_GetCount,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxBrushList instance at %s>" % (self.this,)
class wxBrushList(wxBrushListPtr):
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
return _resultobj;
}
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
return _resultobj;
}
wxPyClassExists,
wxPyMake_wxObject,
+ wxPyMake_wxSizer,
wxPyPtrTypeMap_Add,
};
PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL));
PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER));
PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD));
- PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER));
- PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB));
- PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD));
PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY));
- PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH));
PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE));
- PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL));
+ PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB));
+ PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH));
PyDict_SetItemString(d,"wxTE_NO_VSCROLL", PyInt_FromLong((long) wxTE_NO_VSCROLL));
+ PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL));
+ PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER));
+ PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD));
PyDict_SetItemString(d,"wxTE_AUTO_URL", PyInt_FromLong((long) wxTE_AUTO_URL));
PyDict_SetItemString(d,"wxTE_NOHIDESEL", PyInt_FromLong((long) wxTE_NOHIDESEL));
+ PyDict_SetItemString(d,"wxTE_DONTWRAP", PyInt_FromLong((long) wxTE_DONTWRAP));
+ PyDict_SetItemString(d,"wxTE_LINEWRAP", PyInt_FromLong((long) wxTE_LINEWRAP));
+ PyDict_SetItemString(d,"wxTE_WORDWRAP", PyInt_FromLong((long) wxTE_WORDWRAP));
PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE));
PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN));
PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT));
wxLB_HSCROLL = wxc.wxLB_HSCROLL
wxPROCESS_ENTER = wxc.wxPROCESS_ENTER
wxPASSWORD = wxc.wxPASSWORD
-wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
-wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB
-wxTE_PASSWORD = wxc.wxTE_PASSWORD
wxTE_READONLY = wxc.wxTE_READONLY
-wxTE_RICH = wxc.wxTE_RICH
wxTE_MULTILINE = wxc.wxTE_MULTILINE
-wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL
+wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB
+wxTE_RICH = wxc.wxTE_RICH
wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL
+wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL
+wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
+wxTE_PASSWORD = wxc.wxTE_PASSWORD
wxTE_AUTO_URL = wxc.wxTE_AUTO_URL
wxTE_NOHIDESEL = wxc.wxTE_NOHIDESEL
+wxTE_DONTWRAP = wxc.wxTE_DONTWRAP
+wxTE_LINEWRAP = wxc.wxTE_LINEWRAP
+wxTE_WORDWRAP = wxc.wxTE_WORDWRAP
wxCB_SIMPLE = wxc.wxCB_SIMPLE
wxCB_DROPDOWN = wxc.wxCB_DROPDOWN
wxCB_SORT = wxc.wxCB_SORT
%typemap(python, out) wxMouseEvent* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxObject* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxPyPrintout* { $target = wxPyMake_wxObject($source); }
-%typemap(python, out) wxSizer* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxToolBarToolBase* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxToolTip* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxToolBarBase* { $target = wxPyMake_wxObject($source); }
%typemap(python, out) wxWindow* { $target = wxPyMake_wxObject($source); }
+%typemap(python, out) wxSizer* { $target = wxPyMake_wxSizer($source); }
+
//%typemap(python, out) wxHtmlCell* { $target = wxPyMake_wxObject($source); }
//%typemap(python, out) wxHtmlContainerCell* { $target = wxPyMake_wxObject($source); }
wxPyClassExists,
wxPyMake_wxObject,
+ wxPyMake_wxSizer,
wxPyPtrTypeMap_Add,
};