Fixed name clash in wxIEHtmlWin, other minor tweaks.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,6 +42,14 @@ to wxGrid.
|
|||||||
|
|
||||||
Added Python == and != operators for some basic classes
|
Added Python == and != operators for some basic classes
|
||||||
|
|
||||||
|
Fixed the Python wrappers for wxInputStream so they no longer block
|
||||||
|
when reading from a wxProcess on wxGTK. They now work more or less as
|
||||||
|
they did before 2.3.3.1 but the dual meaning of eof() has been
|
||||||
|
removed. There is now a CanRead() method that lets you know if there
|
||||||
|
is data waiting to be read from the pipe.
|
||||||
|
|
||||||
|
Fixed method name clash in wxIEHtmlWin, renamed Refresh to RefreshPage.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -752,8 +752,8 @@ static PyObject *_wrap_wxIEHtmlWin_GoSearch(PyObject *self, PyObject *args, PyOb
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxIEHtmlWin_Refresh(_swigobj,_swigarg0) (_swigobj->Refresh(_swigarg0))
|
#define wxIEHtmlWin_RefreshPage(_swigobj,_swigarg0) (_swigobj->Refresh(_swigarg0))
|
||||||
static PyObject *_wrap_wxIEHtmlWin_Refresh(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxIEHtmlWin_RefreshPage(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _result;
|
bool _result;
|
||||||
wxIEHtmlWin * _arg0;
|
wxIEHtmlWin * _arg0;
|
||||||
@@ -762,18 +762,18 @@ static PyObject *_wrap_wxIEHtmlWin_Refresh(PyObject *self, PyObject *args, PyObj
|
|||||||
char *_kwnames[] = { "self","level", NULL };
|
char *_kwnames[] = { "self","level", NULL };
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIEHtmlWin_Refresh",_kwnames,&_argo0,&_arg1))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxIEHtmlWin_RefreshPage",_kwnames,&_argo0,&_arg1))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (_argo0) {
|
if (_argo0) {
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIEHtmlWin_p")) {
|
||||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_Refresh. Expected _wxIEHtmlWin_p.");
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIEHtmlWin_RefreshPage. Expected _wxIEHtmlWin_p.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
_result = (bool )wxIEHtmlWin_Refresh(_arg0,_arg1);
|
_result = (bool )wxIEHtmlWin_RefreshPage(_arg0,_arg1);
|
||||||
|
|
||||||
wxPyEndAllowThreads(__tstate);
|
wxPyEndAllowThreads(__tstate);
|
||||||
if (PyErr_Occurred()) return NULL;
|
if (PyErr_Occurred()) return NULL;
|
||||||
@@ -811,7 +811,7 @@ static PyObject *_wrap_wxIEHtmlWin_Stop(PyObject *self, PyObject *args, PyObject
|
|||||||
|
|
||||||
static PyMethodDef iewincMethods[] = {
|
static PyMethodDef iewincMethods[] = {
|
||||||
{ "wxIEHtmlWin_Stop", (PyCFunction) _wrap_wxIEHtmlWin_Stop, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_Stop", (PyCFunction) _wrap_wxIEHtmlWin_Stop, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_Refresh", (PyCFunction) _wrap_wxIEHtmlWin_Refresh, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_RefreshPage", (PyCFunction) _wrap_wxIEHtmlWin_RefreshPage, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_GoSearch", (PyCFunction) _wrap_wxIEHtmlWin_GoSearch, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_GoSearch", (PyCFunction) _wrap_wxIEHtmlWin_GoSearch, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_GoHome", (PyCFunction) _wrap_wxIEHtmlWin_GoHome, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_GoHome", (PyCFunction) _wrap_wxIEHtmlWin_GoHome, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxIEHtmlWin_GoForward", (PyCFunction) _wrap_wxIEHtmlWin_GoForward, METH_VARARGS | METH_KEYWORDS },
|
{ "wxIEHtmlWin_GoForward", (PyCFunction) _wrap_wxIEHtmlWin_GoForward, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -117,7 +117,7 @@ public:
|
|||||||
bool GoForward();
|
bool GoForward();
|
||||||
bool GoHome();
|
bool GoHome();
|
||||||
bool GoSearch();
|
bool GoSearch();
|
||||||
bool Refresh(wxIEHtmlRefreshLevel level);
|
%name(RefreshPage)bool Refresh(wxIEHtmlRefreshLevel level);
|
||||||
bool Stop();
|
bool Stop();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@@ -125,8 +125,8 @@ class wxIEHtmlWinPtr(wxWindowPtr):
|
|||||||
def GoSearch(self, *_args, **_kwargs):
|
def GoSearch(self, *_args, **_kwargs):
|
||||||
val = apply(iewinc.wxIEHtmlWin_GoSearch,(self,) + _args, _kwargs)
|
val = apply(iewinc.wxIEHtmlWin_GoSearch,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def Refresh(self, *_args, **_kwargs):
|
def RefreshPage(self, *_args, **_kwargs):
|
||||||
val = apply(iewinc.wxIEHtmlWin_Refresh,(self,) + _args, _kwargs)
|
val = apply(iewinc.wxIEHtmlWin_RefreshPage,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def Stop(self, *_args, **_kwargs):
|
def Stop(self, *_args, **_kwargs):
|
||||||
val = apply(iewinc.wxIEHtmlWin_Stop,(self,) + _args, _kwargs)
|
val = apply(iewinc.wxIEHtmlWin_Stop,(self,) + _args, _kwargs)
|
||||||
|
@@ -1565,6 +1565,35 @@ static PyObject *_wrap_wxXmlResource_GetFlags(PyObject *self, PyObject *args, Py
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxXmlResource_SetFlags(_swigobj,_swigarg0) (_swigobj->SetFlags(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxXmlResource_SetFlags(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxXmlResource * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","flags", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxXmlResource_SetFlags",_kwnames,&_argo0,&_arg1))
|
||||||
|
return NULL;
|
||||||
|
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_SetFlags. Expected _wxXmlResource_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
wxXmlResource_SetFlags(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define new_wxXmlSubclassFactory() (new wxPyXmlSubclassFactory())
|
#define new_wxXmlSubclassFactory() (new wxPyXmlSubclassFactory())
|
||||||
static PyObject *_wrap_new_wxXmlSubclassFactory(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_new_wxXmlSubclassFactory(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -5097,6 +5126,7 @@ static PyMethodDef xrccMethods[] = {
|
|||||||
{ "new_wxXmlProperty", (PyCFunction) _wrap_new_wxXmlProperty, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxXmlProperty", (PyCFunction) _wrap_new_wxXmlProperty, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlSubclassFactory__setCallbackInfo", (PyCFunction) _wrap_wxXmlSubclassFactory__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlSubclassFactory__setCallbackInfo", (PyCFunction) _wrap_wxXmlSubclassFactory__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxXmlSubclassFactory", (PyCFunction) _wrap_new_wxXmlSubclassFactory, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxXmlSubclassFactory", (PyCFunction) _wrap_new_wxXmlSubclassFactory, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxXmlResource_SetFlags", (PyCFunction) _wrap_wxXmlResource_SetFlags, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_GetFlags", (PyCFunction) _wrap_wxXmlResource_GetFlags, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_GetFlags", (PyCFunction) _wrap_wxXmlResource_GetFlags, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_Set", (PyCFunction) _wrap_wxXmlResource_Set, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
|
{ "wxXmlResource_Get", (PyCFunction) _wrap_wxXmlResource_Get, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -212,6 +212,9 @@ public:
|
|||||||
// Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
|
// Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING.
|
||||||
int GetFlags();
|
int GetFlags();
|
||||||
|
|
||||||
|
// Set flags after construction.
|
||||||
|
void SetFlags(int flags) { m_flags = flags; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -139,6 +139,9 @@ class wxXmlResourcePtr(wxObjectPtr):
|
|||||||
def GetFlags(self, *_args, **_kwargs):
|
def GetFlags(self, *_args, **_kwargs):
|
||||||
val = apply(xrcc.wxXmlResource_GetFlags,(self,) + _args, _kwargs)
|
val = apply(xrcc.wxXmlResource_GetFlags,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetFlags(self, *_args, **_kwargs):
|
||||||
|
val = apply(xrcc.wxXmlResource_SetFlags,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxXmlResource instance at %s>" % (self.this,)
|
return "<C wxXmlResource instance at %s>" % (self.this,)
|
||||||
class wxXmlResource(wxXmlResourcePtr):
|
class wxXmlResource(wxXmlResourcePtr):
|
||||||
|
@@ -3587,9 +3587,17 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw
|
|||||||
|
|
||||||
static PyObject * wxColour_Get(wxColour *self) {
|
static PyObject * wxColour_Get(wxColour *self) {
|
||||||
PyObject* rv = PyTuple_New(3);
|
PyObject* rv = PyTuple_New(3);
|
||||||
PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red()));
|
int red = -1;
|
||||||
PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green()));
|
int green = -1;
|
||||||
PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue()));
|
int blue = -1;
|
||||||
|
if (self->Ok()) {
|
||||||
|
red = self->Red();
|
||||||
|
green = self->Green();
|
||||||
|
blue = self->Blue();
|
||||||
|
}
|
||||||
|
PyTuple_SetItem(rv, 0, PyInt_FromLong(red));
|
||||||
|
PyTuple_SetItem(rv, 1, PyInt_FromLong(green));
|
||||||
|
PyTuple_SetItem(rv, 2, PyInt_FromLong(blue));
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
@@ -5819,6 +5819,36 @@ static PyObject *_wrap_wxWindow_GetMaxSize(PyObject *self, PyObject *args, PyObj
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxWindow_GetAdjustedBestSize(_swigobj) (_swigobj->GetAdjustedBestSize())
|
||||||
|
static PyObject *_wrap_wxWindow_GetAdjustedBestSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxSize * _result;
|
||||||
|
wxWindow * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetAdjustedBestSize",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetAdjustedBestSize. Expected _wxWindow_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||||
|
_result = new wxSize (wxWindow_GetAdjustedBestSize(_arg0));
|
||||||
|
|
||||||
|
wxPyEndAllowThreads(__tstate);
|
||||||
|
if (PyErr_Occurred()) return NULL;
|
||||||
|
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxWindow_SetCaret(_swigobj,_swigarg0) (_swigobj->SetCaret(_swigarg0))
|
#define wxWindow_SetCaret(_swigobj,_swigarg0) (_swigobj->SetCaret(_swigarg0))
|
||||||
static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -11992,6 +12022,7 @@ static PyMethodDef windowscMethods[] = {
|
|||||||
{ "wxWindow_Freeze", (PyCFunction) _wrap_wxWindow_Freeze, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_Freeze", (PyCFunction) _wrap_wxWindow_Freeze, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_SetCaret", (PyCFunction) _wrap_wxWindow_SetCaret, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_SetCaret", (PyCFunction) _wrap_wxWindow_SetCaret, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxWindow_GetAdjustedBestSize", (PyCFunction) _wrap_wxWindow_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_GetMaxSize", (PyCFunction) _wrap_wxWindow_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_GetMaxSize", (PyCFunction) _wrap_wxWindow_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxWindow_GetDropTarget", (PyCFunction) _wrap_wxWindow_GetDropTarget, METH_VARARGS | METH_KEYWORDS },
|
{ "wxWindow_GetDropTarget", (PyCFunction) _wrap_wxWindow_GetDropTarget, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -564,6 +564,10 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
val = apply(windowsc.wxWindow_GetMaxSize,(self,) + _args, _kwargs)
|
val = apply(windowsc.wxWindow_GetMaxSize,(self,) + _args, _kwargs)
|
||||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||||
return val
|
return val
|
||||||
|
def GetAdjustedBestSize(self, *_args, **_kwargs):
|
||||||
|
val = apply(windowsc.wxWindow_GetAdjustedBestSize,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||||
|
return val
|
||||||
def SetCaret(self, *_args, **_kwargs):
|
def SetCaret(self, *_args, **_kwargs):
|
||||||
val = apply(windowsc.wxWindow_SetCaret,(self,) + _args, _kwargs)
|
val = apply(windowsc.wxWindow_SetCaret,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
@@ -410,6 +410,13 @@ public:
|
|||||||
wxSize GetBestSize();
|
wxSize GetBestSize();
|
||||||
wxSize GetMaxSize();
|
wxSize GetMaxSize();
|
||||||
|
|
||||||
|
// There are times (and windows) where 'Best' size and 'Min' size
|
||||||
|
// are vastly out of sync. This should be remedied somehow, but in
|
||||||
|
// the meantime, this method will return the larger of BestSize
|
||||||
|
// (the window's smallest legible size), and any user specified
|
||||||
|
// MinSize hint.
|
||||||
|
wxSize GetAdjustedBestSize();
|
||||||
|
|
||||||
void SetCaret(wxCaret *caret);
|
void SetCaret(wxCaret *caret);
|
||||||
wxCaret *GetCaret();
|
wxCaret *GetCaret();
|
||||||
%pragma(python) addtoclass = "# replaces broken shadow method
|
%pragma(python) addtoclass = "# replaces broken shadow method
|
||||||
|
Reference in New Issue
Block a user