Minimal changes needed to build/run wxPython on the 2.5 branch after
the merge. Still need to look for and apply most changes and new additions that have happened since the last merge. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -196,9 +196,7 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
}
|
||||
|
||||
// See below in the init function...
|
||||
wxClipboard* wxPyTheClipboard;
|
||||
extern wxClipboard * wxTheClipboard;
|
||||
|
||||
class wxPyDropSource : public wxDropSource {
|
||||
public:
|
||||
@@ -364,17 +362,17 @@ static PyObject *_wrap_wxPyFormatInvalid_get() {
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
static int _wrap_wxPyTheClipboard_set(PyObject *val) {
|
||||
static int _wrap_wxTheClipboard_set(PyObject *val) {
|
||||
|
||||
PyErr_SetString(PyExc_TypeError,"Variable wxTheClipboard is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxPyTheClipboard_get() {
|
||||
static PyObject *_wrap_wxTheClipboard_get() {
|
||||
PyObject * pyobj;
|
||||
char ptemp[128];
|
||||
|
||||
SWIG_MakePtr(ptemp, (char *) wxPyTheClipboard,"_wxClipboard_p");
|
||||
SWIG_MakePtr(ptemp, (char *) wxTheClipboard,"_wxClipboard_p");
|
||||
pyobj = PyString_FromString(ptemp);
|
||||
return pyobj;
|
||||
}
|
||||
@@ -3679,7 +3677,7 @@ SWIGEXPORT(void) initclip_dndc() {
|
||||
PyDict_SetItemString(d,"wxDF_MAX", PyInt_FromLong((long) wxDF_MAX));
|
||||
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,"wxFormatInvalid",_wrap_wxPyFormatInvalid_get, _wrap_wxPyFormatInvalid_set);
|
||||
SWIG_addvarlink(SWIG_globals,"wxTheClipboard",_wrap_wxPyTheClipboard_get, _wrap_wxPyTheClipboard_set);
|
||||
SWIG_addvarlink(SWIG_globals,"wxTheClipboard",_wrap_wxTheClipboard_get, _wrap_wxTheClipboard_set);
|
||||
PyDict_SetItemString(d,"wxDrag_CopyOnly", PyInt_FromLong((long) wxDrag_CopyOnly));
|
||||
PyDict_SetItemString(d,"wxDrag_AllowMove", PyInt_FromLong((long) wxDrag_AllowMove));
|
||||
PyDict_SetItemString(d,"wxDrag_DefaultMove", PyInt_FromLong((long) wxDrag_DefaultMove));
|
||||
@@ -3691,7 +3689,6 @@ SWIGEXPORT(void) initclip_dndc() {
|
||||
PyDict_SetItemString(d,"wxDragCancel", PyInt_FromLong((long) wxDragCancel));
|
||||
|
||||
|
||||
wxPyTheClipboard = wxTheClipboard;
|
||||
wxPyPtrTypeMap_Add("wxDropSource", "wxPyDropSource");
|
||||
wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget");
|
||||
wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget");
|
||||
|
@@ -128,6 +128,11 @@ IMP_PYCALLBACK_FSF_FSSTRING_pure(wxPyFileSystemHandler, wxFileSystemHandler, Ope
|
||||
IMP_PYCALLBACK_STRING_STRINGINT_pure(wxPyFileSystemHandler, wxFileSystemHandler, FindFirst);
|
||||
IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext);
|
||||
|
||||
wxString wxFileSystem_URLToFileName(const wxString& url) {
|
||||
wxFileName fname = wxFileSystem::URLToFileName(url);
|
||||
return fname.GetFullPath();
|
||||
}
|
||||
|
||||
void __wxMemoryFSHandler_AddFile_wxImage(const wxString& filename,
|
||||
wxImage& image,
|
||||
long type) {
|
||||
@@ -151,6 +156,44 @@ void __wxMemoryFSHandler_AddFile_Data(const wxString& filename,
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static PyObject *_wrap_wxFileSystem_URLToFileName(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxString * _arg0;
|
||||
PyObject * _obj0 = 0;
|
||||
char *_kwnames[] = { "url", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_URLToFileName",_kwnames,&_obj0))
|
||||
return NULL;
|
||||
{
|
||||
_arg0 = wxString_in_helper(_obj0);
|
||||
if (_arg0 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxString (wxFileSystem_URLToFileName(*_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
}
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _arg0;
|
||||
@@ -1311,6 +1354,44 @@ static PyObject *_wrap_wxFileSystem_CleanUpHandlers(PyObject *self, PyObject *ar
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxFileSystem_FileNameToURL(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxString * _arg0;
|
||||
PyObject * _obj0 = 0;
|
||||
char *_kwnames[] = { "filename", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileSystem_FileNameToURL",_kwnames,&_obj0))
|
||||
return NULL;
|
||||
{
|
||||
_arg0 = wxString_in_helper(_obj0);
|
||||
if (_arg0 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxString (wxFileSystem::FileNameToURL(*_arg0));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
}
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) {
|
||||
wxInternetFSHandler *src;
|
||||
wxFileSystemHandler *dest;
|
||||
@@ -1911,6 +1992,7 @@ static PyMethodDef filesyscMethods[] = {
|
||||
{ "wxInternetFSHandler_OpenFile", (PyCFunction) _wrap_wxInternetFSHandler_OpenFile, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInternetFSHandler_CanOpen", (PyCFunction) _wrap_wxInternetFSHandler_CanOpen, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxInternetFSHandler", (PyCFunction) _wrap_new_wxInternetFSHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileSystem_FileNameToURL", (PyCFunction) _wrap_wxFileSystem_FileNameToURL, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileSystem_CleanUpHandlers", (PyCFunction) _wrap_wxFileSystem_CleanUpHandlers, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileSystem_AddHandler", (PyCFunction) _wrap_wxFileSystem_AddHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileSystem_FindNext", (PyCFunction) _wrap_wxFileSystem_FindNext, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -1939,6 +2021,7 @@ static PyMethodDef filesyscMethods[] = {
|
||||
{ "__wxMemoryFSHandler_AddFile_Data", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_Data, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "__wxMemoryFSHandler_AddFile_wxBitmap", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "__wxMemoryFSHandler_AddFile_wxImage", (PyCFunction) _wrap___wxMemoryFSHandler_AddFile_wxImage, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileSystem_URLToFileName", (PyCFunction) _wrap_wxFileSystem_URLToFileName, METH_VARARGS | METH_KEYWORDS },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
#ifdef __cplusplus
|
||||
|
@@ -218,6 +218,8 @@ class wxMemoryFSHandler(wxMemoryFSHandlerPtr):
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
wxFileSystem_URLToFileName = filesysc.wxFileSystem_URLToFileName
|
||||
|
||||
__wxMemoryFSHandler_AddFile_wxImage = filesysc.__wxMemoryFSHandler_AddFile_wxImage
|
||||
|
||||
__wxMemoryFSHandler_AddFile_wxBitmap = filesysc.__wxMemoryFSHandler_AddFile_wxBitmap
|
||||
@@ -228,6 +230,8 @@ wxFileSystem_AddHandler = filesysc.wxFileSystem_AddHandler
|
||||
|
||||
wxFileSystem_CleanUpHandlers = filesysc.wxFileSystem_CleanUpHandlers
|
||||
|
||||
wxFileSystem_FileNameToURL = filesysc.wxFileSystem_FileNameToURL
|
||||
|
||||
wxMemoryFSHandler_RemoveFile = filesysc.wxMemoryFSHandler_RemoveFile
|
||||
|
||||
|
||||
|
@@ -3275,6 +3275,52 @@ static PyObject *_wrap_wxColourDatabase_FindColour(PyObject *self, PyObject *arg
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxColourDatabase_FindColourNoAdd(_swigobj,_swigarg0) (_swigobj->FindColourNoAdd(_swigarg0))
|
||||
static PyObject *_wrap_wxColourDatabase_FindColourNoAdd(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxColour * _result;
|
||||
wxColourDatabase * _arg0;
|
||||
wxString * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","colour", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColourDatabase_FindColourNoAdd",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColourDatabase_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDatabase_FindColourNoAdd. Expected _wxColourDatabase_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (wxColour *)wxColourDatabase_FindColourNoAdd(_arg0,*_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxColourDatabase_FindName(_swigobj,_swigarg0) (_swigobj->FindName(_swigarg0))
|
||||
static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -3320,27 +3366,60 @@ static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args,
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void wxColourDatabase_AddColour(wxColourDatabase *self,const wxString & name,wxColour * colour) {
|
||||
// make a copy since the python one will be GC'd
|
||||
wxColour* c = new wxColour(*colour);
|
||||
self->AddColour(name, c);
|
||||
}
|
||||
static PyObject *_wrap_wxColourDatabase_AddColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxColourDatabase * _arg0;
|
||||
wxString * _arg1;
|
||||
wxColour * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
wxColour temp;
|
||||
PyObject * _obj2 = 0;
|
||||
char *_kwnames[] = { "self","name","colour", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxColourDatabase_AddColour",_kwnames,&_argo0,&_obj1,&_obj2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxColourDatabase_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxColourDatabase_AddColour. Expected _wxColourDatabase_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
_arg2 = &temp;
|
||||
if (! wxColour_helper(_obj2, &_arg2))
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxColourDatabase_AddColour(_arg0,*_arg1,_arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void wxColourDatabase_Append(wxColourDatabase *self,const wxString & name,int red,int green,int blue) {
|
||||
// first see if the name is already there
|
||||
wxString cName = name;
|
||||
cName.MakeUpper();
|
||||
wxString cName2 = cName;
|
||||
if ( !cName2.Replace(wxT("GRAY"), wxT("GREY")) )
|
||||
cName2.clear();
|
||||
|
||||
wxNode *node = self->GetFirst();
|
||||
while ( node ) {
|
||||
const wxChar *key = node->GetKeyString();
|
||||
if ( cName == key || cName2 == key ) {
|
||||
wxColour* c = (wxColour *)node->GetData();
|
||||
c->Set(red, green, blue);
|
||||
return;
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
// otherwise append the new colour
|
||||
self->Append(name.c_str(), new wxColour(red, green, blue));
|
||||
wxColour* c = new wxColour(red, green, blue);
|
||||
self->AddColour(name, c);
|
||||
}
|
||||
static PyObject *_wrap_wxColourDatabase_Append(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -10874,7 +10953,9 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "delete_wxPen", (PyCFunction) _wrap_delete_wxPen, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxPen", (PyCFunction) _wrap_new_wxPen, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColourDatabase_Append", (PyCFunction) _wrap_wxColourDatabase_Append, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColourDatabase_AddColour", (PyCFunction) _wrap_wxColourDatabase_AddColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColourDatabase_FindName", (PyCFunction) _wrap_wxColourDatabase_FindName, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColourDatabase_FindColourNoAdd", (PyCFunction) _wrap_wxColourDatabase_FindColourNoAdd, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColourDatabase_FindColour", (PyCFunction) _wrap_wxColourDatabase_FindColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColour___ne__", (PyCFunction) _wrap_wxColour___ne__, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxColour___eq__", (PyCFunction) _wrap_wxColour___eq__, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -294,9 +294,16 @@ class wxColourDatabasePtr(wxObjectPtr):
|
||||
val = gdic.wxColourDatabase_FindColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def FindColourNoAdd(self, *_args, **_kwargs):
|
||||
val = gdic.wxColourDatabase_FindColourNoAdd(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def FindName(self, *_args, **_kwargs):
|
||||
val = gdic.wxColourDatabase_FindName(self, *_args, **_kwargs)
|
||||
return val
|
||||
def AddColour(self, *_args, **_kwargs):
|
||||
val = gdic.wxColourDatabase_AddColour(self, *_args, **_kwargs)
|
||||
return val
|
||||
def Append(self, *_args, **_kwargs):
|
||||
val = gdic.wxColourDatabase_Append(self, *_args, **_kwargs)
|
||||
return val
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -324,6 +324,188 @@ class wxHtmlWinTagHandler(wxHtmlWinTagHandlerPtr):
|
||||
|
||||
|
||||
|
||||
class wxHtmlSelectionPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self, delfunc=htmlc.delete_wxHtmlSelection):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def Set(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_Set(self, *_args, **_kwargs)
|
||||
return val
|
||||
def SetCells(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_SetCells(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetFromCell(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_GetFromCell(self, *_args, **_kwargs)
|
||||
if val: val = wxHtmlCellPtr(val)
|
||||
return val
|
||||
def GetToCell(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_GetToCell(self, *_args, **_kwargs)
|
||||
if val: val = wxHtmlCellPtr(val)
|
||||
return val
|
||||
def GetFromPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_GetFromPos(self, *_args, **_kwargs)
|
||||
if val: val = wxPointPtr(val)
|
||||
return val
|
||||
def GetToPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_GetToPos(self, *_args, **_kwargs)
|
||||
if val: val = wxPointPtr(val)
|
||||
return val
|
||||
def GetFromPrivPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_GetFromPrivPos(self, *_args, **_kwargs)
|
||||
if val: val = wxPointPtr(val)
|
||||
return val
|
||||
def GetToPrivPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_GetToPrivPos(self, *_args, **_kwargs)
|
||||
if val: val = wxPointPtr(val)
|
||||
return val
|
||||
def SetFromPrivPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_SetFromPrivPos(self, *_args, **_kwargs)
|
||||
return val
|
||||
def SetToPrivPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_SetToPrivPos(self, *_args, **_kwargs)
|
||||
return val
|
||||
def ClearPrivPos(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_ClearPrivPos(self, *_args, **_kwargs)
|
||||
return val
|
||||
def IsEmpty(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlSelection_IsEmpty(self, *_args, **_kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxHtmlSelection instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
class wxHtmlSelection(wxHtmlSelectionPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = htmlc.new_wxHtmlSelection(*_args,**_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxHtmlRenderingStatePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self, delfunc=htmlc.delete_wxHtmlRenderingState):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetSelectionState(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingState_SetSelectionState(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetSelectionState(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingState_GetSelectionState(self, *_args, **_kwargs)
|
||||
return val
|
||||
def SetFgColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingState_SetFgColour(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetFgColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingState_GetFgColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def SetBgColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingState_SetBgColour(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetBgColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingState_GetBgColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxHtmlRenderingState instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
class wxHtmlRenderingState(wxHtmlRenderingStatePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = htmlc.new_wxHtmlRenderingState(*_args,**_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxHtmlRenderingStylePtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def GetSelectedTextColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingStyle_GetSelectedTextColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetSelectedTextBgColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingStyle_GetSelectedTextBgColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxHtmlRenderingStyle instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
class wxHtmlRenderingStyle(wxHtmlRenderingStylePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
|
||||
|
||||
|
||||
|
||||
class wxDefaultHtmlRenderingStylePtr(wxHtmlRenderingStylePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def GetSelectedTextColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxDefaultHtmlRenderingStyle_GetSelectedTextColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetSelectedTextBgColour(self, *_args, **_kwargs):
|
||||
val = htmlc.wxDefaultHtmlRenderingStyle_GetSelectedTextBgColour(self, *_args, **_kwargs)
|
||||
if val: val = wxColourPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxDefaultHtmlRenderingStyle instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
class wxDefaultHtmlRenderingStyle(wxDefaultHtmlRenderingStylePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
|
||||
|
||||
|
||||
|
||||
class wxHtmlRenderingInfoPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self, delfunc=htmlc.delete_wxHtmlRenderingInfo):
|
||||
if self.thisown == 1:
|
||||
try:
|
||||
delfunc(self)
|
||||
except:
|
||||
pass
|
||||
def SetSelection(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingInfo_SetSelection(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetSelection(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingInfo_GetSelection(self, *_args, **_kwargs)
|
||||
if val: val = wxHtmlSelectionPtr(val)
|
||||
return val
|
||||
def SetStyle(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingInfo_SetStyle(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetStyle(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingInfo_GetStyle(self, *_args, **_kwargs)
|
||||
if val: val = wxHtmlRenderingStylePtr(val)
|
||||
return val
|
||||
def GetState(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlRenderingInfo_GetState(self, *_args, **_kwargs)
|
||||
if val: val = wxHtmlRenderingStatePtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxHtmlRenderingInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
class wxHtmlRenderingInfo(wxHtmlRenderingInfoPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = htmlc.new_wxHtmlRenderingInfo(*_args,**_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxHtmlCellPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -460,12 +642,13 @@ class wxHtmlContainerCellPtr(wxHtmlCellPtr):
|
||||
def SetBorder(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlContainerCell_SetBorder(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetFirstCell(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlContainerCell_GetFirstCell(self, *_args, **_kwargs)
|
||||
def GetFirstChild(self, *_args, **_kwargs):
|
||||
val = htmlc.wxHtmlContainerCell_GetFirstChild(self, *_args, **_kwargs)
|
||||
if val: val = wxHtmlCellPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxHtmlContainerCell instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
GetFirstCell = GetFirstChild
|
||||
class wxHtmlContainerCell(wxHtmlContainerCellPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = htmlc.new_wxHtmlContainerCell(*_args,**_kwargs)
|
||||
@@ -812,6 +995,9 @@ wxHTML_REDIRECT = htmlc.wxHTML_REDIRECT
|
||||
wxHTML_URL_PAGE = htmlc.wxHTML_URL_PAGE
|
||||
wxHTML_URL_IMAGE = htmlc.wxHTML_URL_IMAGE
|
||||
wxHTML_URL_OTHER = htmlc.wxHTML_URL_OTHER
|
||||
wxHTML_SEL_OUT = htmlc.wxHTML_SEL_OUT
|
||||
wxHTML_SEL_IN = htmlc.wxHTML_SEL_IN
|
||||
wxHTML_SEL_CHANGING = htmlc.wxHTML_SEL_CHANGING
|
||||
wxPAGE_ODD = htmlc.wxPAGE_ODD
|
||||
wxPAGE_EVEN = htmlc.wxPAGE_EVEN
|
||||
wxPAGE_ALL = htmlc.wxPAGE_ALL
|
||||
|
@@ -55,7 +55,6 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
#define SWIG_name "miscc"
|
||||
|
||||
#include "helpers.h"
|
||||
#include <wx/resource.h>
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/busyinfo.h>
|
||||
#include <wx/geometry.h>
|
||||
|
@@ -56,7 +56,6 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#include "helpers.h"
|
||||
#include "pyistream.h"
|
||||
#include <wx/resource.h>
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/caret.h>
|
||||
#include <wx/tipdlg.h>
|
||||
@@ -73,7 +72,6 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
#include <wx/mimetype.h>
|
||||
#include <wx/snglinst.h>
|
||||
#include <wx/effects.h>
|
||||
//#include <wx/spawnbrowser.h>
|
||||
|
||||
|
||||
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
@@ -8593,9 +8591,9 @@ static PyObject *_wrap_wxFileType_GetExtensions(PyObject *self, PyObject *args,
|
||||
}
|
||||
|
||||
static wxIcon * wxFileType_GetIcon(wxFileType *self) {
|
||||
wxIcon icon;
|
||||
if (self->GetIcon(&icon))
|
||||
return new wxIcon(icon);
|
||||
wxIconLocation loc;
|
||||
if (self->GetIcon(&loc))
|
||||
return new wxIcon(loc);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -8634,14 +8632,18 @@ static PyObject *_wrap_wxFileType_GetIcon(PyObject *self, PyObject *args, PyObje
|
||||
}
|
||||
|
||||
static PyObject * wxFileType_GetIconInfo(wxFileType *self) {
|
||||
wxIcon icon;
|
||||
wxString iconFile;
|
||||
int iconIndex;
|
||||
if (self->GetIcon(&icon, &iconFile, &iconIndex)) {
|
||||
wxIconLocation loc;
|
||||
if (self->GetIcon(&loc)) {
|
||||
wxString iconFile = loc.GetFileName();
|
||||
int iconIndex = -1;
|
||||
#ifdef __WXMSW__
|
||||
iconIndex = loc.GetIndex();
|
||||
#endif
|
||||
// Make a tuple and put the values in it
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tuple = PyTuple_New(3);
|
||||
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon),
|
||||
wxT("wxIcon"), TRUE));
|
||||
PyTuple_SetItem(tuple, 0,
|
||||
wxPyConstructObject(new wxIcon(loc), wxT("wxIcon"), TRUE));
|
||||
#if wxUSE_UNICODE
|
||||
PyTuple_SetItem(tuple, 1, PyUnicode_FromWideChar(iconFile.c_str(), iconFile.Len()));
|
||||
#else
|
||||
@@ -10282,34 +10284,6 @@ static PyObject *_wrap_wxFileHistory_GetCount(PyObject *self, PyObject *args, Py
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxFileHistory_GetNoHistoryFiles(_swigobj) (_swigobj->GetNoHistoryFiles())
|
||||
static PyObject *_wrap_wxFileHistory_GetNoHistoryFiles(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
int _result;
|
||||
wxFileHistory * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileHistory_GetNoHistoryFiles",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileHistory_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileHistory_GetNoHistoryFiles. Expected _wxFileHistory_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (int )wxFileHistory_GetNoHistoryFiles(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxEffectsTowxObject(void *ptr) {
|
||||
wxEffects *src;
|
||||
wxObject *dest;
|
||||
@@ -11041,7 +11015,6 @@ static PyMethodDef misc2cMethods[] = {
|
||||
{ "wxEffects_GetLightShadow", (PyCFunction) _wrap_wxEffects_GetLightShadow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxEffects_GetHighlightColour", (PyCFunction) _wrap_wxEffects_GetHighlightColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxEffects", (PyCFunction) _wrap_new_wxEffects, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileHistory_GetNoHistoryFiles", (PyCFunction) _wrap_wxFileHistory_GetNoHistoryFiles, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileHistory_GetCount", (PyCFunction) _wrap_wxFileHistory_GetCount, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileHistory_GetHistoryFile", (PyCFunction) _wrap_wxFileHistory_GetHistoryFile, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileHistory_AddFilesToThisMenu", (PyCFunction) _wrap_wxFileHistory_AddFilesToThisMenu, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -1060,11 +1060,9 @@ class wxFileHistoryPtr(wxObjectPtr):
|
||||
def GetCount(self, *_args, **_kwargs):
|
||||
val = misc2c.wxFileHistory_GetCount(self, *_args, **_kwargs)
|
||||
return val
|
||||
def GetNoHistoryFiles(self, *_args, **_kwargs):
|
||||
val = misc2c.wxFileHistory_GetNoHistoryFiles(self, *_args, **_kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<%s.%s instance; proxy of C++ wxFileHistory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
|
||||
GetNoHistoryFiles = GetCount
|
||||
class wxFileHistory(wxFileHistoryPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = misc2c.new_wxFileHistory(*_args,**_kwargs)
|
||||
|
Reference in New Issue
Block a user