Updates for recent changes to wx, and some other little tweaks and fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1046,18 +1046,18 @@ static PyObject *_wrap_wxXmlResource_AttachUnknownControl(PyObject *self, PyObje
|
||||
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;
|
||||
char *_kwnames[] = { "str_id", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXMLID",_kwnames,&_arg0))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxXmlResource_GetXRCID",_kwnames,&_arg0))
|
||||
return NULL;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (int )wxXmlResource::GetXMLID(_arg0);
|
||||
_result = (int )wxXmlResource::GetXRCID(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -1189,7 +1189,7 @@ static PyMethodDef xrccMethods[] = {
|
||||
{ "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 },
|
||||
|
@@ -122,7 +122,7 @@ public:
|
||||
// Returns numeric ID that is equivalent to string id used in XML
|
||||
// resource. To be used in event tables
|
||||
// Macro XMLID is provided for convenience
|
||||
static int GetXMLID(const char *str_id);
|
||||
static int GetXRCID(const char *str_id);
|
||||
|
||||
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
|
||||
long GetVersion() const;
|
||||
@@ -142,12 +142,14 @@ public:
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%pragma(python) code = "
|
||||
def XMLID(str_id):
|
||||
return wxXmlResource_GetXMLID(str_id)
|
||||
def XRCID(str_id):
|
||||
return wxXmlResource_GetXRCID(str_id)
|
||||
|
||||
def XMLCTRL(window, str_id, *args):
|
||||
return window.FindWindowById(XMLID(str_id))
|
||||
def XRCCTRL(window, str_id, *ignoreargs):
|
||||
return window.FindWindowById(XRCID(str_id))
|
||||
|
||||
XMLID = XRCID
|
||||
XMLCTRL = XRCCTRL
|
||||
"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@@ -41,12 +41,14 @@ from sizers import *
|
||||
|
||||
from filesys import *
|
||||
|
||||
def XMLID(str_id):
|
||||
return wxXmlResource_GetXMLID(str_id)
|
||||
def XRCID(str_id):
|
||||
return wxXmlResource_GetXRCID(str_id)
|
||||
|
||||
def XMLCTRL(window, str_id, *args):
|
||||
return window.FindWindowById(XMLID(str_id))
|
||||
def XRCCTRL(window, str_id, *ignoreargs):
|
||||
return window.FindWindowById(XRCID(str_id))
|
||||
|
||||
XMLID = XRCID
|
||||
XMLCTRL = XRCCTRL
|
||||
|
||||
class wxXmlResourcePtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
@@ -129,7 +131,7 @@ def wxXmlResource(*_args,**_kwargs):
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
wxXmlResource_GetXMLID = xrcc.wxXmlResource_GetXMLID
|
||||
wxXmlResource_GetXRCID = xrcc.wxXmlResource_GetXRCID
|
||||
|
||||
def wxXmlResource_Get(*_args, **_kwargs):
|
||||
val = apply(xrcc.wxXmlResource_Get,_args,_kwargs)
|
||||
|
Reference in New Issue
Block a user