SWIGged update for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -191,8 +191,9 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() {
|
|||||||
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (m_myInst.findCallback("SetBitmap")) {
|
if (m_myInst.findCallback("SetBitmap")) {
|
||||||
m_myInst.callCallback(Py_BuildValue("(O)",
|
PyObject* bo = wxPyConstructObject((void*)&bitmap, "wxBitmap");
|
||||||
wxPyConstructObject((void*)&bitmap, "wxBitmap")));
|
m_myInst.callCallback(Py_BuildValue("(O)", bo));
|
||||||
|
Py_DECREF(bo);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
@@ -293,10 +294,11 @@ bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
|
|||||||
const wxArrayString& filenames) {
|
const wxArrayString& filenames) {
|
||||||
bool rval = FALSE;
|
bool rval = FALSE;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
|
if (m_myInst.findCallback("OnDropFiles")) {
|
||||||
PyObject* list = wxArrayString2PyList_helper(filenames);
|
PyObject* list = wxArrayString2PyList_helper(filenames);
|
||||||
if (m_myInst.findCallback("OnDropFiles"))
|
|
||||||
rval = m_myInst.callCallback(Py_BuildValue("(iiO)",x,y,list));
|
rval = m_myInst.callCallback(Py_BuildValue("(iiO)",x,y,list));
|
||||||
Py_DECREF(list);
|
Py_DECREF(list);
|
||||||
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
@@ -100,6 +100,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
DECLARE_DEF_STRING(DirDialogDefaultFolderStr);
|
DECLARE_DEF_STRING(DirDialogDefaultFolderStr);
|
||||||
|
|
||||||
static const wxString wxPyEmptyString(wxT(""));
|
static const wxString wxPyEmptyString(wxT(""));
|
||||||
|
|
||||||
|
static const long longzero = 0;
|
||||||
// C++ Version of a Python aware class
|
// C++ Version of a Python aware class
|
||||||
class wxPyListCtrl : public wxListCtrl {
|
class wxPyListCtrl : public wxListCtrl {
|
||||||
DECLARE_ABSTRACT_CLASS(wxPyListCtrl);
|
DECLARE_ABSTRACT_CLASS(wxPyListCtrl);
|
||||||
@@ -211,11 +213,13 @@ public:
|
|||||||
int rval = 0;
|
int rval = 0;
|
||||||
bool found;
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = m_myInst.findCallback("OnCompareItems")))
|
if ((found = m_myInst.findCallback("OnCompareItems"))) {
|
||||||
rval = m_myInst.callCallback(Py_BuildValue(
|
PyObject *o1 = wxPyConstructObject((void*)&item1, "wxTreeItemId");
|
||||||
"(OO)",
|
PyObject *o2 = wxPyConstructObject((void*)&item2, "wxTreeItemId");
|
||||||
wxPyConstructObject((void*)&item1, "wxTreeItemId"),
|
rval = m_myInst.callCallback(Py_BuildValue("(OO)",o1,o2));
|
||||||
wxPyConstructObject((void*)&item2, "wxTreeItemId")));
|
Py_DECREF(o1);
|
||||||
|
Py_DECREF(o2);
|
||||||
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if (! found)
|
if (! found)
|
||||||
rval = wxTreeCtrl::OnCompareItems(item1, item2);
|
rval = wxTreeCtrl::OnCompareItems(item1, item2);
|
||||||
@@ -7692,7 +7696,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args,
|
|||||||
wxTreeItemId * _result;
|
wxTreeItemId * _result;
|
||||||
wxPyTreeCtrl * _arg0;
|
wxPyTreeCtrl * _arg0;
|
||||||
wxTreeItemId * _arg1;
|
wxTreeItemId * _arg1;
|
||||||
long * _arg2;
|
long * _arg2 = (long *) &longzero;
|
||||||
PyObject * _argo0 = 0;
|
PyObject * _argo0 = 0;
|
||||||
PyObject * _argo1 = 0;
|
PyObject * _argo1 = 0;
|
||||||
long temp;
|
long temp;
|
||||||
@@ -7701,7 +7705,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args,
|
|||||||
char _ptemp[128];
|
char _ptemp[128];
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTreeCtrl_GetFirstChild",_kwnames,&_argo0,&_argo1,&_obj2))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxTreeCtrl_GetFirstChild",_kwnames,&_argo0,&_argo1,&_obj2))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (_argo0) {
|
if (_argo0) {
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
@@ -7717,6 +7721,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (_obj2)
|
||||||
{
|
{
|
||||||
temp = (long) PyInt_AsLong(_obj2);
|
temp = (long) PyInt_AsLong(_obj2);
|
||||||
_arg2 = &temp;
|
_arg2 = &temp;
|
||||||
|
@@ -91,6 +91,39 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
DECLARE_DEF_STRING2(DateTimeFormatStr, wxT("%c"));
|
DECLARE_DEF_STRING2(DateTimeFormatStr, wxT("%c"));
|
||||||
static const wxString wxPyEmptyString(wxT(""));
|
static const wxString wxPyEmptyString(wxT(""));
|
||||||
|
|
||||||
|
|
||||||
|
#define wxPyMake_TEMPLATE(TYPE) \
|
||||||
|
PyObject* wxPyMake_##TYPE(TYPE* source) { \
|
||||||
|
PyObject* target = NULL; \
|
||||||
|
if (source) { \
|
||||||
|
/* Check if there is already a pointer to a Python object in the \
|
||||||
|
OOR data that we can use. */ \
|
||||||
|
wxPyOORClientData* data = (wxPyOORClientData*)source->GetClientObject(); \
|
||||||
|
if (data) { \
|
||||||
|
target = data->m_obj; \
|
||||||
|
Py_INCREF(target); \
|
||||||
|
} \
|
||||||
|
/* Otherwise make a new wrapper for it the old fashioned way and \
|
||||||
|
give it the OOR treatment */ \
|
||||||
|
if (! target) { \
|
||||||
|
target = wxPyConstructObject(source, #TYPE, FALSE); \
|
||||||
|
if (target) \
|
||||||
|
source->SetClientObject(new wxPyOORClientData(target)); \
|
||||||
|
} \
|
||||||
|
} else { /* source was NULL so return None. */ \
|
||||||
|
Py_INCREF(Py_None); target = Py_None; \
|
||||||
|
} \
|
||||||
|
return target; \
|
||||||
|
} \
|
||||||
|
|
||||||
|
|
||||||
|
wxPyMake_TEMPLATE(wxGridCellRenderer)
|
||||||
|
wxPyMake_TEMPLATE(wxGridCellEditor)
|
||||||
|
wxPyMake_TEMPLATE(wxGridCellAttr)
|
||||||
|
wxPyMake_TEMPLATE(wxGridCellAttrProvider)
|
||||||
|
wxPyMake_TEMPLATE(wxGridTableBase)
|
||||||
|
|
||||||
|
|
||||||
#define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \
|
#define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME) \
|
||||||
wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \
|
wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \
|
||||||
wxGridCellAttr* rval = NULL; \
|
wxGridCellAttr* rval = NULL; \
|
||||||
@@ -122,7 +155,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
bool found; \
|
bool found; \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\
|
PyObject* obj = wxPyMake_wxGridCellAttr(attr); \
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \
|
||||||
Py_DECREF(obj); \
|
Py_DECREF(obj); \
|
||||||
} \
|
} \
|
||||||
@@ -141,7 +174,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
bool found; \
|
bool found; \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\
|
PyObject* obj = wxPyMake_wxGridCellAttr(attr); \
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \
|
||||||
Py_DECREF(obj); \
|
Py_DECREF(obj); \
|
||||||
} \
|
} \
|
||||||
@@ -198,8 +231,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \
|
#define PYCALLBACK__INTINTSTRING_pure(CBNAME) \
|
||||||
void CBNAME(int a, int b, const wxString& c) { \
|
void CBNAME(int a, int b, const wxString& c) { \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,wx2PyString(c)));\
|
PyObject* s = wx2PyString(c); \
|
||||||
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\
|
||||||
|
Py_DECREF(s); \
|
||||||
|
} \
|
||||||
wxPyEndBlockThreads(); \
|
wxPyEndBlockThreads(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,8 +268,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
bool rval = 0; \
|
bool rval = 0; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", a,b,wx2PyString(c)));\
|
PyObject* s = wx2PyString(c); \
|
||||||
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\
|
||||||
|
Py_DECREF(s); \
|
||||||
|
} \
|
||||||
wxPyEndBlockThreads(); \
|
wxPyEndBlockThreads(); \
|
||||||
if (! found) \
|
if (! found) \
|
||||||
rval = PCLASS::CBNAME(a,b,c); \
|
rval = PCLASS::CBNAME(a,b,c); \
|
||||||
@@ -386,8 +425,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
void CBNAME(int a, const wxString& c) { \
|
void CBNAME(int a, const wxString& c) { \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", a, wx2PyString(c))); \
|
PyObject* s = wx2PyString(c); \
|
||||||
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)",a,s)); \
|
||||||
|
Py_DECREF(s); \
|
||||||
|
} \
|
||||||
wxPyEndBlockThreads(); \
|
wxPyEndBlockThreads(); \
|
||||||
if (! found) \
|
if (! found) \
|
||||||
PCLASS::CBNAME(a,c); \
|
PCLASS::CBNAME(a,c); \
|
||||||
@@ -485,39 +527,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define wxPyMake_TEMPLATE(TYPE) \
|
|
||||||
PyObject* wxPyMake_##TYPE(TYPE* source) { \
|
|
||||||
PyObject* target = NULL; \
|
|
||||||
if (source) { \
|
|
||||||
/* Check if there is already a pointer to a Python object in the \
|
|
||||||
OOR data that we can use. */ \
|
|
||||||
wxPyOORClientData* data = (wxPyOORClientData*)source->GetClientObject(); \
|
|
||||||
if (data) { \
|
|
||||||
target = data->m_obj; \
|
|
||||||
Py_INCREF(target); \
|
|
||||||
} \
|
|
||||||
/* Otherwise make a new wrapper for it the old fashioned way and \
|
|
||||||
give it the OOR treatment */ \
|
|
||||||
if (! target) { \
|
|
||||||
target = wxPyConstructObject(source, #TYPE, FALSE); \
|
|
||||||
if (target) \
|
|
||||||
source->SetClientObject(new wxPyOORClientData(target)); \
|
|
||||||
} \
|
|
||||||
} else { /* source was NULL so return None. */ \
|
|
||||||
Py_INCREF(Py_None); target = Py_None; \
|
|
||||||
} \
|
|
||||||
return target; \
|
|
||||||
} \
|
|
||||||
|
|
||||||
wxPyMake_TEMPLATE(wxGridCellRenderer)
|
|
||||||
wxPyMake_TEMPLATE(wxGridCellEditor)
|
|
||||||
wxPyMake_TEMPLATE(wxGridCellAttr)
|
|
||||||
wxPyMake_TEMPLATE(wxGridCellAttrProvider)
|
|
||||||
wxPyMake_TEMPLATE(wxGridTableBase)
|
|
||||||
|
|
||||||
|
|
||||||
class wxPyGridCellRenderer : public wxGridCellRenderer
|
class wxPyGridCellRenderer : public wxGridCellRenderer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -529,13 +538,17 @@ public:
|
|||||||
int row, int col, bool isSelected) {
|
int row, int col, bool isSelected) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "Draw")) {
|
if (wxPyCBH_findCallback(m_myInst, "Draw")) {
|
||||||
wxPyCBH_callCallback(m_myInst,
|
PyObject* go = wxPyMake_wxObject(&grid);
|
||||||
Py_BuildValue("(OOOOiii)",
|
PyObject* dco = wxPyMake_wxObject(&dc);
|
||||||
wxPyConstructObject((void*)&grid, "wxGrid", 0),
|
PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
|
||||||
wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0),
|
PyObject* ro = wxPyConstructObject((void*)&rect, "wxRect", 0);
|
||||||
wxPyConstructObject((void*)&dc, "wxDC", 0),
|
|
||||||
wxPyConstructObject((void*)&rect, "wxRect", 0),
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", go, ao, dco, ro,
|
||||||
row, col, isSelected));
|
row, col, isSelected));
|
||||||
|
Py_DECREF(go);
|
||||||
|
Py_DECREF(ao);
|
||||||
|
Py_DECREF(dco);
|
||||||
|
Py_DECREF(ro);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
@@ -547,12 +560,17 @@ public:
|
|||||||
if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) {
|
if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) {
|
||||||
PyObject* ro;
|
PyObject* ro;
|
||||||
wxSize* ptr;
|
wxSize* ptr;
|
||||||
ro = wxPyCBH_callCallbackObj(m_myInst,
|
PyObject* go = wxPyMake_wxObject(&grid);
|
||||||
Py_BuildValue("(OOOii)",
|
PyObject* dco = wxPyMake_wxObject(&dc);
|
||||||
wxPyConstructObject((void*)&grid, "wxGrid", 0),
|
PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
|
||||||
wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0),
|
|
||||||
wxPyConstructObject((void*)&dc, "wxDC", 0),
|
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOii)",
|
||||||
|
go, ao, dco,
|
||||||
row, col));
|
row, col));
|
||||||
|
Py_DECREF(go);
|
||||||
|
Py_DECREF(ao);
|
||||||
|
Py_DECREF(dco);
|
||||||
|
|
||||||
if (ro) {
|
if (ro) {
|
||||||
const char* errmsg = "GetBestSize should return a 2-tuple of integers or a wxSize object.";
|
const char* errmsg = "GetBestSize should return a 2-tuple of integers or a wxSize object.";
|
||||||
if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) {
|
if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) {
|
||||||
@@ -612,11 +630,12 @@ public:
|
|||||||
void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) {
|
void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "Create")) {
|
if (wxPyCBH_findCallback(m_myInst, "Create")) {
|
||||||
wxPyCBH_callCallback(m_myInst,
|
PyObject* po = wxPyMake_wxObject(parent);
|
||||||
Py_BuildValue("(OiO)",
|
PyObject* eo = wxPyMake_wxObject(evtHandler);
|
||||||
wxPyConstructObject((void*)parent, "wxWindow", 0),
|
|
||||||
id,
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OiO)", po, id, eo));
|
||||||
wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0)));
|
Py_DECREF(po);
|
||||||
|
Py_DECREF(eo);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
@@ -625,9 +644,9 @@ public:
|
|||||||
void BeginEdit(int row, int col, wxGrid* grid) {
|
void BeginEdit(int row, int col, wxGrid* grid) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) {
|
if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) {
|
||||||
wxPyCBH_callCallback(m_myInst,
|
PyObject* go = wxPyMake_wxObject(grid);
|
||||||
Py_BuildValue("(iiO)", row, col,
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
|
||||||
wxPyConstructObject((void*)grid, "wxGrid", 0)));
|
Py_DECREF(go);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
@@ -637,9 +656,9 @@ public:
|
|||||||
bool rv = FALSE;
|
bool rv = FALSE;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
|
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
|
||||||
rv = wxPyCBH_callCallback(m_myInst,
|
PyObject* go = wxPyMake_wxObject(grid);
|
||||||
Py_BuildValue("(iiO)", row, col,
|
rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
|
||||||
wxPyConstructObject((void*)grid, "wxGrid", 0)));
|
Py_DECREF(go);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return rv;
|
return rv;
|
||||||
@@ -667,10 +686,11 @@ public:
|
|||||||
void Show(bool show, wxGridCellAttr *attr) {
|
void Show(bool show, wxGridCellAttr *attr) {
|
||||||
bool found;
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "Show")))
|
if ((found = wxPyCBH_findCallback(m_myInst, "Show"))) {
|
||||||
wxPyCBH_callCallback(m_myInst,
|
PyObject* ao = wxPyMake_wxGridCellAttr(attr);
|
||||||
Py_BuildValue("(iO)", show,
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, ao));
|
||||||
wxPyConstructObject((void*)attr, "wxGridCellAttr", 0)));
|
Py_DECREF(ao);
|
||||||
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if (! found)
|
if (! found)
|
||||||
wxGridCellEditor::Show(show, attr);
|
wxGridCellEditor::Show(show, attr);
|
||||||
@@ -681,13 +701,17 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
|
void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
|
||||||
bool found; \
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)")))
|
if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) {
|
||||||
wxPyCBH_callCallback(m_myInst,
|
PyObject* ao = wxPyMake_wxGridCellAttr(attr);
|
||||||
Py_BuildValue("(OO)",
|
PyObject* ro = wxPyConstructObject((void*)&rectCell, "wxRect", 0);
|
||||||
wxPyConstructObject((void*)&rectCell, "wxRect", 0),
|
|
||||||
wxPyConstructObject((void*)attr, "wxGridCellAttr", 0)));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", ro, ao));
|
||||||
|
|
||||||
|
Py_DECREF(ro);
|
||||||
|
Py_DECREF(ao);
|
||||||
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if (! found)
|
if (! found)
|
||||||
wxGridCellEditor::PaintBackground(rectCell, attr);
|
wxGridCellEditor::PaintBackground(rectCell, attr);
|
||||||
@@ -780,7 +804,9 @@ public:
|
|||||||
void SetValue(int row, int col, const wxString& val) {
|
void SetValue(int row, int col, const wxString& val) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "SetValue")) {
|
if (wxPyCBH_findCallback(m_myInst, "SetValue")) {
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",row,col,wx2PyString(val)));
|
PyObject* s = wx2PyString(val);
|
||||||
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",row,col,s));
|
||||||
|
Py_DECREF(s);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
|
@@ -264,7 +264,9 @@ wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
|
|||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) {
|
if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) {
|
||||||
PyObject* ro;
|
PyObject* ro;
|
||||||
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, wx2PyString(url)));
|
PyObject* s = wx2PyString(url);
|
||||||
|
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, s));
|
||||||
|
Py_DECREF(s);
|
||||||
if (PyString_Check(ro)
|
if (PyString_Check(ro)
|
||||||
#if PYTHON_API_VERSION >= 1009
|
#if PYTHON_API_VERSION >= 1009
|
||||||
|| PyUnicode_Check(ro)
|
|| PyUnicode_Check(ro)
|
||||||
|
@@ -923,6 +923,24 @@ static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *k
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxGetProcessId(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
unsigned long _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetProcessId",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (unsigned long )wxGetProcessId();
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("l",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
wxAcceleratorEntry * _result;
|
wxAcceleratorEntry * _result;
|
||||||
@@ -4243,6 +4261,7 @@ static PyMethodDef misccMethods[] = {
|
|||||||
{ "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS },
|
{ "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS },
|
{ "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxGetProcessId", (PyCFunction) _wrap_wxGetProcessId, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS },
|
{ "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -605,6 +605,8 @@ wxGetHomeDir = miscc.wxGetHomeDir
|
|||||||
|
|
||||||
wxGetUserHome = miscc.wxGetUserHome
|
wxGetUserHome = miscc.wxGetUserHome
|
||||||
|
|
||||||
|
wxGetProcessId = miscc.wxGetProcessId
|
||||||
|
|
||||||
def wxGetAccelFromString(*_args, **_kwargs):
|
def wxGetAccelFromString(*_args, **_kwargs):
|
||||||
val = apply(miscc.wxGetAccelFromString,_args,_kwargs)
|
val = apply(miscc.wxGetAccelFromString,_args,_kwargs)
|
||||||
if val: val = wxAcceleratorEntryPtr(val)
|
if val: val = wxAcceleratorEntryPtr(val)
|
||||||
|
@@ -145,9 +145,11 @@ public:
|
|||||||
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t) {
|
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t) {
|
||||||
bool found;
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "DoLog")))
|
if ((found = wxPyCBH_findCallback(m_myInst, "DoLog"))) {
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iOi)", level,
|
PyObject* s = wx2PyString(szString);
|
||||||
wx2PyString(szString), t));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iOi)", level, s, t));
|
||||||
|
Py_DECREF(s);
|
||||||
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if (! found)
|
if (! found)
|
||||||
wxLog::DoLog(level, szString, t);
|
wxLog::DoLog(level, szString, t);
|
||||||
@@ -156,9 +158,11 @@ public:
|
|||||||
virtual void DoLogString(const wxChar *szString, time_t t) {
|
virtual void DoLogString(const wxChar *szString, time_t t) {
|
||||||
bool found;
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString")))
|
if ((found = wxPyCBH_findCallback(m_myInst, "DoLogString"))) {
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)",
|
PyObject* s = wx2PyString(szString);
|
||||||
wx2PyString(szString), t));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", s, t));
|
||||||
|
Py_DECREF(s);
|
||||||
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if (! found)
|
if (! found)
|
||||||
wxLog::DoLogString(szString, t);
|
wxLog::DoLogString(szString, t);
|
||||||
@@ -272,6 +276,43 @@ extern wxMimeTypesManager * wxTheMimeTypesManager;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
|
||||||
|
DECLARE_DEF_STRING(ART_OTHER);
|
||||||
|
|
||||||
|
// Python aware wxArtProvider
|
||||||
|
class wxPyArtProvider : public wxArtProvider {
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual wxBitmap CreateBitmap(const wxArtID& id,
|
||||||
|
const wxArtClient& client,
|
||||||
|
const wxSize& size) {
|
||||||
|
wxBitmap rval = wxNullBitmap;
|
||||||
|
wxPyBeginBlockThreads();
|
||||||
|
if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) {
|
||||||
|
PyObject* so = wxPyConstructObject((void*)&size, "wxSize", 0);
|
||||||
|
PyObject* ro;
|
||||||
|
wxBitmap* ptr;
|
||||||
|
PyObject* s1, *s2;
|
||||||
|
s1 = wx2PyString(id);
|
||||||
|
s2 = wx2PyString(client);
|
||||||
|
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOO)", s1, s2, so));
|
||||||
|
Py_DECREF(so);
|
||||||
|
Py_DECREF(s1);
|
||||||
|
Py_DECREF(s2);
|
||||||
|
if (ro) {
|
||||||
|
if (!SWIG_GetPtrObj(ro, (void**)&ptr, "_wxBitmap_p"))
|
||||||
|
rval = *ptr;
|
||||||
|
Py_DECREF(ro);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wxPyEndBlockThreads();
|
||||||
|
return rval;
|
||||||
|
}
|
||||||
|
|
||||||
|
PYPRIVATE;
|
||||||
|
};
|
||||||
|
|
||||||
#include <wx/docview.h>
|
#include <wx/docview.h>
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -9338,6 +9379,272 @@ static PyObject *_wrap_delete_wxMimeTypesManager(PyObject *self, PyObject *args,
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *SwigwxPyArtProviderTowxObject(void *ptr) {
|
||||||
|
wxPyArtProvider *src;
|
||||||
|
wxObject *dest;
|
||||||
|
src = (wxPyArtProvider *) ptr;
|
||||||
|
dest = (wxObject *) src;
|
||||||
|
return (void *) dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define new_wxArtProvider() (new wxPyArtProvider())
|
||||||
|
static PyObject *_wrap_new_wxArtProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPyArtProvider * _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxArtProvider",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (wxPyArtProvider *)new_wxArtProvider();
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyArtProvider_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxArtProvider__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxArtProvider__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPyArtProvider * _arg0;
|
||||||
|
PyObject * _arg1;
|
||||||
|
PyObject * _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
PyObject * _obj2 = 0;
|
||||||
|
char *_kwnames[] = { "self","self","_class", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxArtProvider__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyArtProvider_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxArtProvider__setCallbackInfo. Expected _wxPyArtProvider_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg1 = _obj1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
_arg2 = _obj2;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxArtProvider__setCallbackInfo(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxArtProvider_PushProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxPyArtProvider * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "provider", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxArtProvider_PushProvider",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyArtProvider_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxArtProvider_PushProvider. Expected _wxPyArtProvider_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxPyArtProvider::PushProvider(_arg0);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxArtProvider_PopProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxArtProvider_PopProvider",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (bool )wxPyArtProvider::PopProvider();
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxArtProvider_RemoveProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxPyArtProvider * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "provider", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxArtProvider_RemoveProvider",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyArtProvider_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxArtProvider_RemoveProvider. Expected _wxPyArtProvider_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = (bool )wxPyArtProvider::RemoveProvider(_arg0);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxArtProvider_GetBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxBitmap * _result;
|
||||||
|
wxString * _arg0;
|
||||||
|
wxString * _arg1 = (wxString *) &wxPyART_OTHER;
|
||||||
|
wxSize * _arg2 = (wxSize *) &wxDefaultSize;
|
||||||
|
PyObject * _obj0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
wxSize temp;
|
||||||
|
PyObject * _obj2 = 0;
|
||||||
|
char *_kwnames[] = { "id","client","size", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxArtProvider_GetBitmap",_kwnames,&_obj0,&_obj1,&_obj2))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
_arg0 = wxString_in_helper(_obj0);
|
||||||
|
if (_arg0 == NULL)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (_obj1)
|
||||||
|
{
|
||||||
|
_arg1 = wxString_in_helper(_obj1);
|
||||||
|
if (_arg1 == NULL)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (_obj2)
|
||||||
|
{
|
||||||
|
_arg2 = &temp;
|
||||||
|
if (! wxSize_helper(_obj2, &_arg2))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = new wxBitmap (wxPyArtProvider::GetBitmap(*_arg0,*_arg1,*_arg2));
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
{
|
||||||
|
if (_obj0)
|
||||||
|
delete _arg0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if (_obj1)
|
||||||
|
delete _arg1;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxArtProvider_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxIcon * _result;
|
||||||
|
wxString * _arg0;
|
||||||
|
wxString * _arg1 = (wxString *) &wxPyART_OTHER;
|
||||||
|
wxSize * _arg2 = (wxSize *) &wxDefaultSize;
|
||||||
|
PyObject * _obj0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
wxSize temp;
|
||||||
|
PyObject * _obj2 = 0;
|
||||||
|
char *_kwnames[] = { "id","client","size", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxArtProvider_GetIcon",_kwnames,&_obj0,&_obj1,&_obj2))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
_arg0 = wxString_in_helper(_obj0);
|
||||||
|
if (_arg0 == NULL)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (_obj1)
|
||||||
|
{
|
||||||
|
_arg1 = wxString_in_helper(_obj1);
|
||||||
|
if (_arg1 == NULL)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (_obj2)
|
||||||
|
{
|
||||||
|
_arg2 = &temp;
|
||||||
|
if (! wxSize_helper(_obj2, &_arg2))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = new wxIcon (wxPyArtProvider::GetIcon(*_arg0,*_arg1,*_arg2));
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
{
|
||||||
|
if (_obj0)
|
||||||
|
delete _arg0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if (_obj1)
|
||||||
|
delete _arg1;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxArtProvider_CleanUpProviders(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxArtProvider_CleanUpProviders",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxPyArtProvider::CleanUpProviders();
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxFileHistoryTowxObject(void *ptr) {
|
static void *SwigwxFileHistoryTowxObject(void *ptr) {
|
||||||
wxFileHistory *src;
|
wxFileHistory *src;
|
||||||
wxObject *dest;
|
wxObject *dest;
|
||||||
@@ -9819,6 +10126,14 @@ static PyMethodDef misc2cMethods[] = {
|
|||||||
{ "wxFileHistory_AddFileToHistory", (PyCFunction) _wrap_wxFileHistory_AddFileToHistory, METH_VARARGS | METH_KEYWORDS },
|
{ "wxFileHistory_AddFileToHistory", (PyCFunction) _wrap_wxFileHistory_AddFileToHistory, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "delete_wxFileHistory", (PyCFunction) _wrap_delete_wxFileHistory, METH_VARARGS | METH_KEYWORDS },
|
{ "delete_wxFileHistory", (PyCFunction) _wrap_delete_wxFileHistory, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxFileHistory", (PyCFunction) _wrap_new_wxFileHistory, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxFileHistory", (PyCFunction) _wrap_new_wxFileHistory, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider_CleanUpProviders", (PyCFunction) _wrap_wxArtProvider_CleanUpProviders, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider_GetIcon", (PyCFunction) _wrap_wxArtProvider_GetIcon, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider_GetBitmap", (PyCFunction) _wrap_wxArtProvider_GetBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider_RemoveProvider", (PyCFunction) _wrap_wxArtProvider_RemoveProvider, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider_PopProvider", (PyCFunction) _wrap_wxArtProvider_PopProvider, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider_PushProvider", (PyCFunction) _wrap_wxArtProvider_PushProvider, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxArtProvider__setCallbackInfo", (PyCFunction) _wrap_wxArtProvider__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "new_wxArtProvider", (PyCFunction) _wrap_new_wxArtProvider, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "delete_wxMimeTypesManager", (PyCFunction) _wrap_delete_wxMimeTypesManager, METH_VARARGS | METH_KEYWORDS },
|
{ "delete_wxMimeTypesManager", (PyCFunction) _wrap_delete_wxMimeTypesManager, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxMimeTypesManager_Unassociate", (PyCFunction) _wrap_wxMimeTypesManager_Unassociate, METH_VARARGS | METH_KEYWORDS },
|
{ "wxMimeTypesManager_Unassociate", (PyCFunction) _wrap_wxMimeTypesManager_Unassociate, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxMimeTypesManager_Associate", (PyCFunction) _wrap_wxMimeTypesManager_Associate, METH_VARARGS | METH_KEYWORDS },
|
{ "wxMimeTypesManager_Associate", (PyCFunction) _wrap_wxMimeTypesManager_Associate, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -10161,6 +10476,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_unsigned_short","_WXTYPE",0},
|
{ "_unsigned_short","_WXTYPE",0},
|
||||||
{ "_unsigned_short","_short",0},
|
{ "_unsigned_short","_short",0},
|
||||||
{ "_wxObject","_wxFileHistory",SwigwxFileHistoryTowxObject},
|
{ "_wxObject","_wxFileHistory",SwigwxFileHistoryTowxObject},
|
||||||
|
{ "_wxObject","_wxPyArtProvider",SwigwxPyArtProviderTowxObject},
|
||||||
{ "_wxObject","_wxWave",SwigwxWaveTowxObject},
|
{ "_wxObject","_wxWave",SwigwxWaveTowxObject},
|
||||||
{ "_wxObject","_wxJoystick",SwigwxJoystickTowxObject},
|
{ "_wxObject","_wxJoystick",SwigwxJoystickTowxObject},
|
||||||
{ "_wxObject","_wxPyProcess",SwigwxPyProcessTowxObject},
|
{ "_wxObject","_wxPyProcess",SwigwxPyProcessTowxObject},
|
||||||
@@ -10343,9 +10659,47 @@ SWIGEXPORT(void) initmisc2c() {
|
|||||||
PyDict_SetItemString(d,"wxMAILCAP_ALL", PyInt_FromLong((long) wxMAILCAP_ALL));
|
PyDict_SetItemString(d,"wxMAILCAP_ALL", PyInt_FromLong((long) wxMAILCAP_ALL));
|
||||||
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
||||||
SWIG_addvarlink(SWIG_globals,"wxTheMimeTypesManager",_wrap_wxTheMimeTypesManager_get, _wrap_wxTheMimeTypesManager_set);
|
SWIG_addvarlink(SWIG_globals,"wxTheMimeTypesManager",_wrap_wxTheMimeTypesManager_get, _wrap_wxTheMimeTypesManager_set);
|
||||||
|
PyDict_SetItemString(d,"wxART_TOOLBAR", PyString_FromString("toolbar_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_MENU", PyString_FromString("menu_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_FRAME_ICON", PyString_FromString("frame_icon_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_CMN_DIALOG", PyString_FromString("cmn_dialog_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP_BROWSER", PyString_FromString("help_browser_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_MESSAGE_BOX", PyString_FromString("message_box_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_OTHER", PyString_FromString("other_C"));
|
||||||
|
PyDict_SetItemString(d,"wxART_ADD_BOOKMARK", PyString_FromString("add_bookmark"));
|
||||||
|
PyDict_SetItemString(d,"wxART_DEL_BOOKMARK", PyString_FromString("del_bookmark"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP_SIDE_PANEL", PyString_FromString("help_side_panel"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP_SETTINGS", PyString_FromString("help_settings"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP_BOOK", PyString_FromString("help_book"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP_FOLDER", PyString_FromString("help_folder"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP_PAGE", PyString_FromString("help_page"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_BACK", PyString_FromString("go_back"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_FORWARD", PyString_FromString("go_forward"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_UP", PyString_FromString("go_up"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_DOWN", PyString_FromString("go_down"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_TO_PARENT", PyString_FromString("go_to_parent"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_HOME", PyString_FromString("go_home"));
|
||||||
|
PyDict_SetItemString(d,"wxART_FILE_OPEN", PyString_FromString("file_open"));
|
||||||
|
PyDict_SetItemString(d,"wxART_PRINT", PyString_FromString("print"));
|
||||||
|
PyDict_SetItemString(d,"wxART_HELP", PyString_FromString("help"));
|
||||||
|
PyDict_SetItemString(d,"wxART_TIP", PyString_FromString("tip"));
|
||||||
|
PyDict_SetItemString(d,"wxART_REPORT_VIEW", PyString_FromString("report_view"));
|
||||||
|
PyDict_SetItemString(d,"wxART_LIST_VIEW", PyString_FromString("list_view"));
|
||||||
|
PyDict_SetItemString(d,"wxART_NEW_DIR", PyString_FromString("new_dir"));
|
||||||
|
PyDict_SetItemString(d,"wxART_FOLDER", PyString_FromString("folder"));
|
||||||
|
PyDict_SetItemString(d,"wxART_GO_DIR_UP", PyString_FromString("go_dir_up"));
|
||||||
|
PyDict_SetItemString(d,"wxART_EXECUTABLE_FILE", PyString_FromString("executable_file"));
|
||||||
|
PyDict_SetItemString(d,"wxART_NORMAL_FILE", PyString_FromString("normal_file"));
|
||||||
|
PyDict_SetItemString(d,"wxART_TICK_MARK", PyString_FromString("tick"));
|
||||||
|
PyDict_SetItemString(d,"wxART_CROSS_MARK", PyString_FromString("cross"));
|
||||||
|
PyDict_SetItemString(d,"wxART_ERROR", PyString_FromString("error"));
|
||||||
|
PyDict_SetItemString(d,"wxART_QUESTION", PyString_FromString("question"));
|
||||||
|
PyDict_SetItemString(d,"wxART_WARNING", PyString_FromString("warning"));
|
||||||
|
PyDict_SetItemString(d,"wxART_INFORMATION", PyString_FromString("information"));
|
||||||
|
|
||||||
wxPyPtrTypeMap_Add("wxDragImage", "wxGenericDragImage");
|
wxPyPtrTypeMap_Add("wxDragImage", "wxGenericDragImage");
|
||||||
wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess");
|
wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess");
|
||||||
|
wxPyPtrTypeMap_Add("wxArtProvider", "wxPyArtProvider");
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; _swig_mapping[i].n1; i++)
|
for (i = 0; _swig_mapping[i].n1; i++)
|
||||||
|
@@ -900,6 +900,24 @@ class wxMimeTypesManager(wxMimeTypesManagerPtr):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class wxArtProviderPtr(wxObjectPtr):
|
||||||
|
def __init__(self,this):
|
||||||
|
self.this = this
|
||||||
|
self.thisown = 0
|
||||||
|
def _setCallbackInfo(self, *_args, **_kwargs):
|
||||||
|
val = apply(misc2c.wxArtProvider__setCallbackInfo,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def __repr__(self):
|
||||||
|
return "<C wxArtProvider instance at %s>" % (self.this,)
|
||||||
|
class wxArtProvider(wxArtProviderPtr):
|
||||||
|
def __init__(self,*_args,**_kwargs):
|
||||||
|
self.this = apply(misc2c.new_wxArtProvider,_args,_kwargs)
|
||||||
|
self.thisown = 1
|
||||||
|
self._setCallbackInfo(self, wxArtProvider)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class wxFileHistoryPtr(wxObjectPtr):
|
class wxFileHistoryPtr(wxObjectPtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
@@ -1172,6 +1190,24 @@ wxFileType_ExpandCommand = misc2c.wxFileType_ExpandCommand
|
|||||||
|
|
||||||
wxMimeTypesManager_IsOfType = misc2c.wxMimeTypesManager_IsOfType
|
wxMimeTypesManager_IsOfType = misc2c.wxMimeTypesManager_IsOfType
|
||||||
|
|
||||||
|
wxArtProvider_PushProvider = misc2c.wxArtProvider_PushProvider
|
||||||
|
|
||||||
|
wxArtProvider_PopProvider = misc2c.wxArtProvider_PopProvider
|
||||||
|
|
||||||
|
wxArtProvider_RemoveProvider = misc2c.wxArtProvider_RemoveProvider
|
||||||
|
|
||||||
|
def wxArtProvider_GetBitmap(*_args, **_kwargs):
|
||||||
|
val = apply(misc2c.wxArtProvider_GetBitmap,_args,_kwargs)
|
||||||
|
if val: val = wxBitmapPtr(val); val.thisown = 1
|
||||||
|
return val
|
||||||
|
|
||||||
|
def wxArtProvider_GetIcon(*_args, **_kwargs):
|
||||||
|
val = apply(misc2c.wxArtProvider_GetIcon,_args,_kwargs)
|
||||||
|
if val: val = wxIconPtr(val); val.thisown = 1
|
||||||
|
return val
|
||||||
|
|
||||||
|
wxArtProvider_CleanUpProviders = misc2c.wxArtProvider_CleanUpProviders
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------- VARIABLE WRAPPERS ------------------
|
#-------------- VARIABLE WRAPPERS ------------------
|
||||||
@@ -1288,3 +1324,40 @@ wxMAILCAP_GNOME = misc2c.wxMAILCAP_GNOME
|
|||||||
wxMAILCAP_ALL = misc2c.wxMAILCAP_ALL
|
wxMAILCAP_ALL = misc2c.wxMAILCAP_ALL
|
||||||
cvar = misc2c.cvar
|
cvar = misc2c.cvar
|
||||||
wxTheMimeTypesManager = wxMimeTypesManagerPtr(misc2c.cvar.wxTheMimeTypesManager)
|
wxTheMimeTypesManager = wxMimeTypesManagerPtr(misc2c.cvar.wxTheMimeTypesManager)
|
||||||
|
wxART_TOOLBAR = misc2c.wxART_TOOLBAR
|
||||||
|
wxART_MENU = misc2c.wxART_MENU
|
||||||
|
wxART_FRAME_ICON = misc2c.wxART_FRAME_ICON
|
||||||
|
wxART_CMN_DIALOG = misc2c.wxART_CMN_DIALOG
|
||||||
|
wxART_HELP_BROWSER = misc2c.wxART_HELP_BROWSER
|
||||||
|
wxART_MESSAGE_BOX = misc2c.wxART_MESSAGE_BOX
|
||||||
|
wxART_OTHER = misc2c.wxART_OTHER
|
||||||
|
wxART_ADD_BOOKMARK = misc2c.wxART_ADD_BOOKMARK
|
||||||
|
wxART_DEL_BOOKMARK = misc2c.wxART_DEL_BOOKMARK
|
||||||
|
wxART_HELP_SIDE_PANEL = misc2c.wxART_HELP_SIDE_PANEL
|
||||||
|
wxART_HELP_SETTINGS = misc2c.wxART_HELP_SETTINGS
|
||||||
|
wxART_HELP_BOOK = misc2c.wxART_HELP_BOOK
|
||||||
|
wxART_HELP_FOLDER = misc2c.wxART_HELP_FOLDER
|
||||||
|
wxART_HELP_PAGE = misc2c.wxART_HELP_PAGE
|
||||||
|
wxART_GO_BACK = misc2c.wxART_GO_BACK
|
||||||
|
wxART_GO_FORWARD = misc2c.wxART_GO_FORWARD
|
||||||
|
wxART_GO_UP = misc2c.wxART_GO_UP
|
||||||
|
wxART_GO_DOWN = misc2c.wxART_GO_DOWN
|
||||||
|
wxART_GO_TO_PARENT = misc2c.wxART_GO_TO_PARENT
|
||||||
|
wxART_GO_HOME = misc2c.wxART_GO_HOME
|
||||||
|
wxART_FILE_OPEN = misc2c.wxART_FILE_OPEN
|
||||||
|
wxART_PRINT = misc2c.wxART_PRINT
|
||||||
|
wxART_HELP = misc2c.wxART_HELP
|
||||||
|
wxART_TIP = misc2c.wxART_TIP
|
||||||
|
wxART_REPORT_VIEW = misc2c.wxART_REPORT_VIEW
|
||||||
|
wxART_LIST_VIEW = misc2c.wxART_LIST_VIEW
|
||||||
|
wxART_NEW_DIR = misc2c.wxART_NEW_DIR
|
||||||
|
wxART_FOLDER = misc2c.wxART_FOLDER
|
||||||
|
wxART_GO_DIR_UP = misc2c.wxART_GO_DIR_UP
|
||||||
|
wxART_EXECUTABLE_FILE = misc2c.wxART_EXECUTABLE_FILE
|
||||||
|
wxART_NORMAL_FILE = misc2c.wxART_NORMAL_FILE
|
||||||
|
wxART_TICK_MARK = misc2c.wxART_TICK_MARK
|
||||||
|
wxART_CROSS_MARK = misc2c.wxART_CROSS_MARK
|
||||||
|
wxART_ERROR = misc2c.wxART_ERROR
|
||||||
|
wxART_QUESTION = misc2c.wxART_QUESTION
|
||||||
|
wxART_WARNING = misc2c.wxART_WARNING
|
||||||
|
wxART_INFORMATION = misc2c.wxART_INFORMATION
|
||||||
|
@@ -1755,11 +1755,13 @@ static PyObject *_wrap_wxSizer_Layout(PyObject *self, PyObject *args, PyObject *
|
|||||||
#define wxSizer_Fit(_swigobj,_swigarg0) (_swigobj->Fit(_swigarg0))
|
#define wxSizer_Fit(_swigobj,_swigarg0) (_swigobj->Fit(_swigarg0))
|
||||||
static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
|
wxSize * _result;
|
||||||
wxSizer * _arg0;
|
wxSizer * _arg0;
|
||||||
wxWindow * _arg1;
|
wxWindow * _arg1;
|
||||||
PyObject * _argo0 = 0;
|
PyObject * _argo0 = 0;
|
||||||
PyObject * _argo1 = 0;
|
PyObject * _argo1 = 0;
|
||||||
char *_kwnames[] = { "self","window", NULL };
|
char *_kwnames[] = { "self","window", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_Fit",_kwnames,&_argo0,&_argo1))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_Fit",_kwnames,&_argo0,&_argo1))
|
||||||
@@ -1780,12 +1782,12 @@ static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwa
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
wxSizer_Fit(_arg0,_arg1);
|
_result = new wxSize (wxSizer_Fit(_arg0,_arg1));
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
wxPyEndAllowThreads(__tstate);
|
||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
} Py_INCREF(Py_None);
|
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
|
||||||
_resultobj = Py_None;
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -182,6 +182,7 @@ class wxSizerPtr(wxObjectPtr):
|
|||||||
return val
|
return val
|
||||||
def Fit(self, *_args, **_kwargs):
|
def Fit(self, *_args, **_kwargs):
|
||||||
val = apply(sizersc.wxSizer_Fit,(self,) + _args, _kwargs)
|
val = apply(sizersc.wxSizer_Fit,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||||
return val
|
return val
|
||||||
def FitInside(self, *_args, **_kwargs):
|
def FitInside(self, *_args, **_kwargs):
|
||||||
val = apply(sizersc.wxSizer_FitInside,(self,) + _args, _kwargs)
|
val = apply(sizersc.wxSizer_FitInside,(self,) + _args, _kwargs)
|
||||||
|
@@ -1565,6 +1565,29 @@ def wxPyTypeCast(obj, typeStr):
|
|||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
_wxCallAfterId = None
|
||||||
|
|
||||||
|
def wxCallAfter(callable, *args, **kw):
|
||||||
|
"""
|
||||||
|
Call the specified function after the current and pending event
|
||||||
|
handlers have been completed.
|
||||||
|
"""
|
||||||
|
app = wxGetApp()
|
||||||
|
assert app, 'No wxApp created yet'
|
||||||
|
|
||||||
|
global _wxCallAfterId
|
||||||
|
if _wxCallAfterId is None:
|
||||||
|
_wxCallAfterId = wxNewId()
|
||||||
|
app.Connect(-1, -1, _wxCallAfterId,
|
||||||
|
lambda event: apply(event.callable, event.args, event.kw) )
|
||||||
|
evt = wxPyEvent()
|
||||||
|
evt.SetEventType(_wxCallAfterId)
|
||||||
|
evt.callable = callable
|
||||||
|
evt.args = args
|
||||||
|
evt.kw = kw
|
||||||
|
wxPostEvent(app, evt)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
class wxPyDeadObjectError(AttributeError):
|
class wxPyDeadObjectError(AttributeError):
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user