wxSizer.Show, IsShown, etc.
Wrappers for and use new wxInputStream methods Other tweaks, fixes, etc. to go along with recent CVS changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -99,11 +99,7 @@ class TestPanel(wxPanel):
|
||||
if self.process is not None:
|
||||
stream = self.process.GetInputStream()
|
||||
|
||||
# Yes, this is weird. For this particular stream type, EOF
|
||||
# simply means that there is no data available to be read,
|
||||
# not truly the end of file. Also, read() just reads all
|
||||
# the currently available data, not until the real EOF...
|
||||
if not stream.eof():
|
||||
if stream.CanRead():
|
||||
text = stream.read()
|
||||
self.out.AppendText(text)
|
||||
|
||||
@@ -113,7 +109,7 @@ class TestPanel(wxPanel):
|
||||
(evt.GetPid(), evt.GetExitCode()))
|
||||
|
||||
stream = self.process.GetInputStream()
|
||||
if not stream.eof():
|
||||
if stream.CanRead():
|
||||
text = stream.read()
|
||||
self.out.AppendText(text)
|
||||
|
||||
|
@@ -263,7 +263,7 @@ def EVT_COMMAND_SCROLL(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
|
||||
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
|
||||
win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE,func)
|
||||
win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
|
||||
win.Connect(id, -1, wxEVT_SCROLL_ENDSCROLL, func)
|
||||
|
||||
def EVT_COMMAND_SCROLL_TOP(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
|
||||
@@ -769,7 +769,7 @@ class wxApp(wxPyApp):
|
||||
error = 'wxApp.error'
|
||||
outputWindowClass = wxPyOnDemandOutputWindow
|
||||
|
||||
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=true):
|
||||
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=false):
|
||||
wxPyApp.__init__(self)
|
||||
self.stdioWin = None
|
||||
self.saveStdio = (sys.stdout, sys.stderr)
|
||||
|
@@ -131,6 +131,15 @@ enum wxFontEncoding
|
||||
wxFONTENCODING_UTF7, // UTF-7 Unicode encoding
|
||||
wxFONTENCODING_UTF8, // UTF-8 Unicode encoding
|
||||
|
||||
// Far Eastern encodings
|
||||
// Chinese
|
||||
wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, // Simplified Chinese
|
||||
wxFONTENCODING_BIG5 = wxFONTENCODING_CP950, // Traditional Chinese
|
||||
|
||||
// Japanese (see http://zsigri.tripod.com/fontboard/cjk/jis.html)
|
||||
wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, // Shift JIS
|
||||
wxFONTENCODING_EUC_JP, // Extended Unix Codepage for Japanese
|
||||
|
||||
wxFONTENCODING_UNICODE, // Unicode - currently used only by
|
||||
// wxEncodingConverter class
|
||||
|
||||
|
@@ -787,13 +787,15 @@ PyObject* wxPyInputStream::read(int size) {
|
||||
|
||||
// check if we have a real wxInputStream to work with
|
||||
if (!m_wxis) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyErr_SetString(PyExc_IOError, "no valid C-wxInputStream");
|
||||
wxPyEndBlockThreads();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (size < 0) {
|
||||
// read until EOF
|
||||
while (! m_wxis->Eof()) {
|
||||
// read while bytes are available on the stream
|
||||
while ( m_wxis->CanRead() ) {
|
||||
m_wxis->Read(buf.GetAppendBuf(BUFSIZE), BUFSIZE);
|
||||
buf.UngetAppendBuf(m_wxis->LastRead());
|
||||
}
|
||||
@@ -804,13 +806,16 @@ PyObject* wxPyInputStream::read(int size) {
|
||||
}
|
||||
|
||||
// error check
|
||||
if (m_wxis->LastError() == wxSTREAM_READ_ERROR) {
|
||||
wxPyBeginBlockThreads();
|
||||
wxStreamError err = m_wxis->GetLastError();
|
||||
if (err != wxSTREAM_NO_ERROR && err != wxSTREAM_EOF) {
|
||||
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
|
||||
}
|
||||
else {
|
||||
// We use only strings for the streams, not unicode
|
||||
obj = PyString_FromStringAndSize(buf, buf.GetDataLen());
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -823,24 +828,29 @@ PyObject* wxPyInputStream::readline(int size) {
|
||||
|
||||
// check if we have a real wxInputStream to work with
|
||||
if (!m_wxis) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream");
|
||||
wxPyEndBlockThreads();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// read until \n or byte limit reached
|
||||
for (i=ch=0; (ch != '\n') && (!m_wxis->Eof()) && ((size < 0) || (i < size)); i++) {
|
||||
for (i=ch=0; (ch != '\n') && (m_wxis->CanRead()) && ((size < 0) || (i < size)); i++) {
|
||||
ch = m_wxis->GetC();
|
||||
buf.AppendByte(ch);
|
||||
}
|
||||
|
||||
// errorcheck
|
||||
if (m_wxis->LastError() == wxSTREAM_READ_ERROR) {
|
||||
wxPyBeginBlockThreads();
|
||||
wxStreamError err = m_wxis->GetLastError();
|
||||
if (err != wxSTREAM_NO_ERROR && err != wxSTREAM_EOF) {
|
||||
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
|
||||
}
|
||||
else {
|
||||
// We use only strings for the streams, not unicode
|
||||
obj = PyString_FromStringAndSize((char*)buf.GetData(), buf.GetDataLen());
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -850,33 +860,45 @@ PyObject* wxPyInputStream::readlines(int sizehint) {
|
||||
|
||||
// check if we have a real wxInputStream to work with
|
||||
if (!m_wxis) {
|
||||
PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream below");
|
||||
wxPyBeginBlockThreads();
|
||||
PyErr_SetString(PyExc_IOError,"no valid C-wxInputStream");
|
||||
wxPyEndBlockThreads();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// init list
|
||||
wxPyBeginBlockThreads();
|
||||
pylist = PyList_New(0);
|
||||
if (!pylist) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyErr_NoMemory();
|
||||
wxPyEndBlockThreads();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// read sizehint bytes or until EOF
|
||||
int i;
|
||||
for (i=0; (!m_wxis->Eof()) && ((sizehint < 0) || (i < sizehint));) {
|
||||
for (i=0; (m_wxis->CanRead()) && ((sizehint < 0) || (i < sizehint));) {
|
||||
PyObject* s = this->readline();
|
||||
if (s == NULL) {
|
||||
wxPyBeginBlockThreads();
|
||||
Py_DECREF(pylist);
|
||||
wxPyEndBlockThreads();
|
||||
return NULL;
|
||||
}
|
||||
wxPyBeginBlockThreads();
|
||||
PyList_Append(pylist, s);
|
||||
i += PyString_Size(s);
|
||||
wxPyEndBlockThreads();
|
||||
}
|
||||
|
||||
// error check
|
||||
if (m_wxis->LastError() == wxSTREAM_READ_ERROR) {
|
||||
wxStreamError err = m_wxis->GetLastError();
|
||||
if (err != wxSTREAM_NO_ERROR && err != wxSTREAM_EOF) {
|
||||
wxPyBeginBlockThreads();
|
||||
Py_DECREF(pylist);
|
||||
PyErr_SetString(PyExc_IOError,"IOError in wxInputStream");
|
||||
wxPyEndBlockThreads();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -1580,8 +1580,6 @@ public:
|
||||
const wxString& client = wxPyART_OTHER,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
|
||||
// Destroy caches & all providers
|
||||
static void CleanUpProviders();
|
||||
};
|
||||
|
||||
|
||||
|
@@ -3945,6 +3945,10 @@ SWIGEXPORT(void) initfontsc() {
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_CP12_MAX", PyInt_FromLong((long) wxFONTENCODING_CP12_MAX));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_UTF7", PyInt_FromLong((long) wxFONTENCODING_UTF7));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_GB2312", PyInt_FromLong((long) wxFONTENCODING_GB2312));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_BIG5", PyInt_FromLong((long) wxFONTENCODING_BIG5));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_SHIFT_JIS", PyInt_FromLong((long) wxFONTENCODING_SHIFT_JIS));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_EUC_JP", PyInt_FromLong((long) wxFONTENCODING_EUC_JP));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE));
|
||||
PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX));
|
||||
PyDict_SetItemString(d,"wxLANGUAGE_DEFAULT", PyInt_FromLong((long) wxLANGUAGE_DEFAULT));
|
||||
|
@@ -483,6 +483,10 @@ wxFONTENCODING_CP1257 = fontsc.wxFONTENCODING_CP1257
|
||||
wxFONTENCODING_CP12_MAX = fontsc.wxFONTENCODING_CP12_MAX
|
||||
wxFONTENCODING_UTF7 = fontsc.wxFONTENCODING_UTF7
|
||||
wxFONTENCODING_UTF8 = fontsc.wxFONTENCODING_UTF8
|
||||
wxFONTENCODING_GB2312 = fontsc.wxFONTENCODING_GB2312
|
||||
wxFONTENCODING_BIG5 = fontsc.wxFONTENCODING_BIG5
|
||||
wxFONTENCODING_SHIFT_JIS = fontsc.wxFONTENCODING_SHIFT_JIS
|
||||
wxFONTENCODING_EUC_JP = fontsc.wxFONTENCODING_EUC_JP
|
||||
wxFONTENCODING_UNICODE = fontsc.wxFONTENCODING_UNICODE
|
||||
wxFONTENCODING_MAX = fontsc.wxFONTENCODING_MAX
|
||||
wxLANGUAGE_DEFAULT = fontsc.wxLANGUAGE_DEFAULT
|
||||
|
@@ -12518,7 +12518,7 @@ static PyObject *_wrap_wxGrid_GetSelectedCells(PyObject *self, PyObject *args, P
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectedCells(_arg0);
|
||||
const wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectedCells(_arg0);
|
||||
_result = (wxGridCellCoordsArray *) &_result_ref;
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
@@ -12549,7 +12549,7 @@ static PyObject *_wrap_wxGrid_GetSelectionBlockTopLeft(PyObject *self, PyObject
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectionBlockTopLeft(_arg0);
|
||||
const wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectionBlockTopLeft(_arg0);
|
||||
_result = (wxGridCellCoordsArray *) &_result_ref;
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
@@ -12580,7 +12580,7 @@ static PyObject *_wrap_wxGrid_GetSelectionBlockBottomRight(PyObject *self, PyObj
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectionBlockBottomRight(_arg0);
|
||||
const wxGridCellCoordsArray & _result_ref = wxGrid_GetSelectionBlockBottomRight(_arg0);
|
||||
_result = (wxGridCellCoordsArray *) &_result_ref;
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
@@ -12611,7 +12611,7 @@ static PyObject *_wrap_wxGrid_GetSelectedRows(PyObject *self, PyObject *args, Py
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxArrayInt & _result_ref = wxGrid_GetSelectedRows(_arg0);
|
||||
const wxArrayInt & _result_ref = wxGrid_GetSelectedRows(_arg0);
|
||||
_result = (wxArrayInt *) &_result_ref;
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
@@ -12648,7 +12648,7 @@ static PyObject *_wrap_wxGrid_GetSelectedCols(PyObject *self, PyObject *args, Py
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxArrayInt & _result_ref = wxGrid_GetSelectedCols(_arg0);
|
||||
const wxArrayInt & _result_ref = wxGrid_GetSelectedCols(_arg0);
|
||||
_result = (wxArrayInt *) &_result_ref;
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
|
@@ -10072,24 +10072,6 @@ static PyObject *_wrap_wxArtProvider_GetIcon(PyObject *self, PyObject *args, PyO
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxArtProvider_CleanUpProviders(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char *_kwnames[] = { NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxArtProvider_CleanUpProviders",_kwnames))
|
||||
return NULL;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxPyArtProvider::CleanUpProviders();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxFileHistoryTowxObject(void *ptr) {
|
||||
wxFileHistory *src;
|
||||
wxObject *dest;
|
||||
@@ -11299,7 +11281,6 @@ static PyMethodDef misc2cMethods[] = {
|
||||
{ "wxFileHistory_AddFileToHistory", (PyCFunction) _wrap_wxFileHistory_AddFileToHistory, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "delete_wxFileHistory", (PyCFunction) _wrap_delete_wxFileHistory, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxFileHistory", (PyCFunction) _wrap_new_wxFileHistory, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxArtProvider_CleanUpProviders", (PyCFunction) _wrap_wxArtProvider_CleanUpProviders, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxArtProvider_GetIcon", (PyCFunction) _wrap_wxArtProvider_GetIcon, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxArtProvider_GetBitmap", (PyCFunction) _wrap_wxArtProvider_GetBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxArtProvider_RemoveProvider", (PyCFunction) _wrap_wxArtProvider_RemoveProvider, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -1373,8 +1373,6 @@ def wxArtProvider_GetIcon(*_args, **_kwargs):
|
||||
if val: val = wxIconPtr(val); val.thisown = 1
|
||||
return val
|
||||
|
||||
wxArtProvider_CleanUpProviders = misc2c.wxArtProvider_CleanUpProviders
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
@@ -481,6 +481,34 @@ static PyObject *_wrap_wxSizerItem_IsSpacer(PyObject *self, PyObject *args, PyOb
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizerItem_IsShown(_swigobj) (_swigobj->IsShown())
|
||||
static PyObject *_wrap_wxSizerItem_IsShown(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxSizerItem * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_IsShown",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_IsShown. Expected _wxSizerItem_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxSizerItem_IsShown(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizerItem_GetWindow(_swigobj) (_swigobj->GetWindow())
|
||||
static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -812,6 +840,37 @@ static PyObject *_wrap_wxSizerItem_SetBorder(PyObject *self, PyObject *args, PyO
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizerItem_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0))
|
||||
static PyObject *_wrap_wxSizerItem_Show(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSizerItem * _arg0;
|
||||
bool _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
int tempbool1;
|
||||
char *_kwnames[] = { "self","show", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_Show",_kwnames,&_argo0,&tempbool1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_Show. Expected _wxSizerItem_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg1 = (bool ) tempbool1;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizerItem_Show(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxSizerItem_GetUserData(wxSizerItem *self) {
|
||||
wxPyUserData* data = (wxPyUserData*)self->GetUserData();
|
||||
if (data) {
|
||||
@@ -1994,6 +2053,265 @@ static PyObject *_wrap_wxSizer_GetChildren(PyObject *self, PyObject *args, PyObj
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_ShowWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxSizer_ShowWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSizer * _arg0;
|
||||
wxWindow * _arg1;
|
||||
bool _arg2 = (bool ) TRUE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
int tempbool2 = (int) TRUE;
|
||||
char *_kwnames[] = { "self","window","show", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxSizer_ShowWindow",_kwnames,&_argo0,&_argo1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowWindow. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_ShowWindow. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizer_ShowWindow(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_HideWindow(_swigobj,_swigarg0) (_swigobj->Hide(_swigarg0))
|
||||
static PyObject *_wrap_wxSizer_HideWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSizer * _arg0;
|
||||
wxWindow * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","window", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_HideWindow",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_HideWindow. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_HideWindow. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizer_HideWindow(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_ShowSizer(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxSizer_ShowSizer(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSizer * _arg0;
|
||||
wxSizer * _arg1;
|
||||
bool _arg2 = (bool ) TRUE;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
int tempbool2 = (int) TRUE;
|
||||
char *_kwnames[] = { "self","sizer","show", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxSizer_ShowSizer",_kwnames,&_argo0,&_argo1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowSizer. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_ShowSizer. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizer_ShowSizer(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_HideSizer(_swigobj,_swigarg0) (_swigobj->Hide(_swigarg0))
|
||||
static PyObject *_wrap_wxSizer_HideSizer(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSizer * _arg0;
|
||||
wxSizer * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","sizer", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_HideSizer",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_HideSizer. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_HideSizer. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizer_HideSizer(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_IsShownWindow(_swigobj,_swigarg0) (_swigobj->IsShown(_swigarg0))
|
||||
static PyObject *_wrap_wxSizer_IsShownWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxSizer * _arg0;
|
||||
wxWindow * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","window", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_IsShownWindow",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_IsShownWindow. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_IsShownWindow. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxSizer_IsShownWindow(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_IsShownSizer(_swigobj,_swigarg0) (_swigobj->IsShown(_swigarg0))
|
||||
static PyObject *_wrap_wxSizer_IsShownSizer(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxSizer * _arg0;
|
||||
wxSizer * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","sizer", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_IsShownSizer",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_IsShownSizer. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_IsShownSizer. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxSizer_IsShownSizer(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSizer_ShowItems(_swigobj,_swigarg0) (_swigobj->ShowItems(_swigarg0))
|
||||
static PyObject *_wrap_wxSizer_ShowItems(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxSizer * _arg0;
|
||||
bool _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
int tempbool1;
|
||||
char *_kwnames[] = { "self","show", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizer_ShowItems",_kwnames,&_argo0,&tempbool1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowItems. Expected _wxSizer_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg1 = (bool ) tempbool1;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizer_ShowItems(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxPySizerTowxSizer(void *ptr) {
|
||||
wxPySizer *src;
|
||||
wxSizer *dest;
|
||||
@@ -3079,6 +3397,13 @@ static PyMethodDef sizerscMethods[] = {
|
||||
{ "new_wxBoxSizer", (PyCFunction) _wrap_new_wxBoxSizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPySizer__setCallbackInfo", (PyCFunction) _wrap_wxPySizer__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxPySizer", (PyCFunction) _wrap_new_wxPySizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_ShowItems", (PyCFunction) _wrap_wxSizer_ShowItems, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_IsShownSizer", (PyCFunction) _wrap_wxSizer_IsShownSizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_IsShownWindow", (PyCFunction) _wrap_wxSizer_IsShownWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_HideSizer", (PyCFunction) _wrap_wxSizer_HideSizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_ShowSizer", (PyCFunction) _wrap_wxSizer_ShowSizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_HideWindow", (PyCFunction) _wrap_wxSizer_HideWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_ShowWindow", (PyCFunction) _wrap_wxSizer_ShowWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_GetChildren", (PyCFunction) _wrap_wxSizer_GetChildren, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_DeleteWindows", (PyCFunction) _wrap_wxSizer_DeleteWindows, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer_Clear", (PyCFunction) _wrap_wxSizer_Clear, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -3110,6 +3435,7 @@ static PyMethodDef sizerscMethods[] = {
|
||||
{ "wxSizer_Destroy", (PyCFunction) _wrap_wxSizer_Destroy, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizer__setOORInfo", (PyCFunction) _wrap_wxSizer__setOORInfo, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_GetUserData", (PyCFunction) _wrap_wxSizerItem_GetUserData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_Show", (PyCFunction) _wrap_wxSizerItem_Show, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_SetBorder", (PyCFunction) _wrap_wxSizerItem_SetBorder, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_SetFlag", (PyCFunction) _wrap_wxSizerItem_SetFlag, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_SetOption", (PyCFunction) _wrap_wxSizerItem_SetOption, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -3121,6 +3447,7 @@ static PyMethodDef sizerscMethods[] = {
|
||||
{ "wxSizerItem_GetSizer", (PyCFunction) _wrap_wxSizerItem_GetSizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_SetWindow", (PyCFunction) _wrap_wxSizerItem_SetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_GetWindow", (PyCFunction) _wrap_wxSizerItem_GetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_IsShown", (PyCFunction) _wrap_wxSizerItem_IsShown, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_IsSpacer", (PyCFunction) _wrap_wxSizerItem_IsSpacer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_IsSizer", (PyCFunction) _wrap_wxSizerItem_IsSizer, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSizerItem_IsWindow", (PyCFunction) _wrap_wxSizerItem_IsWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -59,6 +59,9 @@ class wxSizerItemPtr(wxObjectPtr):
|
||||
def IsSpacer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_IsSpacer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShown(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_IsShown,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -92,6 +95,9 @@ class wxSizerItemPtr(wxObjectPtr):
|
||||
def SetBorder(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_SetBorder,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Show(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_Show,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetUserData(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizerItem_GetUserData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -202,6 +208,27 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def GetChildren(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_GetChildren,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HideWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_HideWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HideSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_HideSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShownWindow(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_IsShownWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShownSizer(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_IsShownSizer,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowItems(self, *_args, **_kwargs):
|
||||
val = apply(sizersc.wxSizer_ShowItems,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxSizer instance at %s>" % (self.this,)
|
||||
|
||||
@@ -260,6 +287,25 @@ class wxSizerPtr(wxObjectPtr):
|
||||
def GetMinSizeTuple(self):
|
||||
return self.GetMinSize().asTuple()
|
||||
|
||||
|
||||
def Show(self, *args):
|
||||
if string.find(args[0].this, 'Sizer') != -1:
|
||||
apply(self.ShowSizer, args)
|
||||
else:
|
||||
apply(self.ShowWindow, args)
|
||||
|
||||
def Hide(self, *args):
|
||||
if string.find(args[0].this, 'Sizer') != -1:
|
||||
apply(self.HideSizer, args)
|
||||
else:
|
||||
apply(self.HideWindow, args)
|
||||
|
||||
def IsShown(self, *args):
|
||||
if string.find(args[0].this, 'Sizer') != -1:
|
||||
return apply(self.IsShownSizer, args)
|
||||
else:
|
||||
return apply(self.IsShownWindow, args)
|
||||
|
||||
class wxSizer(wxSizerPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
|
@@ -362,6 +362,233 @@ static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObje
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_Peek(_swigobj) (_swigobj->Peek())
|
||||
static PyObject *_wrap_wxInputStream_Peek(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Peek",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Peek. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (char )wxInputStream_Peek(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("c",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_GetC(_swigobj) (_swigobj->GetC())
|
||||
static PyObject *_wrap_wxInputStream_GetC(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_GetC",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_GetC. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (char )wxInputStream_GetC(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("c",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_LastRead(_swigobj) (_swigobj->LastRead())
|
||||
static PyObject *_wrap_wxInputStream_LastRead(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
size_t _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_LastRead",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_LastRead. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (size_t )wxInputStream_LastRead(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_CanRead(_swigobj) (_swigobj->CanRead())
|
||||
static PyObject *_wrap_wxInputStream_CanRead(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_CanRead",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_CanRead. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxInputStream_CanRead(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_Eof(_swigobj) (_swigobj->Eof())
|
||||
static PyObject *_wrap_wxInputStream_Eof(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Eof",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Eof. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxInputStream_Eof(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_Ungetch(_swigobj,_swigarg0) (_swigobj->Ungetch(_swigarg0))
|
||||
static PyObject *_wrap_wxInputStream_Ungetch(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxPyInputStream * _arg0;
|
||||
char _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","c", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oc:wxInputStream_Ungetch",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Ungetch. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxInputStream_Ungetch(_arg0,_arg1);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_SeekI(_swigobj,_swigarg0,_swigarg1) (_swigobj->SeekI(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxInputStream_SeekI(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxPyInputStream * _arg0;
|
||||
long _arg1;
|
||||
wxSeekMode _arg2 = (wxSeekMode ) (wxFromStart);
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","pos","mode", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxInputStream_SeekI",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_SeekI. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (long )wxInputStream_SeekI(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxInputStream_TellI(_swigobj) (_swigobj->TellI())
|
||||
static PyObject *_wrap_wxInputStream_TellI(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
long _result;
|
||||
wxPyInputStream * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_TellI",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_TellI. Expected _wxPyInputStream_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (long )wxInputStream_TellI(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("l",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void wxOutputStream_write(wxOutputStream *self,PyObject * obj) {
|
||||
// We use only strings for the streams, not unicode
|
||||
PyObject* str = PyObject_Str(obj);
|
||||
@@ -407,6 +634,14 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb
|
||||
|
||||
static PyMethodDef streamscMethods[] = {
|
||||
{ "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_TellI", (PyCFunction) _wrap_wxInputStream_TellI, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_SeekI", (PyCFunction) _wrap_wxInputStream_SeekI, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_Ungetch", (PyCFunction) _wrap_wxInputStream_Ungetch, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_Eof", (PyCFunction) _wrap_wxInputStream_Eof, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_CanRead", (PyCFunction) _wrap_wxInputStream_CanRead, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_LastRead", (PyCFunction) _wrap_wxInputStream_LastRead, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_GetC", (PyCFunction) _wrap_wxInputStream_GetC, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_Peek", (PyCFunction) _wrap_wxInputStream_Peek, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -528,6 +763,9 @@ SWIGEXPORT(void) initstreamsc() {
|
||||
SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule("streamsc", streamscMethods);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d,"wxFromStart", PyInt_FromLong((long) wxFromStart));
|
||||
PyDict_SetItemString(d,"wxFromCurrent", PyInt_FromLong((long) wxFromCurrent));
|
||||
PyDict_SetItemString(d,"wxFromEnd", PyInt_FromLong((long) wxFromEnd));
|
||||
|
||||
wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream");
|
||||
{
|
||||
|
@@ -30,6 +30,30 @@ class wxInputStreamPtr :
|
||||
def tell(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Peek(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_Peek,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetC(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_GetC,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def LastRead(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_LastRead,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CanRead(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_CanRead,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Eof(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_Eof,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Ungetch(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_Ungetch,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SeekI(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_SeekI,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def TellI(self, *_args, **_kwargs):
|
||||
val = apply(streamsc.wxInputStream_TellI,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxInputStream instance at %s>" % (self.this,)
|
||||
class wxInputStream(wxInputStreamPtr):
|
||||
@@ -64,3 +88,6 @@ class wxOutputStream(wxOutputStreamPtr):
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
wxFromStart = streamsc.wxFromStart
|
||||
wxFromCurrent = streamsc.wxFromCurrent
|
||||
wxFromEnd = streamsc.wxFromEnd
|
||||
|
@@ -3045,18 +3045,19 @@ static PyObject *_wrap_wxDateTime_SetMillisecond(PyObject *self, PyObject *args,
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->SetToWeekDayInSameWeek(_swigarg0))
|
||||
#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToWeekDayInSameWeek(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxDateTime * _result;
|
||||
wxDateTime * _arg0;
|
||||
wxDateTime::WeekDay _arg1;
|
||||
wxDateTime::WeekFlags _arg2 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","weekday", NULL };
|
||||
char *_kwnames[] = { "self","weekday","flags", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -3067,7 +3068,7 @@ static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObjec
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1);
|
||||
wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1,_arg2);
|
||||
_result = (wxDateTime *) &_result_ref;
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
@@ -3082,18 +3083,19 @@ static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObjec
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->GetWeekDayInSameWeek(_swigarg0))
|
||||
#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekDayInSameWeek(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxDateTime * _result;
|
||||
wxDateTime * _arg0;
|
||||
wxDateTime::WeekDay _arg1;
|
||||
wxDateTime::WeekFlags _arg2 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","weekday", NULL };
|
||||
char *_kwnames[] = { "self","weekday","flags", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -3104,7 +3106,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1));
|
||||
_result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1,_arg2));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -3345,18 +3347,19 @@ static PyObject *_wrap_wxDateTime_GetLastWeekDay(PyObject *self, PyObject *args,
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1))
|
||||
#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1,_swigarg2))
|
||||
static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxDateTime * _arg0;
|
||||
wxDateTime::wxDateTime_t _arg1;
|
||||
wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon;
|
||||
wxDateTime::WeekFlags _arg3 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","numWeek","weekday", NULL };
|
||||
char *_kwnames[] = { "self","numWeek","weekday","flags", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|ii:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -3367,7 +3370,7 @@ static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, P
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2);
|
||||
_result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
@@ -3375,19 +3378,20 @@ static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, P
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeek(_swigarg0,_swigarg1))
|
||||
#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetWeek(_swigarg0,_swigarg1,_swigarg2))
|
||||
static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxDateTime * _result;
|
||||
wxDateTime * _arg0;
|
||||
wxDateTime::wxDateTime_t _arg1;
|
||||
wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon;
|
||||
wxDateTime::WeekFlags _arg3 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","numWeek","weekday", NULL };
|
||||
char *_kwnames[] = { "self","numWeek","weekday","flags", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|ii:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
@@ -3398,7 +3402,7 @@ static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObje
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2));
|
||||
_result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2,_arg3));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
|
@@ -1210,7 +1210,7 @@ def EVT_COMMAND_SCROLL(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
|
||||
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
|
||||
win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE,func)
|
||||
win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
|
||||
win.Connect(id, -1, wxEVT_SCROLL_ENDSCROLL, func)
|
||||
|
||||
def EVT_COMMAND_SCROLL_TOP(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
|
||||
@@ -1716,7 +1716,7 @@ class wxApp(wxPyApp):
|
||||
error = 'wxApp.error'
|
||||
outputWindowClass = wxPyOnDemandOutputWindow
|
||||
|
||||
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=true):
|
||||
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=false):
|
||||
wxPyApp.__init__(self)
|
||||
self.stdioWin = None
|
||||
self.saveStdio = (sys.stdout, sys.stderr)
|
||||
|
@@ -50,6 +50,19 @@ public:
|
||||
void write(wxString data);
|
||||
void writelines(wxStringPtrList);
|
||||
*/
|
||||
|
||||
// wxInputStream methods that may come in handy...
|
||||
|
||||
char Peek() { if (m_wxis) return m_wxis->Peek(); else return -1; }
|
||||
char GetC() { if (m_wxis) return m_wxis->GetC(); else return -1; }
|
||||
size_t LastRead() { if (m_wxis) return m_wxis->LastRead(); else return 0; }
|
||||
bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return FALSE; }
|
||||
bool Eof() { if (m_wxis) return m_wxis->Eof(); else return FALSE; }
|
||||
bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return FALSE; }
|
||||
|
||||
unsigned long SeekI(unsigned long pos, wxSeekMode mode)
|
||||
{ if (m_wxis) return m_wxis->SeekI(pos, mode); else return -1; }
|
||||
unsigned long TellI() { if (m_wxis) return m_wxis->TellI(); else return -1; }
|
||||
};
|
||||
|
||||
|
||||
|
@@ -57,6 +57,7 @@ public:
|
||||
bool IsWindow();
|
||||
bool IsSizer();
|
||||
bool IsSpacer();
|
||||
bool IsShown();
|
||||
|
||||
wxWindow *GetWindow();
|
||||
void SetWindow( wxWindow *window );
|
||||
@@ -70,6 +71,7 @@ public:
|
||||
void SetOption( int option );
|
||||
void SetFlag( int flag );
|
||||
void SetBorder( int border );
|
||||
void Show(bool show);
|
||||
|
||||
// wxObject* GetUserData();
|
||||
%addmethods {
|
||||
@@ -262,6 +264,40 @@ public:
|
||||
return wxPy_ConvertList(&list, "wxSizerItem");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Manage whether individual windows or sub-sizers are considered
|
||||
// in the layout calculations or not.
|
||||
%name(ShowWindow)void Show( wxWindow *window, bool show = TRUE );
|
||||
%name(HideWindow)void Hide( wxWindow *window );
|
||||
%name(ShowSizer)void Show( wxSizer *sizer, bool show = TRUE );
|
||||
%name(HideSizer)void Hide( wxSizer *sizer );
|
||||
%name(IsShownWindow)bool IsShown( wxWindow *window );
|
||||
%name(IsShownSizer)bool IsShown( wxSizer *sizer );
|
||||
|
||||
%pragma(python) addtoclass = "
|
||||
def Show(self, *args):
|
||||
if string.find(args[0].this, 'Sizer') != -1:
|
||||
apply(self.ShowSizer, args)
|
||||
else:
|
||||
apply(self.ShowWindow, args)
|
||||
|
||||
def Hide(self, *args):
|
||||
if string.find(args[0].this, 'Sizer') != -1:
|
||||
apply(self.HideSizer, args)
|
||||
else:
|
||||
apply(self.HideWindow, args)
|
||||
|
||||
def IsShown(self, *args):
|
||||
if string.find(args[0].this, 'Sizer') != -1:
|
||||
return apply(self.IsShownSizer, args)
|
||||
else:
|
||||
return apply(self.IsShownWindow, args)
|
||||
"
|
||||
|
||||
// Recursively call wxWindow::Show () on all sizer items.
|
||||
void ShowItems (bool show);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -88,6 +88,12 @@
|
||||
// $target=0;
|
||||
// }
|
||||
|
||||
enum wxSeekMode
|
||||
{
|
||||
wxFromStart,
|
||||
wxFromCurrent,
|
||||
wxFromEnd
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -118,6 +124,16 @@ public:
|
||||
void write(wxString data);
|
||||
void writelines(wxStringPtrList);
|
||||
*/
|
||||
|
||||
char Peek();
|
||||
char GetC();
|
||||
size_t LastRead();
|
||||
bool CanRead();
|
||||
bool Eof();
|
||||
bool Ungetch(char c);
|
||||
|
||||
long SeekI(long pos, wxSeekMode mode = wxFromStart);
|
||||
long TellI();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -532,8 +532,8 @@ public:
|
||||
// calendar calculations
|
||||
|
||||
// set to the given week day in the same week as this one
|
||||
wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday);
|
||||
wxDateTime GetWeekDayInSameWeek(WeekDay weekday);
|
||||
wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday, WeekFlags flags = Monday_First);
|
||||
wxDateTime GetWeekDayInSameWeek(WeekDay weekday, WeekFlags flags = Monday_First);
|
||||
|
||||
// set to the next week day following this one
|
||||
wxDateTime& SetToNextWeekDay(WeekDay weekday);
|
||||
@@ -567,8 +567,8 @@ public:
|
||||
// sets the date to the given day of the given week in the year,
|
||||
// returns TRUE on success and FALSE if given date doesn't exist (e.g.
|
||||
// numWeek is > 53)
|
||||
bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon);
|
||||
wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon);
|
||||
bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
||||
wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
||||
|
||||
// sets the date to the last day of the given (or current) month or the
|
||||
// given (or current) year
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wxp.i
|
||||
// Name: wx.i
|
||||
// Purpose: SWIG interface file for a python wxWindows module
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
|
@@ -280,6 +280,7 @@ class wxGenButton(wxPyControl):
|
||||
def OnLeftUp(self, event):
|
||||
if not self.IsEnabled() or not self.HasCapture():
|
||||
return
|
||||
if self.HasCapture():
|
||||
self.ReleaseMouse()
|
||||
if not self.up: # if the button was down when the mouse was released...
|
||||
self.Notify()
|
||||
@@ -291,7 +292,7 @@ class wxGenButton(wxPyControl):
|
||||
def OnMotion(self, event):
|
||||
if not self.IsEnabled() or not self.HasCapture():
|
||||
return
|
||||
if event.LeftIsDown():
|
||||
if event.LeftIsDown() and self.HasCapture():
|
||||
x,y = event.GetPositionTuple()
|
||||
w,h = self.GetClientSizeTuple()
|
||||
if self.up and x<w and x>=0 and y<h and y>=0:
|
||||
@@ -487,6 +488,7 @@ class __ToggleMixin:
|
||||
def OnLeftUp(self, event):
|
||||
if not self.IsEnabled() or not self.HasCapture():
|
||||
return
|
||||
if self.HasCapture():
|
||||
if self.up != self.saveUp:
|
||||
self.Notify()
|
||||
self.ReleaseMouse()
|
||||
@@ -495,6 +497,22 @@ class __ToggleMixin:
|
||||
def OnKeyDown(self, event):
|
||||
event.Skip()
|
||||
|
||||
def OnMotion(self, event):
|
||||
if not self.IsEnabled():
|
||||
return
|
||||
if event.LeftIsDown() and self.HasCapture():
|
||||
x,y = event.GetPositionTuple()
|
||||
w,h = self.GetClientSizeTuple()
|
||||
if x<w and x>=0 and y<h and y>=0:
|
||||
self.up = not self.saveUp
|
||||
self.Refresh()
|
||||
return
|
||||
if (x<0 or y<0 or x>=w or y>=h):
|
||||
self.up = self.saveUp
|
||||
self.Refresh()
|
||||
return
|
||||
event.Skip()
|
||||
|
||||
def OnKeyUp(self, event):
|
||||
if self.hasFocus and event.KeyCode() == ord(" "):
|
||||
self.up = not self.up
|
||||
|
@@ -32,7 +32,7 @@ imported. It probably is not installed (it's not part of the standard
|
||||
Python distribution). See the Python site (http://www.python.org) for
|
||||
information on downloading source or binaries."""
|
||||
|
||||
if wxPlatform == '__WXMSW__':
|
||||
if wx.wxPlatform == '__WXMSW__':
|
||||
d = wx.wxMessageDialog(wx.NULL, msg, "Numeric not found")
|
||||
if d.ShowModal() == wx.wxID_CANCEL:
|
||||
d = wx.wxMessageDialog(wx.NULL, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.wxOK)
|
||||
|
Reference in New Issue
Block a user