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:
@@ -29,11 +29,6 @@
|
||||
#include "treelistctrl.h"
|
||||
#include "wx/wxPython/pytree.h"
|
||||
|
||||
|
||||
static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow"));
|
||||
static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox"));
|
||||
static const wxString wxPyTreeListCtrlNameStr(wxT("treelistctrl"));
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -42,6 +37,14 @@
|
||||
%import controls.i
|
||||
%pythoncode { wx = core }
|
||||
|
||||
|
||||
MAKE_CONST_WXSTRING2(DynamicSashNameStr, "dynamicSashWindow");
|
||||
MAKE_CONST_WXSTRING2(EditableListBoxNameStr, "editableListBox");
|
||||
MAKE_CONST_WXSTRING2(TreeListCtrlNameStr, "treelistctrl");
|
||||
|
||||
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
|
||||
|
||||
|
||||
%include _gizmos_rename.i
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@@ -27,6 +27,10 @@ class DynamicSashSplitEventPtr(DynamicSashSplitEvent):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = DynamicSashSplitEvent
|
||||
_gizmos.DynamicSashSplitEvent_swigregister(DynamicSashSplitEventPtr)
|
||||
cvar = _gizmos.cvar
|
||||
DynamicSashNameStr = cvar.DynamicSashNameStr
|
||||
EditableListBoxNameStr = cvar.EditableListBoxNameStr
|
||||
TreeListCtrlNameStr = cvar.TreeListCtrlNameStr
|
||||
|
||||
class DynamicSashUnifyEvent(core.CommandEvent):
|
||||
def __repr__(self):
|
||||
@@ -52,7 +56,7 @@ class DynamicSashWindow(core.Window):
|
||||
"""
|
||||
__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
|
||||
long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER,
|
||||
String name=wxPyDynamicSashNameStr) -> DynamicSashWindow
|
||||
String name=DynamicSashNameStr) -> DynamicSashWindow
|
||||
"""
|
||||
newobj = _gizmos.new_DynamicSashWindow(*args, **kwargs)
|
||||
self.this = newobj.this
|
||||
@@ -64,7 +68,7 @@ class DynamicSashWindow(core.Window):
|
||||
"""
|
||||
Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
|
||||
long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER,
|
||||
String name=wxPyDynamicSashNameStr) -> bool
|
||||
String name=DynamicSashNameStr) -> bool
|
||||
"""
|
||||
return _gizmos.DynamicSashWindow_Create(*args, **kwargs)
|
||||
|
||||
@@ -103,7 +107,7 @@ class EditableListBox(windows.Panel):
|
||||
"""
|
||||
__init__(Window parent, int id, String label, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize, long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE,
|
||||
String name=wxPyEditableListBoxNameStr) -> EditableListBox
|
||||
String name=EditableListBoxNameStr) -> EditableListBox
|
||||
"""
|
||||
newobj = _gizmos.new_EditableListBox(*args, **kwargs)
|
||||
self.this = newobj.this
|
||||
@@ -411,7 +415,7 @@ class TreeListCtrl(core.Control):
|
||||
__init__(Window parent, int id=-1, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
|
||||
Validator validator=DefaultValidator,
|
||||
String name=wxPyTreeListCtrlNameStr) -> TreeListCtrl
|
||||
String name=TreeListCtrlNameStr) -> TreeListCtrl
|
||||
"""
|
||||
newobj = _gizmos.new_TreeListCtrl(*args, **kwargs)
|
||||
self.this = newobj.this
|
||||
@@ -424,7 +428,7 @@ class TreeListCtrl(core.Control):
|
||||
Create(Window parent, int id=-1, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
|
||||
Validator validator=DefaultValidator,
|
||||
String name=wxPyTreeListCtrlNameStr) -> bool
|
||||
String name=TreeListCtrlNameStr) -> bool
|
||||
"""
|
||||
return _gizmos.TreeListCtrl_Create(*args, **kwargs)
|
||||
|
||||
@@ -461,43 +465,43 @@ class TreeListCtrl(core.Control):
|
||||
return _gizmos.TreeListCtrl_SetLineSpacing(*args, **kwargs)
|
||||
|
||||
def GetImageList(*args, **kwargs):
|
||||
"""GetImageList() -> wxImageList"""
|
||||
"""GetImageList() -> ImageList"""
|
||||
return _gizmos.TreeListCtrl_GetImageList(*args, **kwargs)
|
||||
|
||||
def GetStateImageList(*args, **kwargs):
|
||||
"""GetStateImageList() -> wxImageList"""
|
||||
"""GetStateImageList() -> ImageList"""
|
||||
return _gizmos.TreeListCtrl_GetStateImageList(*args, **kwargs)
|
||||
|
||||
def GetButtonsImageList(*args, **kwargs):
|
||||
"""GetButtonsImageList() -> wxImageList"""
|
||||
"""GetButtonsImageList() -> ImageList"""
|
||||
return _gizmos.TreeListCtrl_GetButtonsImageList(*args, **kwargs)
|
||||
|
||||
def SetImageList(*args, **kwargs):
|
||||
"""SetImageList(wxImageList imageList)"""
|
||||
"""SetImageList(ImageList imageList)"""
|
||||
return _gizmos.TreeListCtrl_SetImageList(*args, **kwargs)
|
||||
|
||||
def SetStateImageList(*args, **kwargs):
|
||||
"""SetStateImageList(wxImageList imageList)"""
|
||||
"""SetStateImageList(ImageList imageList)"""
|
||||
return _gizmos.TreeListCtrl_SetStateImageList(*args, **kwargs)
|
||||
|
||||
def SetButtonsImageList(*args, **kwargs):
|
||||
"""SetButtonsImageList(wxImageList imageList)"""
|
||||
"""SetButtonsImageList(ImageList imageList)"""
|
||||
return _gizmos.TreeListCtrl_SetButtonsImageList(*args, **kwargs)
|
||||
|
||||
def AssignImageList(*args, **kwargs):
|
||||
"""AssignImageList(wxImageList imageList)"""
|
||||
"""AssignImageList(ImageList imageList)"""
|
||||
val = _gizmos.TreeListCtrl_AssignImageList(*args, **kwargs)
|
||||
args[1].thisown = 0
|
||||
return val
|
||||
|
||||
def AssignStateImageList(*args, **kwargs):
|
||||
"""AssignStateImageList(wxImageList imageList)"""
|
||||
"""AssignStateImageList(ImageList imageList)"""
|
||||
val = _gizmos.TreeListCtrl_AssignStateImageList(*args, **kwargs)
|
||||
args[1].thisown = 0
|
||||
return val
|
||||
|
||||
def AssignButtonsImageList(*args, **kwargs):
|
||||
"""AssignButtonsImageList(wxImageList imageList)"""
|
||||
"""AssignButtonsImageList(ImageList imageList)"""
|
||||
val = _gizmos.TreeListCtrl_AssignButtonsImageList(*args, **kwargs)
|
||||
args[1].thisown = 0
|
||||
return val
|
||||
|
@@ -267,12 +267,11 @@ static swig_type_info *swig_types[32];
|
||||
#include "treelistctrl.h"
|
||||
#include "wx/wxPython/pytree.h"
|
||||
|
||||
|
||||
static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow"));
|
||||
static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox"));
|
||||
static const wxString wxPyTreeListCtrlNameStr(wxT("treelistctrl"));
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
|
||||
static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow"));
|
||||
static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox"));
|
||||
static const wxString wxPyTreeListCtrlNameStr(wxT("treelistctrl"));
|
||||
static const wxString wxPyEmptyString(wxEmptyString);
|
||||
PyObject *wxEditableListBox_GetStrings(wxEditableListBox *self){
|
||||
wxArrayString strings;
|
||||
self->GetStrings(strings);
|
||||
@@ -471,6 +470,66 @@ PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId c
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static int _wrap_DynamicSashNameStr_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable DynamicSashNameStr is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_DynamicSashNameStr_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyDynamicSashNameStr)->c_str(), (&wxPyDynamicSashNameStr)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyDynamicSashNameStr)->c_str(), (&wxPyDynamicSashNameStr)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_EditableListBoxNameStr_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable EditableListBoxNameStr is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_EditableListBoxNameStr_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyEditableListBoxNameStr)->c_str(), (&wxPyEditableListBoxNameStr)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyEditableListBoxNameStr)->c_str(), (&wxPyEditableListBoxNameStr)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static int _wrap_TreeListCtrlNameStr_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable TreeListCtrlNameStr is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_TreeListCtrlNameStr_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyTreeListCtrlNameStr)->c_str(), (&wxPyTreeListCtrlNameStr)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyTreeListCtrlNameStr)->c_str(), (&wxPyTreeListCtrlNameStr)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_new_DynamicSashSplitEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxObject *arg1 = (wxObject *) 0 ;
|
||||
@@ -7300,6 +7359,10 @@ SWIGEXPORT(void) SWIG_init(void) {
|
||||
}
|
||||
SWIG_InstallConstants(d,swig_const_table);
|
||||
|
||||
PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"DynamicSashNameStr",_wrap_DynamicSashNameStr_get, _wrap_DynamicSashNameStr_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"EditableListBoxNameStr",_wrap_EditableListBoxNameStr_get, _wrap_EditableListBoxNameStr_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"TreeListCtrlNameStr",_wrap_TreeListCtrlNameStr_get, _wrap_TreeListCtrlNameStr_set);
|
||||
|
||||
|
||||
wxPyPtrTypeMap_Add("wxTreeCompanionWindow", "wxPyTreeCompanionWindow");
|
||||
|
@@ -19,8 +19,6 @@
|
||||
|
||||
#include <wx/glcanvas.h>
|
||||
|
||||
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -28,6 +26,11 @@
|
||||
%import core.i
|
||||
%pythoncode { wx = core }
|
||||
|
||||
|
||||
MAKE_CONST_WXSTRING2(GLCanvasNameStr, "GLCanvas");
|
||||
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
|
||||
|
||||
|
||||
%include _glcanvas_rename.i
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@@ -62,6 +62,8 @@ class GLContextPtr(GLContext):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = GLContext
|
||||
_glcanvas.GLContext_swigregister(GLContextPtr)
|
||||
cvar = _glcanvas.cvar
|
||||
GLCanvasNameStr = cvar.GLCanvasNameStr
|
||||
|
||||
WX_GL_RGBA = _glcanvas.WX_GL_RGBA
|
||||
WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
|
||||
@@ -85,9 +87,8 @@ class GLCanvas(core.Window):
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
__init__(Window parent, int id=-1, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize, long style=0, String name=wxPyGLCanvasNameStr,
|
||||
int attribList=None,
|
||||
wxPalette palette=wxNullPalette) -> GLCanvas
|
||||
Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
|
||||
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
|
||||
"""
|
||||
newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
|
||||
self.this = newobj.this
|
||||
@@ -123,7 +124,7 @@ def wxGLCanvasWithContext(*args, **kwargs):
|
||||
"""
|
||||
wxGLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize,
|
||||
long style=0, String name=wxPyGLCanvasNameStr,
|
||||
long style=0, String name=GLCanvasNameStr,
|
||||
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
|
||||
"""
|
||||
val = _glcanvas.new_wxGLCanvasWithContext(*args, **kwargs)
|
||||
|
@@ -234,12 +234,32 @@ static swig_type_info *swig_types[9];
|
||||
|
||||
#include <wx/glcanvas.h>
|
||||
|
||||
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
|
||||
static const wxString wxPyGLCanvasNameStr(wxT("GLCanvas"));
|
||||
static const wxString wxPyEmptyString(wxEmptyString);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static int _wrap_GLCanvasNameStr_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable GLCanvasNameStr is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_GLCanvasNameStr_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyGLCanvasNameStr)->c_str(), (&wxPyGLCanvasNameStr)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyGLCanvasNameStr)->c_str(), (&wxPyGLCanvasNameStr)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_new_GLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
bool arg1 ;
|
||||
@@ -1214,6 +1234,8 @@ SWIGEXPORT(void) SWIG_init(void) {
|
||||
}
|
||||
SWIG_InstallConstants(d,swig_const_table);
|
||||
|
||||
PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"GLCanvasNameStr",_wrap_GLCanvasNameStr_get, _wrap_GLCanvasNameStr_set);
|
||||
|
||||
|
||||
|
||||
|
@@ -266,8 +266,7 @@ static swig_type_info *swig_types[41];
|
||||
#include "oglhelpers.h"
|
||||
|
||||
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
|
||||
static const wxString wxPyEmptyString(wxEmptyString);
|
||||
|
||||
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
|
@@ -18,16 +18,16 @@
|
||||
#include "wx/wxPython/pyclasses.h"
|
||||
#include "oglhelpers.h"
|
||||
|
||||
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%import windows.i
|
||||
|
||||
%pythoncode { wx = core }
|
||||
|
||||
|
||||
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
|
||||
|
||||
%include _ogl_rename.i
|
||||
|
||||
%include _ogldefs.i
|
||||
|
@@ -18,7 +18,6 @@
|
||||
#include "wx/wxPython/pyclasses.h"
|
||||
#include <wx/stc/stc.h>
|
||||
|
||||
DECLARE_DEF_STRING(STCNameStr);
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -26,6 +25,9 @@
|
||||
%import core.i
|
||||
%pythoncode { wx = core }
|
||||
|
||||
MAKE_CONST_WXSTRING(STCNameStr);
|
||||
|
||||
|
||||
%include _stc_rename.i
|
||||
|
||||
|
||||
|
@@ -783,7 +783,7 @@ class StyledTextCtrl(core.Control):
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
|
||||
long style=0, String name=wxPySTCNameStr) -> StyledTextCtrl
|
||||
long style=0, String name=STCNameStr) -> StyledTextCtrl
|
||||
"""
|
||||
newobj = _stc.new_StyledTextCtrl(*args, **kwargs)
|
||||
self.this = newobj.this
|
||||
@@ -2162,6 +2162,8 @@ class StyledTextCtrlPtr(StyledTextCtrl):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = StyledTextCtrl
|
||||
_stc.StyledTextCtrl_swigregister(StyledTextCtrlPtr)
|
||||
cvar = _stc.cvar
|
||||
STCNameStr = cvar.STCNameStr
|
||||
|
||||
def PreStyledTextCtrl(*args, **kwargs):
|
||||
"""PreStyledTextCtrl() -> StyledTextCtrl"""
|
||||
|
@@ -245,8 +245,8 @@ static swig_type_info *swig_types[21];
|
||||
#include "wx/wxPython/pyclasses.h"
|
||||
#include <wx/stc/stc.h>
|
||||
|
||||
DECLARE_DEF_STRING(STCNameStr);
|
||||
|
||||
static const wxString wxPySTCNameStr(wxSTCNameStr);
|
||||
|
||||
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
@@ -277,6 +277,26 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static int _wrap_STCNameStr_set(PyObject *_val) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable STCNameStr is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_STCNameStr_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPySTCNameStr)->c_str(), (&wxPySTCNameStr)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPySTCNameStr)->c_str(), (&wxPySTCNameStr)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_new_StyledTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxWindow *arg1 = (wxWindow *) 0 ;
|
||||
@@ -12712,6 +12732,8 @@ SWIGEXPORT(void) SWIG_init(void) {
|
||||
}
|
||||
SWIG_InstallConstants(d,swig_const_table);
|
||||
|
||||
PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"STCNameStr",_wrap_STCNameStr_get, _wrap_STCNameStr_set);
|
||||
|
||||
|
||||
}
|
||||
|
@@ -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