More changes to make the autodocs be better, made all the namestrings
and such be visible to swig so the autodoc generator knows how to rename them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,14 +21,6 @@
|
||||
#include <wx/xml/xml.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
static const wxString wxPyUTF8String(wxT("UTF-8"));
|
||||
static const wxString wxPyStyleString(wxT("style"));
|
||||
static const wxString wxPySizeString(wxT("size"));
|
||||
static const wxString wxPyPosString(wxT("pos"));
|
||||
static const wxString wxPyBitmapString(wxT("bitmap"));
|
||||
static const wxString wxPyIconString(wxT("icon"));
|
||||
static const wxString wxPyFontString(wxT("font"));
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -36,6 +28,17 @@
|
||||
%import core.i
|
||||
%pythoncode { wx = core }
|
||||
|
||||
|
||||
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
|
||||
MAKE_CONST_WXSTRING2(UTF8String, "UTF-8");
|
||||
MAKE_CONST_WXSTRING2(StyleString, "style");
|
||||
MAKE_CONST_WXSTRING2(SizeString, "size");
|
||||
MAKE_CONST_WXSTRING2(PosString, "pos");
|
||||
MAKE_CONST_WXSTRING2(BitmapString, "bitmap");
|
||||
MAKE_CONST_WXSTRING2(IconString, "icon");
|
||||
MAKE_CONST_WXSTRING2(FontString, "font");
|
||||
|
||||
|
||||
%include _xrc_rename.i
|
||||
|
||||
|
||||
|
@@ -112,7 +112,7 @@ class XmlResource(core.Object):
|
||||
return _xrc.XmlResource_LoadBitmap(*args, **kwargs)
|
||||
|
||||
def LoadIcon(*args, **kwargs):
|
||||
"""LoadIcon(String name) -> wxIcon"""
|
||||
"""LoadIcon(String name) -> Icon"""
|
||||
return _xrc.XmlResource_LoadIcon(*args, **kwargs)
|
||||
|
||||
def AttachUnknownControl(*args, **kwargs):
|
||||
@@ -157,6 +157,14 @@ class XmlResourcePtr(XmlResource):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = XmlResource
|
||||
_xrc.XmlResource_swigregister(XmlResourcePtr)
|
||||
cvar = _xrc.cvar
|
||||
UTF8String = cvar.UTF8String
|
||||
StyleString = cvar.StyleString
|
||||
SizeString = cvar.SizeString
|
||||
PosString = cvar.PosString
|
||||
BitmapString = cvar.BitmapString
|
||||
IconString = cvar.IconString
|
||||
FontString = cvar.FontString
|
||||
|
||||
def EmptyXmlResource(*args, **kwargs):
|
||||
"""EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource"""
|
||||
@@ -396,7 +404,7 @@ class XmlDocument(core.Object):
|
||||
def __repr__(self):
|
||||
return "<%s.%s; proxy of C++ wxXmlDocument instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""__init__(String filename, String encoding=wxPyUTF8String) -> XmlDocument"""
|
||||
"""__init__(String filename, String encoding=UTF8String) -> XmlDocument"""
|
||||
newobj = _xrc.new_XmlDocument(*args, **kwargs)
|
||||
self.this = newobj.this
|
||||
self.thisown = 1
|
||||
@@ -408,11 +416,11 @@ class XmlDocument(core.Object):
|
||||
except: pass
|
||||
|
||||
def Load(*args, **kwargs):
|
||||
"""Load(String filename, String encoding=wxPyUTF8String) -> bool"""
|
||||
"""Load(String filename, String encoding=UTF8String) -> bool"""
|
||||
return _xrc.XmlDocument_Load(*args, **kwargs)
|
||||
|
||||
def LoadFromStream(*args, **kwargs):
|
||||
"""LoadFromStream(InputStream stream, String encoding=wxPyUTF8String) -> bool"""
|
||||
"""LoadFromStream(InputStream stream, String encoding=UTF8String) -> bool"""
|
||||
return _xrc.XmlDocument_LoadFromStream(*args, **kwargs)
|
||||
|
||||
def Save(*args, **kwargs):
|
||||
@@ -460,7 +468,7 @@ class XmlDocumentPtr(XmlDocument):
|
||||
_xrc.XmlDocument_swigregister(XmlDocumentPtr)
|
||||
|
||||
def XmlDocumentFromStream(*args, **kwargs):
|
||||
"""XmlDocumentFromStream(InputStream stream, String encoding=wxPyUTF8String) -> XmlDocument"""
|
||||
"""XmlDocumentFromStream(InputStream stream, String encoding=UTF8String) -> XmlDocument"""
|
||||
val = _xrc.new_XmlDocumentFromStream(*args, **kwargs)
|
||||
val.thisown = 1
|
||||
return val
|
||||
@@ -553,7 +561,7 @@ class XmlResourceHandler(core.Object):
|
||||
return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs)
|
||||
|
||||
def GetStyle(*args, **kwargs):
|
||||
"""GetStyle(String param=wxPyStyleString, int defaults=0) -> int"""
|
||||
"""GetStyle(String param=StyleString, int defaults=0) -> int"""
|
||||
return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs)
|
||||
|
||||
def GetText(*args, **kwargs):
|
||||
@@ -581,11 +589,11 @@ class XmlResourceHandler(core.Object):
|
||||
return _xrc.XmlResourceHandler_GetColour(*args, **kwargs)
|
||||
|
||||
def GetSize(*args, **kwargs):
|
||||
"""GetSize(String param=wxPySizeString) -> Size"""
|
||||
"""GetSize(String param=SizeString) -> Size"""
|
||||
return _xrc.XmlResourceHandler_GetSize(*args, **kwargs)
|
||||
|
||||
def GetPosition(*args, **kwargs):
|
||||
"""GetPosition(String param=wxPyPosString) -> Point"""
|
||||
"""GetPosition(String param=PosString) -> Point"""
|
||||
return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs)
|
||||
|
||||
def GetDimension(*args, **kwargs):
|
||||
@@ -594,20 +602,20 @@ class XmlResourceHandler(core.Object):
|
||||
|
||||
def GetBitmap(*args, **kwargs):
|
||||
"""
|
||||
GetBitmap(String param=wxPyBitmapString, wxArtClient defaultArtClient=wxART_OTHER,
|
||||
GetBitmap(String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER,
|
||||
Size size=DefaultSize) -> Bitmap
|
||||
"""
|
||||
return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs)
|
||||
|
||||
def GetIcon(*args, **kwargs):
|
||||
"""
|
||||
GetIcon(String param=wxPyIconString, wxArtClient defaultArtClient=wxART_OTHER,
|
||||
Size size=DefaultSize) -> wxIcon
|
||||
GetIcon(String param=IconString, wxArtClient defaultArtClient=wxART_OTHER,
|
||||
Size size=DefaultSize) -> Icon
|
||||
"""
|
||||
return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs)
|
||||
|
||||
def GetFont(*args, **kwargs):
|
||||
"""GetFont(String param=wxPyFontString) -> Font"""
|
||||
"""GetFont(String param=FontString) -> Font"""
|
||||
return _xrc.XmlResourceHandler_GetFont(*args, **kwargs)
|
||||
|
||||
def SetupWindow(*args, **kwargs):
|
||||
|
@@ -250,15 +250,15 @@ static swig_type_info *swig_types[23];
|
||||
#include <wx/xml/xml.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
static const wxString wxPyUTF8String(wxT("UTF-8"));
|
||||
static const wxString wxPyStyleString(wxT("style"));
|
||||
static const wxString wxPySizeString(wxT("size"));
|
||||
static const wxString wxPyPosString(wxT("pos"));
|
||||
static const wxString wxPyBitmapString(wxT("bitmap"));
|
||||
static const wxString wxPyIconString(wxT("icon"));
|
||||
static const wxString wxPyFontString(wxT("font"));
|
||||
|
||||
static const wxString wxPyEmptyString(wxEmptyString);
|
||||
static const wxString wxPyUTF8String(wxT("UTF-8"));
|
||||
static const wxString wxPyStyleString(wxT("style"));
|
||||
static const wxString wxPySizeString(wxT("size"));
|
||||
static const wxString wxPyPosString(wxT("pos"));
|
||||
static const wxString wxPyBitmapString(wxT("bitmap"));
|
||||
static const wxString wxPyIconString(wxT("icon"));
|
||||
static const wxString wxPyFontString(wxT("font"));
|
||||
bool wxXmlResource_LoadFromString(wxXmlResource *self,wxString const &data){
|
||||
static int s_memFileIdx = 0;
|
||||
|
||||
@@ -413,6 +413,146 @@ IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanH
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static int _wrap_UTF8String_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable UTF8String is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_UTF8String_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyUTF8String)->c_str(), (&wxPyUTF8String)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyUTF8String)->c_str(), (&wxPyUTF8String)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_StyleString_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable StyleString is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_StyleString_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyStyleString)->c_str(), (&wxPyStyleString)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyStyleString)->c_str(), (&wxPyStyleString)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_SizeString_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable SizeString is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_SizeString_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPySizeString)->c_str(), (&wxPySizeString)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPySizeString)->c_str(), (&wxPySizeString)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_PosString_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable PosString is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_PosString_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyPosString)->c_str(), (&wxPyPosString)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyPosString)->c_str(), (&wxPyPosString)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_BitmapString_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable BitmapString is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_BitmapString_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyBitmapString)->c_str(), (&wxPyBitmapString)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyBitmapString)->c_str(), (&wxPyBitmapString)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_IconString_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable IconString is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_IconString_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyIconString)->c_str(), (&wxPyIconString)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyIconString)->c_str(), (&wxPyIconString)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_FontString_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable FontString is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_FontString_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyFontString)->c_str(), (&wxPyFontString)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyFontString)->c_str(), (&wxPyFontString)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_new_XmlResource(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxString *arg1 = 0 ;
|
||||
@@ -5229,6 +5369,14 @@ SWIGEXPORT(void) SWIG_init(void) {
|
||||
}
|
||||
SWIG_InstallConstants(d,swig_const_table);
|
||||
|
||||
PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"UTF8String",_wrap_UTF8String_get, _wrap_UTF8String_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"StyleString",_wrap_StyleString_get, _wrap_StyleString_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"SizeString",_wrap_SizeString_get, _wrap_SizeString_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"PosString",_wrap_PosString_get, _wrap_PosString_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"BitmapString",_wrap_BitmapString_get, _wrap_BitmapString_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"IconString",_wrap_IconString_get, _wrap_IconString_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"FontString",_wrap_FontString_get, _wrap_FontString_set);
|
||||
|
||||
|
||||
wxXmlInitResourceModule();
|
||||
|
Reference in New Issue
Block a user