fixes for the wxPre* helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -215,7 +215,7 @@ class wxCalendarCtrl(wxCalendarCtrlPtr):
|
||||
def wxPreCalendarCtrl(*_args,**_kwargs):
|
||||
val = wxCalendarCtrlPtr(apply(calendarc.new_wxPreCalendarCtrl,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@ class wxFindReplaceDialog(wxFindReplaceDialogPtr):
|
||||
def wxPreFindReplaceDialog(*_args,**_kwargs):
|
||||
val = wxFindReplaceDialogPtr(apply(cmndlgsc.new_wxPreFindReplaceDialog,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class wxControl(wxControlPtr):
|
||||
def wxPreControl(*_args,**_kwargs):
|
||||
val = wxControlPtr(apply(controlsc.new_wxPreControl,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ class wxButton(wxButtonPtr):
|
||||
def wxPreButton(*_args,**_kwargs):
|
||||
val = wxButtonPtr(apply(controlsc.new_wxPreButton,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ class wxBitmapButton(wxBitmapButtonPtr):
|
||||
def wxPreBitmapButton(*_args,**_kwargs):
|
||||
val = wxBitmapButtonPtr(apply(controlsc.new_wxPreBitmapButton,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class wxCheckBox(wxCheckBoxPtr):
|
||||
def wxPreCheckBox(*_args,**_kwargs):
|
||||
val = wxCheckBoxPtr(apply(controlsc.new_wxPreCheckBox,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ class wxChoice(wxChoicePtr):
|
||||
def wxPreChoice(*_args,**_kwargs):
|
||||
val = wxChoicePtr(apply(controlsc.new_wxPreChoice,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ class wxComboBox(wxComboBoxPtr):
|
||||
def wxPreComboBox(*_args,**_kwargs):
|
||||
val = wxComboBoxPtr(apply(controlsc.new_wxPreComboBox,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ class wxGauge(wxGaugePtr):
|
||||
def wxPreGauge(*_args,**_kwargs):
|
||||
val = wxGaugePtr(apply(controlsc.new_wxPreGauge,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ class wxStaticBox(wxStaticBoxPtr):
|
||||
def wxPreStaticBox(*_args,**_kwargs):
|
||||
val = wxStaticBoxPtr(apply(controlsc.new_wxPreStaticBox,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ class wxStaticLine(wxStaticLinePtr):
|
||||
def wxPreStaticLine(*_args,**_kwargs):
|
||||
val = wxStaticLinePtr(apply(controlsc.new_wxPreStaticLine,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ class wxStaticText(wxStaticTextPtr):
|
||||
def wxPreStaticText(*_args,**_kwargs):
|
||||
val = wxStaticTextPtr(apply(controlsc.new_wxPreStaticText,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ class wxListBox(wxListBoxPtr):
|
||||
def wxPreListBox(*_args,**_kwargs):
|
||||
val = wxListBoxPtr(apply(controlsc.new_wxPreListBox,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -550,7 +550,7 @@ class wxCheckListBox(wxCheckListBoxPtr):
|
||||
def wxPreCheckListBox(*_args,**_kwargs):
|
||||
val = wxCheckListBoxPtr(apply(controlsc.new_wxPreCheckListBox,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@ class wxTextCtrl(wxTextCtrlPtr):
|
||||
def wxPreTextCtrl(*_args,**_kwargs):
|
||||
val = wxTextCtrlPtr(apply(controlsc.new_wxPreTextCtrl,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -787,7 +787,7 @@ class wxScrollBar(wxScrollBarPtr):
|
||||
def wxPreScrollBar(*_args,**_kwargs):
|
||||
val = wxScrollBarPtr(apply(controlsc.new_wxPreScrollBar,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -826,7 +826,7 @@ class wxSpinButton(wxSpinButtonPtr):
|
||||
def wxPreSpinButton(*_args,**_kwargs):
|
||||
val = wxSpinButtonPtr(apply(controlsc.new_wxPreSpinButton,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -860,7 +860,7 @@ class wxStaticBitmap(wxStaticBitmapPtr):
|
||||
def wxPreStaticBitmap(*_args,**_kwargs):
|
||||
val = wxStaticBitmapPtr(apply(controlsc.new_wxPreStaticBitmap,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -931,7 +931,7 @@ class wxRadioBox(wxRadioBoxPtr):
|
||||
def wxPreRadioBox(*_args,**_kwargs):
|
||||
val = wxRadioBoxPtr(apply(controlsc.new_wxPreRadioBox,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -961,7 +961,7 @@ class wxRadioButton(wxRadioButtonPtr):
|
||||
def wxPreRadioButton(*_args,**_kwargs):
|
||||
val = wxRadioButtonPtr(apply(controlsc.new_wxPreRadioButton,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -1042,7 +1042,7 @@ class wxSlider(wxSliderPtr):
|
||||
def wxPreSlider(*_args,**_kwargs):
|
||||
val = wxSliderPtr(apply(controlsc.new_wxPreSlider,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -1081,7 +1081,7 @@ class wxSpinCtrl(wxSpinCtrlPtr):
|
||||
def wxPreSpinCtrl(*_args,**_kwargs):
|
||||
val = wxSpinCtrlPtr(apply(controlsc.new_wxPreSpinCtrl,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -1114,7 +1114,7 @@ class wxToggleButton(wxToggleButtonPtr):
|
||||
def wxPreToggleButton(*_args,**_kwargs):
|
||||
val = wxToggleButtonPtr(apply(controlsc.new_wxPreToggleButton,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -680,7 +680,7 @@ class wxListCtrl(wxListCtrlPtr):
|
||||
def wxPreListCtrl(*_args,**_kwargs):
|
||||
val = wxListCtrlPtr(apply(controls2c.new_wxPreListCtrl,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -728,7 +728,7 @@ class wxListView(wxListViewPtr):
|
||||
def wxPreListView(*_args,**_kwargs):
|
||||
val = wxListViewPtr(apply(controls2c.new_wxPreListView,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -1125,7 +1125,7 @@ class wxTreeCtrl(wxTreeCtrlPtr):
|
||||
def wxPreTreeCtrl(*_args,**_kwargs):
|
||||
val = wxTreeCtrlPtr(apply(controls2c.new_wxPreTreeCtrl,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ class wxTopLevelWindow(wxTopLevelWindowPtr):
|
||||
def wxPreTopLevelWindow(*_args,**_kwargs):
|
||||
val = wxTopLevelWindowPtr(apply(framesc.new_wxPreTopLevelWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -132,7 +133,7 @@ class wxFrame(wxFramePtr):
|
||||
def wxPreFrame(*_args,**_kwargs):
|
||||
val = wxFramePtr(apply(framesc.new_wxPreFrame,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -183,7 +184,7 @@ class wxDialog(wxDialogPtr):
|
||||
def wxPreDialog(*_args,**_kwargs):
|
||||
val = wxDialogPtr(apply(framesc.new_wxPreDialog,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -207,7 +208,7 @@ class wxMiniFrame(wxMiniFramePtr):
|
||||
def wxPreMiniFrame(*_args,**_kwargs):
|
||||
val = wxMiniFramePtr(apply(framesc.new_wxPreMiniFrame,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
#define SWIG_name "gdic"
|
||||
|
||||
#include "helpers.h"
|
||||
#include <wx/metafile.h>
|
||||
#include <wx/imaglist.h>
|
||||
#ifndef __WXMSW__
|
||||
#include <wx/dcps.h>
|
||||
@@ -219,6 +218,8 @@ static void wxDC_GetBoundingBox(wxDC* dc, int* x1, int* y1, int* x2, int* y2) {
|
||||
return new wxMemoryDC(oldDC);
|
||||
}
|
||||
|
||||
#include <wx/metafile.h>
|
||||
|
||||
#if 0
|
||||
extern wxFont * wxNORMAL_FONT;
|
||||
extern wxFont * wxSMALL_FONT;
|
||||
@@ -10044,33 +10045,25 @@ static PyObject *_wrap_new_wxWindowDC(PyObject *self, PyObject *args, PyObject *
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxMetaFileDCTowxDC(void *ptr) {
|
||||
wxMetaFileDC *src;
|
||||
wxDC *dest;
|
||||
src = (wxMetaFileDC *) ptr;
|
||||
dest = (wxDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxMetaFileDCTowxObject(void *ptr) {
|
||||
wxMetaFileDC *src;
|
||||
static void *SwigwxMetaFileTowxObject(void *ptr) {
|
||||
wxMetaFile *src;
|
||||
wxObject *dest;
|
||||
src = (wxMetaFileDC *) ptr;
|
||||
src = (wxMetaFile *) ptr;
|
||||
dest = (wxObject *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxMetaFileDC(_swigarg0) (new wxMetaFileDC(_swigarg0))
|
||||
static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
#define new_wxMetaFile(_swigarg0) (new wxMetaFile(_swigarg0))
|
||||
static PyObject *_wrap_new_wxMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxMetaFileDC * _result;
|
||||
wxMetaFile * _result;
|
||||
wxString * _arg0 = (wxString *) &wxPyEmptyStr;
|
||||
PyObject * _obj0 = 0;
|
||||
char *_kwnames[] = { "filename", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxMetaFileDC",_kwnames,&_obj0))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxMetaFile",_kwnames,&_obj0))
|
||||
return NULL;
|
||||
if (_obj0)
|
||||
{
|
||||
@@ -10093,7 +10086,300 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0);
|
||||
_result = (wxMetaFile *)new_wxMetaFile(*_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetaFile_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define delete_wxMetaFile(_swigobj) (delete _swigobj)
|
||||
static PyObject *_wrap_delete_wxMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxMetaFile * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxMetaFile",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxMetaFile. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
delete_wxMetaFile(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMetaFile_Ok(_swigobj) (_swigobj->Ok())
|
||||
static PyObject *_wrap_wxMetaFile_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxMetaFile * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_Ok",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_Ok. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxMetaFile_Ok(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMetaFile_SetClipboard(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClipboard(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxMetaFile_SetClipboard(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxMetaFile * _arg0;
|
||||
int _arg1 = (int ) 0;
|
||||
int _arg2 = (int ) 0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","width","height", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxMetaFile_SetClipboard",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_SetClipboard. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxMetaFile_SetClipboard(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMetaFile_GetSize(_swigobj) (_swigobj->GetSize())
|
||||
static PyObject *_wrap_wxMetaFile_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSize * _result;
|
||||
wxMetaFile * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetSize",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetSize. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxSize (wxMetaFile_GetSize(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMetaFile_GetWidth(_swigobj) (_swigobj->GetWidth())
|
||||
static PyObject *_wrap_wxMetaFile_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
wxMetaFile * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetWidth",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetWidth. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (int )wxMetaFile_GetWidth(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMetaFile_GetHeight(_swigobj) (_swigobj->GetHeight())
|
||||
static PyObject *_wrap_wxMetaFile_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
wxMetaFile * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetHeight",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetHeight. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (int )wxMetaFile_GetHeight(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMetaFile_GetFileName(_swigobj) (_swigobj->GetFileName())
|
||||
static PyObject *_wrap_wxMetaFile_GetFileName(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxMetaFile * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetaFile_GetFileName",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetaFile_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetaFile_GetFileName. Expected _wxMetaFile_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
const wxString & _result_ref = wxMetaFile_GetFileName(_arg0);
|
||||
_result = (wxString *) &_result_ref;
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxMetaFileDCTowxDC(void *ptr) {
|
||||
wxMetaFileDC *src;
|
||||
wxDC *dest;
|
||||
src = (wxMetaFileDC *) ptr;
|
||||
dest = (wxDC *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxMetaFileDCTowxObject(void *ptr) {
|
||||
wxMetaFileDC *src;
|
||||
wxObject *dest;
|
||||
src = (wxMetaFileDC *) ptr;
|
||||
dest = (wxObject *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxMetaFileDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxMetaFileDC(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
|
||||
static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxMetaFileDC * _result;
|
||||
wxString * _arg0 = (wxString *) &wxPyEmptyStr;
|
||||
int _arg1 = (int ) 0;
|
||||
int _arg2 = (int ) 0;
|
||||
wxString * _arg3 = (wxString *) &wxPyEmptyStr;
|
||||
PyObject * _obj0 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "filename","width","height","description", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OiiO:new_wxMetaFileDC",_kwnames,&_obj0,&_arg1,&_arg2,&_obj3))
|
||||
return NULL;
|
||||
if (_obj0)
|
||||
{
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
|
||||
return NULL;
|
||||
_arg0 = new wxString(tmpPtr, tmpSize);
|
||||
#else
|
||||
if (!PyString_Check(_obj0)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
|
||||
#endif
|
||||
}
|
||||
if (_obj3)
|
||||
{
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
char* tmpPtr; int tmpSize;
|
||||
if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
|
||||
return NULL;
|
||||
_arg3 = new wxString(tmpPtr, tmpSize);
|
||||
#else
|
||||
if (!PyString_Check(_obj3)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
|
||||
#endif
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxMetaFileDC *)new_wxMetaFileDC(*_arg0,_arg1,_arg2,*_arg3);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -10107,6 +10393,10 @@ static PyObject *_wrap_new_wxMetaFileDC(PyObject *self, PyObject *args, PyObject
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
{
|
||||
if (_obj3)
|
||||
delete _arg3;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
@@ -11914,6 +12204,14 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "new_wxPalette", (PyCFunction) _wrap_new_wxPalette, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFileDC_Close", (PyCFunction) _wrap_wxMetaFileDC_Close, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMetaFileDC", (PyCFunction) _wrap_new_wxMetaFileDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFile_GetFileName", (PyCFunction) _wrap_wxMetaFile_GetFileName, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFile_GetHeight", (PyCFunction) _wrap_wxMetaFile_GetHeight, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFile_GetWidth", (PyCFunction) _wrap_wxMetaFile_GetWidth, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFile_GetSize", (PyCFunction) _wrap_wxMetaFile_GetSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFile_SetClipboard", (PyCFunction) _wrap_wxMetaFile_SetClipboard, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMetaFile_Ok", (PyCFunction) _wrap_wxMetaFile_Ok, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "delete_wxMetaFile", (PyCFunction) _wrap_delete_wxMetaFile, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMetaFile", (PyCFunction) _wrap_new_wxMetaFile, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxWindowDC", (PyCFunction) _wrap_new_wxWindowDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxPaintDC", (PyCFunction) _wrap_new_wxPaintDC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxClientDC", (PyCFunction) _wrap_new_wxClientDC, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -12244,6 +12542,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxObject","_wxImageList",SwigwxImageListTowxObject},
|
||||
{ "_wxObject","_wxPalette",SwigwxPaletteTowxObject},
|
||||
{ "_wxObject","_wxMetaFileDC",SwigwxMetaFileDCTowxObject},
|
||||
{ "_wxObject","_wxMetaFile",SwigwxMetaFileTowxObject},
|
||||
{ "_wxObject","_wxWindowDC",SwigwxWindowDCTowxObject},
|
||||
{ "_wxObject","_wxPaintDC",SwigwxPaintDCTowxObject},
|
||||
{ "_wxObject","_wxClientDC",SwigwxClientDCTowxObject},
|
||||
|
||||
@@ -1032,12 +1032,49 @@ class wxWindowDC(wxWindowDCPtr):
|
||||
|
||||
|
||||
|
||||
class wxMetaFilePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,gdic=gdic):
|
||||
if self.thisown == 1 :
|
||||
gdic.delete_wxMetaFile(self)
|
||||
def Ok(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_Ok,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetClipboard(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_SetClipboard,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSize(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_GetSize,(self,) + _args, _kwargs)
|
||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetWidth(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_GetWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetHeight(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_GetHeight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFileName(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFile_GetFileName,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxMetaFile instance at %s>" % (self.this,)
|
||||
class wxMetaFile(wxMetaFilePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(gdic.new_wxMetaFile,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxMetaFileDCPtr(wxDCPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def Close(self, *_args, **_kwargs):
|
||||
val = apply(gdic.wxMetaFileDC_Close,(self,) + _args, _kwargs)
|
||||
if val: val = wxMetaFilePtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxMetaFileDC instance at %s>" % (self.this,)
|
||||
|
||||
@@ -70,7 +70,7 @@ class wxMDIParentFrame(wxMDIParentFramePtr):
|
||||
def wxPreMDIParentFrame(*_args,**_kwargs):
|
||||
val = wxMDIParentFramePtr(apply(mdic.new_wxPreMDIParentFrame,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class wxMDIChildFrame(wxMDIChildFramePtr):
|
||||
def wxPreMDIChildFrame(*_args,**_kwargs):
|
||||
val = wxMDIChildFramePtr(apply(mdic.new_wxPreMDIChildFrame,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ class wxMDIClientWindow(wxMDIClientWindowPtr):
|
||||
def wxPreMDIClientWindow(*_args,**_kwargs):
|
||||
val = wxMDIClientWindowPtr(apply(mdic.new_wxPreMDIClientWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class wxStatusBar(wxStatusBarPtr):
|
||||
def wxPreStatusBar(*_args,**_kwargs):
|
||||
val = wxStatusBarPtr(apply(stattoolc.new_wxPreStatusBar,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ class wxToolBar(wxToolBarPtr):
|
||||
def wxPreToolBar(*_args,**_kwargs):
|
||||
val = wxToolBarPtr(apply(stattoolc.new_wxPreToolBar,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ class wxToolBarSimple(wxToolBarSimplePtr):
|
||||
def wxPreToolBarSimple(*_args,**_kwargs):
|
||||
val = wxToolBarSimplePtr(apply(stattoolc.new_wxPreToolBarSimple,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ class wxWindow(wxWindowPtr):
|
||||
def wxPreWindow(*_args,**_kwargs):
|
||||
val = wxWindowPtr(apply(windowsc.new_wxPreWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -687,7 +687,7 @@ class wxScrolledWindow(wxScrolledWindowPtr):
|
||||
def wxPreScrolledWindow(*_args,**_kwargs):
|
||||
val = wxScrolledWindowPtr(apply(windowsc.new_wxPreScrolledWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class wxNotebook(wxNotebookPtr):
|
||||
def wxPreNotebook(*_args,**_kwargs):
|
||||
val = wxNotebookPtr(apply(windows2c.new_wxPreNotebook,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ class wxSplitterWindow(wxSplitterWindowPtr):
|
||||
def wxPreSplitterWindow(*_args,**_kwargs):
|
||||
val = wxSplitterWindowPtr(apply(windows2c.new_wxPreSplitterWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class wxSashWindow(wxSashWindowPtr):
|
||||
def wxPreSashWindow(*_args,**_kwargs):
|
||||
val = wxSashWindowPtr(apply(windows3c.new_wxPreSashWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ class wxSashLayoutWindow(wxSashLayoutWindowPtr):
|
||||
def wxPreSashLayoutWindow(*_args,**_kwargs):
|
||||
val = wxSashLayoutWindowPtr(apply(windows3c.new_wxPreSashLayoutWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ class wxPopupWindow(wxPopupWindowPtr):
|
||||
def wxPrePopupWindow(*_args,**_kwargs):
|
||||
val = wxPopupWindowPtr(apply(windows3c.new_wxPrePopupWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ class wxPopupTransientWindow(wxPopupTransientWindowPtr):
|
||||
def wxPrePopupTransientWindow(*_args,**_kwargs):
|
||||
val = wxPopupTransientWindowPtr(apply(windows3c.new_wxPrePopupTransientWindow,_args,_kwargs))
|
||||
val.thisown = 1
|
||||
val._setOORInfo(self)
|
||||
val._setOORInfo(val)
|
||||
return val
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user