Fixed deadlock problem that happened when using threads.
+Added new HTML printing classes.
+
Wrapped the wxHtmlHelpController and related classes.
-Wrapped the C++ versions of wxSizer and firends. The Python-only
+Wrapped the C++ versions of wxSizer and friends. The Python-only
versions are still in the library, but depreciated. (You will get a
warning message if you try to use them, but the warning can be
disabled.) The usage of the C++ versions is slightly different, and
Some new 3rd party contributions in wxPython.lib. PyShell, in
shell.py is an interesting implementaion of an interactive Python
-shell in wxWindows. floatbar.py has a class derived from wxTooBar
+shell in wxWindows. floatbar.py has a class derived from wxToolBar
that can sense mouse drags and then reparent itself into another
frame. Moving the new frame close to where it came from puts the tool
bar back into the original parent. (Unfortunately there is currently
self.tree.EnsureVisible(selectedDemo)
+ self.WriteText('window handle: %s\n' % self.GetHandle())
+
+
#---------------------------------------------
def WriteText(self, text):
self.log.WriteText(text)
wxSB_HORIZONTAL,
wxSB_VERTICAL,
wxST_SIZEGRIP,
+ wxST_NO_AUTORESIZE,
wxBU_AUTODRAW,
wxBU_NOAUTODRAW,
wxTR_HAS_BUTTONS,
wxSAVE,
wxHIDE_READONLY,
wxOVERWRITE_PROMPT,
+ wxFILE_MUST_EXIST,
wxACCEL_ALT,
wxACCEL_CTRL,
wxEVT_COMMAND_TREE_SEL_CHANGED,
wxEVT_COMMAND_TREE_SEL_CHANGING,
wxEVT_COMMAND_TREE_KEY_DOWN,
+ wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
+ wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK,
+ wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK,
/* List control event types */
wxEVT_COMMAND_LIST_BEGIN_DRAG,
def EVT_TREE_DELETE_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
+def EVT_TREE_ITEM_ACTIVATED(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func)
+
+def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func)
+
+def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func)
+
# wxSpinButton
def EVT_SPIN_UP(win, id, func):
// occurs, so I put in this code as a guard condition since there are
// many possibilites for nested events and callbacks in wxPython. If
// The current thread is our thread, then we can assume that we
- // already have the lock.
+ // already have the lock. (I hope!)
//
#ifdef WXP_WITH_THREAD
_wxPyNestCount += 1;
#include "helpers.h"
#include <wx/resource.h>
#include <wx/tooltip.h>
+#include <wx/busyinfo.h>
%}
//----------------------------------------------------------------------
};
//---------------------------------------------------------------------------
+
+class wxBusyInfo {
+public:
+ wxBusyInfo(const wxString& message);
+ ~wxBusyInfo();
+};
+
+
+
//---------------------------------------------------------------------------
const wxString& encoding);
};
#endif
+
+//----------------------------------------------------------------------
+
+class wxBusyCursor {
+public:
+ wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
+ ~wxBusyCursor();
+};
+
+
+
+//----------------------------------------------------------------------
//----------------------------------------------------------------------
//----------------------------------------------------------------------
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxMouseEvent","_class_wxMouseEvent",0},
{ "_wxRegion","_class_wxRegion",0},
{ "_class_wxShowEvent","_wxShowEvent",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_class_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_class_wxFont","_wxFont",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxScreenDC","_wxScreenDC",0},
{ "_wxPalette","_class_wxPalette",0},
{ "_wxRegion","_class_wxRegion",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_class_wxCursor",SwigwxCursorTowxBitmap},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_class_wxFont","_wxFont",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_wxPalette","_class_wxPalette",0},
{ "_wxRegion","_class_wxRegion",0},
{ "_class_wxPCXHandler","_wxPCXHandler",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
#include "helpers.h"
#include <wx/resource.h>
#include <wx/tooltip.h>
+#include <wx/busyinfo.h>
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
return _resultobj;
}
+#define new_wxBusyInfo(_swigarg0) (new wxBusyInfo(_swigarg0))
+static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxBusyInfo * _result;
+ wxString * _arg0;
+ PyObject * _obj0 = 0;
+ char *_kwnames[] = { "message", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxBusyInfo",_kwnames,&_obj0))
+ return NULL;
+{
+ if (!PyString_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyInfo_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ if (_obj0)
+ delete _arg0;
+}
+ return _resultobj;
+}
+
+#define delete_wxBusyInfo(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxBusyInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxBusyInfo * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBusyInfo",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBusyInfo_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBusyInfo. Expected _wxBusyInfo_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ delete_wxBusyInfo(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static PyMethodDef misccMethods[] = {
+ { "delete_wxBusyInfo", (PyCFunction) _wrap_delete_wxBusyInfo, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxBusyInfo", (PyCFunction) _wrap_new_wxBusyInfo, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxAcceleratorTable", (PyCFunction) _wrap_delete_wxAcceleratorTable, METH_VARARGS | METH_KEYWORDS },
{ "new_wxAcceleratorTable", (PyCFunction) _wrap_new_wxAcceleratorTable, METH_VARARGS | METH_KEYWORDS },
{ "wxAcceleratorEntry_GetCommand", (PyCFunction) _wrap_wxAcceleratorEntry_GetCommand, METH_VARARGS | METH_KEYWORDS },
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_signed_short","_WXTYPE",0},
{ "_wxRegionIterator","_class_wxRegionIterator",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
{ "_wxRegion","_class_wxRegion",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxSize","_wxSize",0},
{0,0,0}};
+class wxBusyInfoPtr :
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __del__(self,miscc=miscc):
+ if self.thisown == 1 :
+ miscc.delete_wxBusyInfo(self)
+ def __repr__(self):
+ return "<C wxBusyInfo instance at %s>" % (self.this,)
+class wxBusyInfo(wxBusyInfoPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(miscc.new_wxBusyInfo,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
#-------------- FUNCTION WRAPPERS ------------------
return _resultobj;
}
+#define new_wxBusyCursor(_swigarg0) (new wxBusyCursor(_swigarg0))
+static PyObject *_wrap_new_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxBusyCursor * _result;
+ wxCursor * _arg0 = (wxCursor *) wxHOURGLASS_CURSOR;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "cursor", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBusyCursor",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBusyCursor. Expected _wxCursor_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxBusyCursor *)new_wxBusyCursor(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyCursor_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define delete_wxBusyCursor(_swigobj) (delete _swigobj)
+static PyObject *_wrap_delete_wxBusyCursor(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxBusyCursor * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxBusyCursor",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBusyCursor_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxBusyCursor. Expected _wxBusyCursor_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ delete_wxBusyCursor(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static PyMethodDef misc2cMethods[] = {
+ { "delete_wxBusyCursor", (PyCFunction) _wrap_delete_wxBusyCursor, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxBusyCursor", (PyCFunction) _wrap_new_wxBusyCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_OnKillFocus", (PyCFunction) _wrap_wxCaret_OnKillFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_OnSetFocus", (PyCFunction) _wrap_wxCaret_OnSetFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS },
{ "_class_wxToolTip","_wxToolTip",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
+ { "_wxBusyCursor","_class_wxBusyCursor",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxBrush","_class_wxBrush",0},
{ "_uint","_wxPrintQuality",0},
{ "_wxWindowDC","_class_wxWindowDC",0},
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
{ "_class_wxValidator","_wxValidator",0},
+ { "_class_wxBusyCursor","_wxBusyCursor",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_class_wxWindow","_wxWindow",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxScreenDC","_wxScreenDC",0},
{ "_wxPalette","_class_wxPalette",0},
{ "_wxRegion","_class_wxRegion",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
+class wxBusyCursorPtr :
+ def __init__(self,this):
+ self.this = this
+ self.thisown = 0
+ def __del__(self,misc2c=misc2c):
+ if self.thisown == 1 :
+ misc2c.delete_wxBusyCursor(self)
+ def __repr__(self):
+ return "<C wxBusyCursor instance at %s>" % (self.this,)
+class wxBusyCursor(wxBusyCursorPtr):
+ def __init__(self,*_args,**_kwargs):
+ self.this = apply(misc2c.new_wxBusyCursor,_args,_kwargs)
+ self.thisown = 1
+
+
+
+
#-------------- FUNCTION WRAPPERS ------------------
#include <wx/print.h>
#include <wx/printdlg.h>
+#include "printfw.h"
+
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
static char* wxStringErrorMsg = "string type is required for parameter";
-class wxPyPrintout : public wxPrintout {
-public:
- wxPyPrintout(const wxString& title) : wxPrintout(title) {}
-
- DEC_PYCALLBACK_BOOL_INTINT(OnBeginDocument);
- DEC_PYCALLBACK__(OnEndDocument);
- DEC_PYCALLBACK__(OnBeginPrinting);
- DEC_PYCALLBACK__(OnEndPrinting);
- DEC_PYCALLBACK__(OnPreparePrinting);
- DEC_PYCALLBACK_BOOL_INT_pure(OnPrintPage);
- DEC_PYCALLBACK_BOOL_INT(HasPage);
-
-
- // Since this one would be tough and ugly to do with the Macros...
- void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
- bool hadErr = false;
-
- bool doSave = wxPyRestoreThread();
- if (m_myInst.findCallback("GetPageInfo")) {
- PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
- if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
- PyObject* val;
-
- val = PyTuple_GetItem(result, 0);
- if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
- else hadErr = true;
-
- val = PyTuple_GetItem(result, 1);
- if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
- else hadErr = true;
-
- val = PyTuple_GetItem(result, 2);
- if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
- else hadErr = true;
-
- val = PyTuple_GetItem(result, 3);
- if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
- else hadErr = true;
- }
- else
- hadErr = true;
-
- if (hadErr) {
- PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
- PyErr_Print();
- }
- Py_DECREF(result);
+
+
+// Since this one would be tough and ugly to do with the Macros...
+void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
+ bool hadErr = false;
+
+ bool doSave = wxPyRestoreThread();
+ if (m_myInst.findCallback("GetPageInfo")) {
+ PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
+ if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
+ PyObject* val;
+
+ val = PyTuple_GetItem(result, 0);
+ if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
+ else hadErr = true;
+
+ val = PyTuple_GetItem(result, 1);
+ if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
+ else hadErr = true;
+
+ val = PyTuple_GetItem(result, 2);
+ if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
+ else hadErr = true;
+
+ val = PyTuple_GetItem(result, 3);
+ if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
+ else hadErr = true;
}
else
- wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
+ hadErr = true;
- wxPySaveThread(doSave);
+ if (hadErr) {
+ PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
+ PyErr_Print();
+ }
+ Py_DECREF(result);
}
-
- void base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
+ else
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
- }
- PYPRIVATE;
-};
+ wxPySaveThread(doSave);
+}
+
+void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
+ wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
+}
+
IMP_PYCALLBACK_BOOL_INTINT(wxPyPrintout, wxPrintout, OnBeginDocument);
IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnEndDocument);
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
return _resultobj;
}
+static long wxWindow_GetHandle(wxWindow *self) {
+ return (long)self->GetHandle();
+ }
+static PyObject *_wrap_wxWindow_GetHandle(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _result;
+ wxWindow * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetHandle",_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_GetHandle. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (long )wxWindow_GetHandle(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} _resultobj = Py_BuildValue("l",_result);
+ return _resultobj;
+}
+
#define wxWindow_GetId(_swigobj) (_swigobj->GetId())
static PyObject *_wrap_wxWindow_GetId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
-#define wxMenuBar_Checked(_swigobj,_swigarg0) (_swigobj->Checked(_swigarg0))
-static PyObject *_wrap_wxMenuBar_Checked(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuBar_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- bool _result;
wxMenuBar * _arg0;
int _arg1;
+ bool _arg2;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","id", NULL };
+ int tempbool2;
+ char *_kwnames[] = { "self","id","enable", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_Checked",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxMenuBar_Enable",_kwnames,&_argo0,&_arg1,&tempbool2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Checked. Expected _wxMenuBar_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enable. Expected _wxMenuBar_p.");
return NULL;
}
}
+ _arg2 = (bool ) tempbool2;
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (bool )wxMenuBar_Checked(_arg0,_arg1);
+ wxMenuBar_Enable(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
-} _resultobj = Py_BuildValue("i",_result);
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
return _resultobj;
}
-#define wxMenuBar_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuBar_IsChecked(_swigobj,_swigarg0) (_swigobj->IsChecked(_swigarg0))
+static PyObject *_wrap_wxMenuBar_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
+ bool _result;
wxMenuBar * _arg0;
int _arg1;
- bool _arg2;
PyObject * _argo0 = 0;
- int tempbool2;
- char *_kwnames[] = { "self","id","enable", NULL };
+ char *_kwnames[] = { "self","id", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxMenuBar_Enable",_kwnames,&_argo0,&_arg1,&tempbool2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_IsChecked",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enable. Expected _wxMenuBar_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_IsChecked. Expected _wxMenuBar_p.");
return NULL;
}
}
- _arg2 = (bool ) tempbool2;
{
wxPy_BEGIN_ALLOW_THREADS;
- wxMenuBar_Enable(_arg0,_arg1,_arg2);
+ _result = (bool )wxMenuBar_IsChecked(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
+} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
-#define wxMenuBar_Enabled(_swigobj,_swigarg0) (_swigobj->Enabled(_swigarg0))
-static PyObject *_wrap_wxMenuBar_Enabled(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuBar_IsEnabled(_swigobj,_swigarg0) (_swigobj->IsEnabled(_swigarg0))
+static PyObject *_wrap_wxMenuBar_IsEnabled(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMenuBar * _arg0;
char *_kwnames[] = { "self","id", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_Enabled",_kwnames,&_argo0,&_arg1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_IsEnabled",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Enabled. Expected _wxMenuBar_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_IsEnabled. Expected _wxMenuBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (bool )wxMenuBar_Enabled(_arg0,_arg1);
+ _result = (bool )wxMenuBar_IsEnabled(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
+#define wxMenuBar_Replace(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Replace(_swigarg0,_swigarg1,_swigarg2))
+static PyObject *_wrap_wxMenuBar_Replace(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMenu * _result;
+ wxMenuBar * _arg0;
+ size_t _arg1;
+ wxMenu * _arg2;
+ wxString * _arg3;
+ PyObject * _argo0 = 0;
+ PyObject * _argo2 = 0;
+ PyObject * _obj3 = 0;
+ char *_kwnames[] = { "self","pos","menu","title", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxMenuBar_Replace",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Replace. Expected _wxMenuBar_p.");
+ return NULL;
+ }
+ }
+ if (_argo2) {
+ if (_argo2 == Py_None) { _arg2 = NULL; }
+ else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxMenu_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxMenuBar_Replace. Expected _wxMenu_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj3)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxMenu *)wxMenuBar_Replace(_arg0,_arg1,_arg2,*_arg3);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+{
+ if (_obj3)
+ delete _arg3;
+}
+ return _resultobj;
+}
+
+#define wxMenuBar_Remove(_swigobj,_swigarg0) (_swigobj->Remove(_swigarg0))
+static PyObject *_wrap_wxMenuBar_Remove(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMenu * _result;
+ wxMenuBar * _arg0;
+ size_t _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","pos", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_Remove",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_Remove. Expected _wxMenuBar_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxMenu *)wxMenuBar_Remove(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
#define new_wxMenuItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxMenuItem(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
static PyObject *_wrap_new_wxMenuItem(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
-#define wxMenuItem_GetId(_swigobj) (_swigobj->GetId())
-static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuItem_IsSubMenu(_swigobj) (_swigobj->IsSubMenu())
+static PyObject *_wrap_wxMenuItem_IsSubMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- int _result;
+ bool _result;
wxMenuItem * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetId",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_IsSubMenu",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetId. Expected _wxMenuItem_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_IsSubMenu. Expected _wxMenuItem_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (int )wxMenuItem_GetId(_arg0);
+ _result = (bool )wxMenuItem_IsSubMenu(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
-#define wxMenuItem_GetSubMenu(_swigobj) (_swigobj->GetSubMenu())
-static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuItem_GetId(_swigobj) (_swigobj->GetId())
+static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- wxMenu * _result;
+ int _result;
wxMenuItem * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetSubMenu",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetId",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetSubMenu. Expected _wxMenuItem_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetId. Expected _wxMenuItem_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0);
+ _result = (int )wxMenuItem_GetId(_arg0);
wxPy_END_ALLOW_THREADS;
-} if (_result) {
- SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p");
- _resultobj = Py_BuildValue("s",_ptemp);
- } else {
- Py_INCREF(Py_None);
- _resultobj = Py_None;
- }
+} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
-#define wxMenuItem_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
-static PyObject *_wrap_wxMenuItem_SetName(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuItem_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0))
+static PyObject *_wrap_wxMenuItem_SetId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMenuItem * _arg0;
- wxString * _arg1;
+ int _arg1;
PyObject * _argo0 = 0;
- PyObject * _obj1 = 0;
- char *_kwnames[] = { "self","strName", NULL };
+ char *_kwnames[] = { "self","id", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMenuItem_SetName",_kwnames,&_argo0,&_obj1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuItem_SetId",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetName. Expected _wxMenuItem_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetId. Expected _wxMenuItem_p.");
return NULL;
}
}
-{
- if (!PyString_Check(_obj1)) {
- PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
- return NULL;
- }
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
-}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxMenuItem_SetName(_arg0,*_arg1);
+ wxMenuItem_SetId(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
-{
- if (_obj1)
- delete _arg1;
-}
return _resultobj;
}
-#define wxMenuItem_GetName(_swigobj) (_swigobj->GetName())
-static PyObject *_wrap_wxMenuItem_GetName(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxMenuItem_GetSubMenu(_swigobj) (_swigobj->GetSubMenu())
+static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
- wxString * _result;
+ wxMenu * _result;
wxMenuItem * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetName",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetSubMenu",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetName. Expected _wxMenuItem_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetSubMenu. Expected _wxMenuItem_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = new wxString (wxMenuItem_GetName(_arg0));
+ _result = (wxMenu *)wxMenuItem_GetSubMenu(_arg0);
wxPy_END_ALLOW_THREADS;
-}{
- _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
-}
-{
- delete _result;
-}
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
return _resultobj;
}
return _resultobj;
}
+#define wxMenuItem_SetText(_swigobj,_swigarg0) (_swigobj->SetText(_swigarg0))
+static PyObject *_wrap_wxMenuItem_SetText(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMenuItem * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","str", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMenuItem_SetText",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetText. Expected _wxMenuItem_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxMenuItem_SetText(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxMenuItem_GetText(_swigobj) (_swigobj->GetText())
+static PyObject *_wrap_wxMenuItem_GetText(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxMenuItem * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetText",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_GetText. Expected _wxMenuItem_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ const wxString & _result_ref = wxMenuItem_GetText(_arg0);
+ _result = (wxString *) &_result_ref;
+
+ wxPy_END_ALLOW_THREADS;
+}{
+ _resultobj = PyString_FromString(WXSTRINGCAST (*_result));
+}
+ return _resultobj;
+}
+
#define wxMenuItem_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0))
static PyObject *_wrap_wxMenuItem_SetTextColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+#define wxMenuItem_SetCheckable(_swigobj,_swigarg0) (_swigobj->SetCheckable(_swigarg0))
+static PyObject *_wrap_wxMenuItem_SetCheckable(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMenuItem * _arg0;
+ bool _arg1;
+ PyObject * _argo0 = 0;
+ int tempbool1;
+ char *_kwnames[] = { "self","checkable", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuItem_SetCheckable",_kwnames,&_argo0,&tempbool1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetCheckable. Expected _wxMenuItem_p.");
+ return NULL;
+ }
+ }
+ _arg1 = (bool ) tempbool1;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxMenuItem_SetCheckable(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxMenuItem_SetSubMenu(_swigobj,_swigarg0) (_swigobj->SetSubMenu(_swigarg0))
+static PyObject *_wrap_wxMenuItem_SetSubMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMenuItem * _arg0;
+ wxMenu * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","menu", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMenuItem_SetSubMenu",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuItem_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_SetSubMenu. Expected _wxMenuItem_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMenu_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenuItem_SetSubMenu. Expected _wxMenu_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxMenuItem_SetSubMenu(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static PyMethodDef windowscMethods[] = {
+ { "wxMenuItem_SetSubMenu", (PyCFunction) _wrap_wxMenuItem_SetSubMenu, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuItem_SetCheckable", (PyCFunction) _wrap_wxMenuItem_SetCheckable, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_DeleteSubMenu", (PyCFunction) _wrap_wxMenuItem_DeleteSubMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_SetTextColour", (PyCFunction) _wrap_wxMenuItem_SetTextColour, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuItem_GetText", (PyCFunction) _wrap_wxMenuItem_GetText, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuItem_SetText", (PyCFunction) _wrap_wxMenuItem_SetText, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_SetMarginWidth", (PyCFunction) _wrap_wxMenuItem_SetMarginWidth, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_SetFont", (PyCFunction) _wrap_wxMenuItem_SetFont, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_SetBitmaps", (PyCFunction) _wrap_wxMenuItem_SetBitmaps, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_Enable", (PyCFunction) _wrap_wxMenuItem_Enable, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_SetHelp", (PyCFunction) _wrap_wxMenuItem_SetHelp, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_GetHelp", (PyCFunction) _wrap_wxMenuItem_GetHelp, METH_VARARGS | METH_KEYWORDS },
- { "wxMenuItem_GetName", (PyCFunction) _wrap_wxMenuItem_GetName, METH_VARARGS | METH_KEYWORDS },
- { "wxMenuItem_SetName", (PyCFunction) _wrap_wxMenuItem_SetName, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_GetSubMenu", (PyCFunction) _wrap_wxMenuItem_GetSubMenu, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuItem_SetId", (PyCFunction) _wrap_wxMenuItem_SetId, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_GetId", (PyCFunction) _wrap_wxMenuItem_GetId, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuItem_IsSubMenu", (PyCFunction) _wrap_wxMenuItem_IsSubMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_IsCheckable", (PyCFunction) _wrap_wxMenuItem_IsCheckable, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_IsChecked", (PyCFunction) _wrap_wxMenuItem_IsChecked, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_IsEnabled", (PyCFunction) _wrap_wxMenuItem_IsEnabled, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuItem_IsSeparator", (PyCFunction) _wrap_wxMenuItem_IsSeparator, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMenuItem", (PyCFunction) _wrap_new_wxMenuItem, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuBar_Remove", (PyCFunction) _wrap_wxMenuBar_Remove, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuBar_Replace", (PyCFunction) _wrap_wxMenuBar_Replace, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_Refresh", (PyCFunction) _wrap_wxMenuBar_Refresh, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_GetMenu", (PyCFunction) _wrap_wxMenuBar_GetMenu, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_GetMenuCount", (PyCFunction) _wrap_wxMenuBar_GetMenuCount, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_SetLabel", (PyCFunction) _wrap_wxMenuBar_SetLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_FindItemForId", (PyCFunction) _wrap_wxMenuBar_FindItemForId, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_FindMenuItem", (PyCFunction) _wrap_wxMenuBar_FindMenuItem, METH_VARARGS | METH_KEYWORDS },
- { "wxMenuBar_Enabled", (PyCFunction) _wrap_wxMenuBar_Enabled, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuBar_IsEnabled", (PyCFunction) _wrap_wxMenuBar_IsEnabled, METH_VARARGS | METH_KEYWORDS },
+ { "wxMenuBar_IsChecked", (PyCFunction) _wrap_wxMenuBar_IsChecked, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_Enable", (PyCFunction) _wrap_wxMenuBar_Enable, METH_VARARGS | METH_KEYWORDS },
- { "wxMenuBar_Checked", (PyCFunction) _wrap_wxMenuBar_Checked, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_Check", (PyCFunction) _wrap_wxMenuBar_Check, METH_VARARGS | METH_KEYWORDS },
{ "wxMenuBar_Append", (PyCFunction) _wrap_wxMenuBar_Append, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMenuBar", (PyCFunction) _wrap_new_wxMenuBar, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetLabel", (PyCFunction) _wrap_wxWindow_SetLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetLabel", (PyCFunction) _wrap_wxWindow_GetLabel, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetId", (PyCFunction) _wrap_wxWindow_GetId, METH_VARARGS | METH_KEYWORDS },
+ { "wxWindow_GetHandle", (PyCFunction) _wrap_wxWindow_GetHandle, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetGrandParent", (PyCFunction) _wrap_wxWindow_GetGrandParent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetForegroundColour", (PyCFunction) _wrap_wxWindow_GetForegroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetFont", (PyCFunction) _wrap_wxWindow_GetFont, METH_VARARGS | METH_KEYWORDS },
{ "_class_wxWindow","_wxWindow",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxScreenDC","_wxScreenDC",0},
{ "_wxPalette","_class_wxPalette",0},
{ "_wxRegion","_class_wxRegion",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
val = apply(windowsc.wxWindow_GetGrandParent,(self,) + _args, _kwargs)
if val: val = wxWindowPtr(val)
return val
+ def GetHandle(self, *_args, **_kwargs):
+ val = apply(windowsc.wxWindow_GetHandle,(self,) + _args, _kwargs)
+ return val
def GetId(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_GetId,(self,) + _args, _kwargs)
return val
def Check(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_Check,(self,) + _args, _kwargs)
return val
- def Checked(self, *_args, **_kwargs):
- val = apply(windowsc.wxMenuBar_Checked,(self,) + _args, _kwargs)
- return val
def Enable(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_Enable,(self,) + _args, _kwargs)
return val
- def Enabled(self, *_args, **_kwargs):
- val = apply(windowsc.wxMenuBar_Enabled,(self,) + _args, _kwargs)
+ def IsChecked(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuBar_IsChecked,(self,) + _args, _kwargs)
+ return val
+ def IsEnabled(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuBar_IsEnabled,(self,) + _args, _kwargs)
return val
def FindMenuItem(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_FindMenuItem,(self,) + _args, _kwargs)
def Refresh(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuBar_Refresh,(self,) + _args, _kwargs)
return val
+ def Replace(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuBar_Replace,(self,) + _args, _kwargs)
+ if val: val = wxMenuPtr(val)
+ return val
+ def Remove(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuBar_Remove,(self,) + _args, _kwargs)
+ if val: val = wxMenuPtr(val)
+ return val
def __repr__(self):
return "<C wxMenuBar instance at %s>" % (self.this,)
class wxMenuBar(wxMenuBarPtr):
def IsCheckable(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_IsCheckable,(self,) + _args, _kwargs)
return val
+ def IsSubMenu(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuItem_IsSubMenu,(self,) + _args, _kwargs)
+ return val
def GetId(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_GetId,(self,) + _args, _kwargs)
return val
+ def SetId(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuItem_SetId,(self,) + _args, _kwargs)
+ return val
def GetSubMenu(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_GetSubMenu,(self,) + _args, _kwargs)
if val: val = wxMenuPtr(val)
return val
- def SetName(self, *_args, **_kwargs):
- val = apply(windowsc.wxMenuItem_SetName,(self,) + _args, _kwargs)
- return val
- def GetName(self, *_args, **_kwargs):
- val = apply(windowsc.wxMenuItem_GetName,(self,) + _args, _kwargs)
- return val
def GetHelp(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_GetHelp,(self,) + _args, _kwargs)
return val
def SetMarginWidth(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_SetMarginWidth,(self,) + _args, _kwargs)
return val
+ def SetText(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuItem_SetText,(self,) + _args, _kwargs)
+ return val
+ def GetText(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuItem_GetText,(self,) + _args, _kwargs)
+ return val
def SetTextColour(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_SetTextColour,(self,) + _args, _kwargs)
return val
def DeleteSubMenu(self, *_args, **_kwargs):
val = apply(windowsc.wxMenuItem_DeleteSubMenu,(self,) + _args, _kwargs)
return val
+ def SetCheckable(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuItem_SetCheckable,(self,) + _args, _kwargs)
+ return val
+ def SetSubMenu(self, *_args, **_kwargs):
+ val = apply(windowsc.wxMenuItem_SetSubMenu,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxMenuItem instance at %s>" % (self.this,)
class wxMenuItem(wxMenuItemPtr):
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_class_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxSplitterEvent",SwigwxSplitterEventTowxCommandEvent},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent},
{ "_class_wxPNGHandler","_wxPNGHandler",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
+ { "_wxBusyCursor","_class_wxBusyCursor",0},
{ "_wxPageSetupDialog","_class_wxPageSetupDialog",0},
{ "_class_wxPrinter","_wxPrinter",0},
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
{ "_class_wxStaticBitmap","_wxStaticBitmap",0},
+ { "_class_wxBusyCursor","_wxBusyCursor",0},
{ "_wxMDIChildFrame","_class_wxMDIChildFrame",0},
{ "_wxListItem","_class_wxListItem",0},
{ "_class_wxToolBar","_wxToolBar",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
+ { "_wxBusyInfo","_class_wxBusyInfo",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
{ "_wxClientDC","_class_wxClientDC",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
+ { "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
PyDict_SetItemString(d,"wxSB_HORIZONTAL", PyInt_FromLong((long) wxSB_HORIZONTAL));
PyDict_SetItemString(d,"wxSB_VERTICAL", PyInt_FromLong((long) wxSB_VERTICAL));
PyDict_SetItemString(d,"wxST_SIZEGRIP", PyInt_FromLong((long) wxST_SIZEGRIP));
+ PyDict_SetItemString(d,"wxST_NO_AUTORESIZE", PyInt_FromLong((long) wxST_NO_AUTORESIZE));
PyDict_SetItemString(d,"wxBU_AUTODRAW", PyInt_FromLong((long) wxBU_AUTODRAW));
PyDict_SetItemString(d,"wxBU_NOAUTODRAW", PyInt_FromLong((long) wxBU_NOAUTODRAW));
PyDict_SetItemString(d,"wxTR_HAS_BUTTONS", PyInt_FromLong((long) wxTR_HAS_BUTTONS));
PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE));
PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY));
PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT));
+ PyDict_SetItemString(d,"wxFILE_MUST_EXIST", PyInt_FromLong((long) wxFILE_MUST_EXIST));
PyDict_SetItemString(d,"wxACCEL_ALT", PyInt_FromLong((long) wxACCEL_ALT));
PyDict_SetItemString(d,"wxACCEL_CTRL", PyInt_FromLong((long) wxACCEL_CTRL));
PyDict_SetItemString(d,"wxACCEL_SHIFT", PyInt_FromLong((long) wxACCEL_SHIFT));
PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGED));
PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TREE_SEL_CHANGING));
PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_KEY_DOWN", PyInt_FromLong((long) wxEVT_COMMAND_TREE_KEY_DOWN));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_ACTIVATED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_ACTIVATED));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK));
+ PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK));
PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_DRAG));
PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_RDRAG", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_RDRAG));
PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT", PyInt_FromLong((long) wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT));
wxSB_HORIZONTAL = wxc.wxSB_HORIZONTAL
wxSB_VERTICAL = wxc.wxSB_VERTICAL
wxST_SIZEGRIP = wxc.wxST_SIZEGRIP
+wxST_NO_AUTORESIZE = wxc.wxST_NO_AUTORESIZE
wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
wxTR_HAS_BUTTONS = wxc.wxTR_HAS_BUTTONS
wxSAVE = wxc.wxSAVE
wxHIDE_READONLY = wxc.wxHIDE_READONLY
wxOVERWRITE_PROMPT = wxc.wxOVERWRITE_PROMPT
+wxFILE_MUST_EXIST = wxc.wxFILE_MUST_EXIST
wxACCEL_ALT = wxc.wxACCEL_ALT
wxACCEL_CTRL = wxc.wxACCEL_CTRL
wxACCEL_SHIFT = wxc.wxACCEL_SHIFT
wxEVT_COMMAND_TREE_SEL_CHANGED = wxc.wxEVT_COMMAND_TREE_SEL_CHANGED
wxEVT_COMMAND_TREE_SEL_CHANGING = wxc.wxEVT_COMMAND_TREE_SEL_CHANGING
wxEVT_COMMAND_TREE_KEY_DOWN = wxc.wxEVT_COMMAND_TREE_KEY_DOWN
+wxEVT_COMMAND_TREE_ITEM_ACTIVATED = wxc.wxEVT_COMMAND_TREE_ITEM_ACTIVATED
+wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = wxc.wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK
+wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = wxc.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK
wxEVT_COMMAND_LIST_BEGIN_DRAG = wxc.wxEVT_COMMAND_LIST_BEGIN_DRAG
wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxc.wxEVT_COMMAND_LIST_BEGIN_RDRAG
wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
def EVT_TREE_DELETE_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
+def EVT_TREE_ITEM_ACTIVATED(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func)
+
+def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func)
+
+def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func)
+
# wxSpinButton
def EVT_SPIN_UP(win, id, func):
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: printfw.h
+// Purpose: Exposing the class definition of wxPyPrintout so it can be
+// used by wxHtmlPrintout. Must be included after helpers.h
+//
+// Author: Robin Dunn
+//
+// Created: 29-Oct-1999
+// RCS-ID: $Id$
+// Copyright: (c) 1999 by Total Control Software
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+class wxPyPrintout : public wxPrintout {
+public:
+ wxPyPrintout(const wxString& title) : wxPrintout(title) {}
+
+ DEC_PYCALLBACK_BOOL_INTINT(OnBeginDocument);
+ DEC_PYCALLBACK__(OnEndDocument);
+ DEC_PYCALLBACK__(OnBeginPrinting);
+ DEC_PYCALLBACK__(OnEndPrinting);
+ DEC_PYCALLBACK__(OnPreparePrinting);
+ DEC_PYCALLBACK_BOOL_INT_pure(OnPrintPage);
+ DEC_PYCALLBACK_BOOL_INT(HasPage);
+
+ // Since this one would be tough and ugly to do with the Macros...
+ void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
+ void base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
+
+ PYPRIVATE;
+};
#include "helpers.h"
#include <wx/print.h>
#include <wx/printdlg.h>
+
+#include "printfw.h"
%}
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// Custom wxPrintout class that knows how to call python
%{
-class wxPyPrintout : public wxPrintout {
-public:
- wxPyPrintout(const wxString& title) : wxPrintout(title) {}
-
- DEC_PYCALLBACK_BOOL_INTINT(OnBeginDocument);
- DEC_PYCALLBACK__(OnEndDocument);
- DEC_PYCALLBACK__(OnBeginPrinting);
- DEC_PYCALLBACK__(OnEndPrinting);
- DEC_PYCALLBACK__(OnPreparePrinting);
- DEC_PYCALLBACK_BOOL_INT_pure(OnPrintPage);
- DEC_PYCALLBACK_BOOL_INT(HasPage);
-
-
- // Since this one would be tough and ugly to do with the Macros...
- void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
- bool hadErr = false;
-
- bool doSave = wxPyRestoreThread();
- if (m_myInst.findCallback("GetPageInfo")) {
- PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
- if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
- PyObject* val;
-
- val = PyTuple_GetItem(result, 0);
- if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
- else hadErr = true;
-
- val = PyTuple_GetItem(result, 1);
- if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
- else hadErr = true;
-
- val = PyTuple_GetItem(result, 2);
- if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
- else hadErr = true;
-
- val = PyTuple_GetItem(result, 3);
- if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
- else hadErr = true;
- }
- else
- hadErr = true;
-
- if (hadErr) {
- PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
- PyErr_Print();
- }
- Py_DECREF(result);
+
+
+// Since this one would be tough and ugly to do with the Macros...
+void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
+ bool hadErr = false;
+
+ bool doSave = wxPyRestoreThread();
+ if (m_myInst.findCallback("GetPageInfo")) {
+ PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
+ if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
+ PyObject* val;
+
+ val = PyTuple_GetItem(result, 0);
+ if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
+ else hadErr = true;
+
+ val = PyTuple_GetItem(result, 1);
+ if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
+ else hadErr = true;
+
+ val = PyTuple_GetItem(result, 2);
+ if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
+ else hadErr = true;
+
+ val = PyTuple_GetItem(result, 3);
+ if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
+ else hadErr = true;
}
else
- wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
+ hadErr = true;
- wxPySaveThread(doSave);
+ if (hadErr) {
+ PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
+ PyErr_Print();
+ }
+ Py_DECREF(result);
}
-
- void base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
+ else
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
- }
- PYPRIVATE;
-};
+ wxPySaveThread(doSave);
+}
+
+void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
+ wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
+}
+
IMP_PYCALLBACK_BOOL_INTINT(wxPyPrintout, wxPrintout, OnBeginDocument);
IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnEndDocument);
}
}
-
int GetCharHeight();
int GetCharWidth();
%name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
wxFont& GetFont();
wxColour GetForegroundColour();
wxWindow * GetGrandParent();
+ %addmethods {
+ long GetHandle() {
+ return (long)self->GetHandle();
+ }
+ }
int GetId();
wxString GetLabel();
void SetLabel(const wxString& label);
void Append(wxMenu *menu, const wxString& title);
void Check(int id, bool flag);
- bool Checked(int id);
+// bool Checked(int id);
void Enable(int id, bool enable);
- bool Enabled(int id);
+// bool Enabled(int id);
+ bool IsChecked(int id);
+ bool IsEnabled(int id);
int FindMenuItem(const wxString& menuString, const wxString& itemString);
wxMenuItem * FindItemForId(int id);
void SetLabel(int id, const wxString& label);
int GetMenuCount();
wxMenu* GetMenu(int i);
void Refresh();
+ wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
+ wxMenu *Remove(size_t pos);
+
};
class wxMenuItem {
public:
-#ifndef __WXGTK__
+//#ifndef __WXGTK__
wxMenuItem(wxMenu* parentMenu=NULL, int id=ID_SEPARATOR,
const wxString& text = wxPyEmptyStr,
const wxString& helpString = wxPyEmptyStr,
bool checkable = FALSE, wxMenu* subMenu = NULL);
-#else
- wxMenuItem();
-#endif
+//#else
+// wxMenuItem();
+//#endif
bool IsSeparator();
bool IsEnabled();
bool IsChecked();
bool IsCheckable();
+ bool IsSubMenu();
int GetId();
+ void SetId(int id);
wxMenu* GetSubMenu();
- void SetName(const wxString& strName);
- wxString GetName();
wxString GetHelp();
void SetHelp(const wxString& strHelp);
void Enable(bool bDoEnable = TRUE);
void Check(bool bDoCheck = TRUE);
-#ifdef __WXMSW__
+//#ifdef __WXMSW__
wxColour& GetBackgroundColour();
wxBitmap GetBitmap(bool checked = TRUE);
wxFont& GetFont();
void SetBitmaps(const wxBitmap& checked, const wxBitmap& unchecked = wxNullBitmap);
void SetFont(const wxFont& font);
void SetMarginWidth(int width);
+ void SetText(const wxString& str);
+ const wxString& GetText();
void SetTextColour(const wxColour& colour);
void DeleteSubMenu();
-#endif
+ void SetCheckable(bool checkable);
+ void SetSubMenu(wxMenu *menu);
+//#endif
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
-/////////////////////////////////////////////////////////////////////////////
-//
-// $Log$
-// Revision 1.2 1999/04/30 03:29:19 RD
-// wxPython 2.0b9, first phase (win32)
-// Added gobs of stuff, see wxPython/README.txt for details
-//
-// Revision 1.1 1999/01/30 07:30:16 RD
-//
-// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
-//
-// Various cleanup, tweaks, minor additions, etc. to maintain
-// compatibility with the current wxWindows.
-//
-//
-//
+
+
+
+//---------------------------------------------------------------------------