#define SWIG_name "xrcc"
-#include "export.h"
+#include "wxPython.h"
#include "wx/xrc/xmlres.h"
+#include <wx/filesys.h>
+#include <wx/fs_mem.h>
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
}
return target;
}
-
-#if PYTHON_API_VERSION >= 1009
- static char* wxStringErrorMsg = "String or Unicode type required";
-#else
- static char* wxStringErrorMsg = "String type required";
-#endif
#ifdef __cplusplus
extern "C" {
#endif
return (void *) dest;
}
-#define new_wxXmlResourceEmpty(_swigarg0) (new wxXmlResource(_swigarg0))
-static PyObject *_wrap_new_wxXmlResourceEmpty(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define new_wxXmlResource(_swigarg0,_swigarg1) (new wxXmlResource(_swigarg0,_swigarg1))
+static PyObject *_wrap_new_wxXmlResource(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxXmlResource * _result;
- int _arg0 = (int ) (wxXRC_USE_LOCALE);
- char *_kwnames[] = { "flags", NULL };
+ wxString * _arg0;
+ int _arg1 = (int ) (wxXRC_USE_LOCALE);
+ PyObject * _obj0 = 0;
+ char *_kwnames[] = { "filemask","flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxXmlResourceEmpty",_kwnames,&_arg0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxXmlResource",_kwnames,&_obj0,&_arg1))
+ return NULL;
+{
+ _arg0 = wxString_in_helper(_obj0);
+ if (_arg0 == NULL)
return NULL;
+}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxXmlResource *)new_wxXmlResourceEmpty(_arg0);
+ _result = (wxXmlResource *)new_wxXmlResource(*_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
Py_INCREF(Py_None);
_resultobj = Py_None;
}
+{
+ if (_obj0)
+ delete _arg0;
+}
return _resultobj;
}
-static wxXmlResource *new_wxXmlResource(const wxString *filemask,int flags) {
- wxXmlResource* res = new wxXmlResource(*filemask, flags);
- res->InitAllHandlers();
- return res;
- }
-
-static PyObject *_wrap_new_wxXmlResource(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define new_wxEmptyXmlResource(_swigarg0) (new wxXmlResource(_swigarg0))
+static PyObject *_wrap_new_wxEmptyXmlResource(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxXmlResource * _result;
- wxString * _arg0;
- int _arg1 = (int ) (wxXRC_USE_LOCALE);
- PyObject * _obj0 = 0;
- char *_kwnames[] = { "filemask","flags", NULL };
+ int _arg0 = (int ) (wxXRC_USE_LOCALE);
+ char *_kwnames[] = { "flags", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:new_wxXmlResource",_kwnames,&_obj0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxEmptyXmlResource",_kwnames,&_arg0))
return NULL;
-{
-#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
-}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxXmlResource *)new_wxXmlResource(_arg0,_arg1);
+ _result = (wxXmlResource *)new_wxEmptyXmlResource(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
Py_INCREF(Py_None);
_resultobj = Py_None;
}
-{
- if (_obj0)
- delete _arg0;
-}
return _resultobj;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- delete_wxXmlResource(_arg0);
+ delete_wxXmlResource(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+}
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (bool )wxXmlResource_Load(_arg0,*_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+static bool wxXmlResource_LoadFromString(wxXmlResource *self,const wxString & data) {
+ static int s_memFileIdx = 0;
+
+ // Check for memory FS. If not present, load the handler:
+ wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"),
+ wxT("dummy data"));
+ wxFileSystem fsys;
+ wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
+ wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
+ if (f)
+ delete f;
+ else
+ wxFileSystem::AddHandler(new wxMemoryFSHandler);
+
+ // Now put the resource data into the memory FS
+ wxString filename(wxT("XRC_resource/data_string_"));
+ filename << s_memFileIdx;
+ s_memFileIdx += 1;
+ wxMemoryFSHandler::AddFile(filename, data);
+
+ // Load the "file" into the resource object
+ bool retval = self->Load(wxT("memory:") + filename );
+
+ return retval;
+ }
+static PyObject *_wrap_wxXmlResource_LoadFromString(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxXmlResource * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","data", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxXmlResource_LoadFromString",_kwnames,&_argo0,&_obj1))
return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadFromString. Expected _wxXmlResource_p.");
return NULL;
+ }
}
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
+{
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
+ return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxXmlResource_Load(_arg0,*_arg1);
+ _result = (bool )wxXmlResource_LoadFromString(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxXmlResource_InitAllHandlers(_arg0);
+ wxXmlResource_InitAllHandlers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxXmlResource_AddHandler(_arg0,_arg1);
+ wxXmlResource_AddHandler(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- wxXmlResource_ClearHandlers(_arg0);
+ wxXmlResource_ClearHandlers(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
return NULL;
- }
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxMenu *)wxXmlResource_LoadMenu(_arg0,*_arg1);
+ _result = (wxMenu *)wxXmlResource_LoadMenu(_arg0,*_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+}
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (wxMenuBar *)wxXmlResource_LoadMenuBar(_arg0,*_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxXmlResource_LoadMenuBarOnFrame(_swigobj,_swigarg0,_swigarg1) (_swigobj->LoadMenuBar(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxXmlResource_LoadMenuBarOnFrame(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMenuBar * _result;
+ wxXmlResource * _arg0;
+ wxWindow * _arg1;
+ wxString * _arg2;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ PyObject * _obj2 = 0;
+ char *_kwnames[] = { "self","parent","name", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxXmlResource_LoadMenuBarOnFrame",_kwnames,&_argo0,&_argo1,&_obj2))
return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_LoadMenuBarOnFrame. Expected _wxXmlResource_p.");
return NULL;
+ }
}
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxXmlResource_LoadMenuBarOnFrame. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ _arg2 = wxString_in_helper(_obj2);
+ if (_arg2 == NULL)
+ return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxMenuBar *)wxXmlResource_LoadMenuBar(_arg0,*_arg1);
+ _result = (wxMenuBar *)wxXmlResource_LoadMenuBarOnFrame(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
{
- if (_obj1)
- delete _arg1;
+ if (_obj2)
+ delete _arg2;
}
return _resultobj;
}
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg2 = wxString_in_helper(_obj2);
+ if (_arg2 == NULL)
return NULL;
- }
- if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg2 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj2)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
-#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxToolBar *)wxXmlResource_LoadToolBar(_arg0,_arg1,*_arg2);
+ _result = (wxToolBar *)wxXmlResource_LoadToolBar(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg2 = wxString_in_helper(_obj2);
+ if (_arg2 == NULL)
return NULL;
- }
- if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg2 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj2)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
-#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxDialog *)wxXmlResource_LoadDialog(_arg0,_arg1,*_arg2);
+ _result = (wxDialog *)wxXmlResource_LoadDialog(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg3 = wxString_in_helper(_obj3);
+ if (_arg3 == NULL)
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
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxXmlResource_LoadOnDialog(_arg0,_arg1,_arg2,*_arg3);
+ _result = (bool )wxXmlResource_LoadOnDialog(_arg0,_arg1,_arg2,*_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ _arg2 = wxString_in_helper(_obj2);
+ if (_arg2 == NULL)
return NULL;
- _arg2 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj2)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
-#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxPanel *)wxXmlResource_LoadPanel(_arg0,_arg1,*_arg2);
+ _result = (wxPanel *)wxXmlResource_LoadPanel(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#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)
+ _arg3 = wxString_in_helper(_obj3);
+ if (_arg3 == NULL)
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
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxXmlResource_LoadOnPanel(_arg0,_arg1,_arg2,*_arg3);
+ _result = (bool )wxXmlResource_LoadOnPanel(_arg0,_arg1,_arg2,*_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#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)
+ _arg3 = wxString_in_helper(_obj3);
+ if (_arg3 == NULL)
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
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxXmlResource_LoadFrame(_arg0,_arg1,_arg2,*_arg3);
+ _result = (bool )wxXmlResource_LoadFrame(_arg0,_arg1,_arg2,*_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
return NULL;
- }
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = new wxBitmap (wxXmlResource_LoadBitmap(_arg0,*_arg1));
+ _result = new wxBitmap (wxXmlResource_LoadBitmap(_arg0,*_arg1));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
return NULL;
- }
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = new wxIcon (wxXmlResource_LoadIcon(_arg0,*_arg1));
+ _result = new wxIcon (wxXmlResource_LoadIcon(_arg0,*_arg1));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
}
{
-#if PYTHON_API_VERSION >= 1009
- char* tmpPtr; int tmpSize;
- if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
- return NULL;
- _arg1 = new wxString(tmpPtr, tmpSize);
-#else
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ _arg1 = wxString_in_helper(_obj1);
+ if (_arg1 == NULL)
return NULL;
- }
- _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
-#endif
}
if (_argo2) {
if (_argo2 == Py_None) { _arg2 = NULL; }
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (bool )wxXmlResource_AttachUnknownControl(_arg0,*_arg1,_arg2,_arg3);
+ _result = (bool )wxXmlResource_AttachUnknownControl(_arg0,*_arg1,_arg2,_arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
return _resultobj;
}
-static PyObject *_wrap_wxXmlResource_GetXMLID(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject *_wrap_wxXmlResource_GetXRCID(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
- char * _arg0;
+ wxString * _arg0;
+ PyObject * _obj0 = 0;
char *_kwnames[] = { "str_id", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXMLID",_kwnames,&_arg0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_GetXRCID",_kwnames,&_obj0))
return NULL;
+{
+ _arg0 = wxString_in_helper(_obj0);
+ if (_arg0 == NULL)
+ return NULL;
+}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (int )wxXmlResource::GetXMLID(_arg0);
+ _result = (int )wxXmlResource::GetXRCID(*_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
+{
+ if (_obj0)
+ delete _arg0;
+}
return _resultobj;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (long )wxXmlResource_GetVersion(_arg0);
+ _result = (long )wxXmlResource_GetVersion(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (int )wxXmlResource_CompareVersion(_arg0,_arg1,_arg2,_arg3,_arg4);
+ _result = (int )wxXmlResource_CompareVersion(_arg0,_arg1,_arg2,_arg3,_arg4);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxXmlResource *)wxXmlResource::Get();
+ _result = (wxXmlResource *)wxXmlResource::Get();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
- _result = (wxXmlResource *)wxXmlResource::Set(_arg0);
+ _result = (wxXmlResource *)wxXmlResource::Set(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
{ "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_CompareVersion", (PyCFunction) _wrap_wxXmlResource_CompareVersion, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_GetVersion", (PyCFunction) _wrap_wxXmlResource_GetVersion, METH_VARARGS | METH_KEYWORDS },
- { "wxXmlResource_GetXMLID", (PyCFunction) _wrap_wxXmlResource_GetXMLID, METH_VARARGS | METH_KEYWORDS },
+ { "wxXmlResource_GetXRCID", (PyCFunction) _wrap_wxXmlResource_GetXRCID, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_AttachUnknownControl", (PyCFunction) _wrap_wxXmlResource_AttachUnknownControl, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadIcon", (PyCFunction) _wrap_wxXmlResource_LoadIcon, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadBitmap", (PyCFunction) _wrap_wxXmlResource_LoadBitmap, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadOnDialog", (PyCFunction) _wrap_wxXmlResource_LoadOnDialog, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadDialog", (PyCFunction) _wrap_wxXmlResource_LoadDialog, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadToolBar", (PyCFunction) _wrap_wxXmlResource_LoadToolBar, METH_VARARGS | METH_KEYWORDS },
+ { "wxXmlResource_LoadMenuBarOnFrame", (PyCFunction) _wrap_wxXmlResource_LoadMenuBarOnFrame, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadMenuBar", (PyCFunction) _wrap_wxXmlResource_LoadMenuBar, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadMenu", (PyCFunction) _wrap_wxXmlResource_LoadMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_ClearHandlers", (PyCFunction) _wrap_wxXmlResource_ClearHandlers, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_AddHandler", (PyCFunction) _wrap_wxXmlResource_AddHandler, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_InitAllHandlers", (PyCFunction) _wrap_wxXmlResource_InitAllHandlers, METH_VARARGS | METH_KEYWORDS },
+ { "wxXmlResource_LoadFromString", (PyCFunction) _wrap_wxXmlResource_LoadFromString, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_Load", (PyCFunction) _wrap_wxXmlResource_Load, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxXmlResource", (PyCFunction) _wrap_delete_wxXmlResource, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxEmptyXmlResource", (PyCFunction) _wrap_new_wxEmptyXmlResource, METH_VARARGS | METH_KEYWORDS },
{ "new_wxXmlResource", (PyCFunction) _wrap_new_wxXmlResource, METH_VARARGS | METH_KEYWORDS },
- { "new_wxXmlResourceEmpty", (PyCFunction) _wrap_new_wxXmlResourceEmpty, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
- wxXmlInitXmlModule();
wxXmlInitResourceModule();
wxXmlResource::Get()->InitAllHandlers();