Added wxPython support of new HTML Printing classes.

Fixed thread problem
Other miscellaneous fixes, minor additions, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 1999-10-29 22:25:04 +00:00
parent dc2f8a65c0
commit 2abc0a0f9b
32 changed files with 789 additions and 244 deletions

View File

@ -63,6 +63,8 @@ an EVT_SIZE handler that calls Layout().
Fixed deadlock problem that happened when using threads.
Added new HTML printing classes.
@ -120,7 +122,7 @@ wxGTK. Added them back in since the methods exist now.
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
@ -196,7 +198,7 @@ in the wxWindows docs...
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

View File

@ -194,6 +194,9 @@ class wxPythonDemo(wxFrame):
self.tree.EnsureVisible(selectedDemo)
self.WriteText('window handle: %s\n' % self.GetHandle())
#---------------------------------------------
def WriteText(self, text):
self.log.WriteText(text)

View File

@ -278,6 +278,7 @@ enum {
wxSB_HORIZONTAL,
wxSB_VERTICAL,
wxST_SIZEGRIP,
wxST_NO_AUTORESIZE,
wxBU_AUTODRAW,
wxBU_NOAUTODRAW,
wxTR_HAS_BUTTONS,
@ -428,6 +429,7 @@ enum {
wxSAVE,
wxHIDE_READONLY,
wxOVERWRITE_PROMPT,
wxFILE_MUST_EXIST,
wxACCEL_ALT,
wxACCEL_CTRL,
@ -905,6 +907,9 @@ enum wxEventType {
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,

View File

@ -472,6 +472,15 @@ def EVT_TREE_KEY_DOWN(win, id, func):
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):

View File

@ -298,7 +298,7 @@ HELPEREXPORT bool wxPyRestoreThread() {
// 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;

View File

@ -16,6 +16,7 @@
#include "helpers.h"
#include <wx/resource.h>
#include <wx/tooltip.h>
#include <wx/busyinfo.h>
%}
//----------------------------------------------------------------------
@ -328,6 +329,15 @@ public:
};
//---------------------------------------------------------------------------
class wxBusyInfo {
public:
wxBusyInfo(const wxString& message);
~wxBusyInfo();
};
//---------------------------------------------------------------------------

View File

@ -328,6 +328,18 @@ public:
const wxString& encoding);
};
#endif
//----------------------------------------------------------------------
class wxBusyCursor {
public:
wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
~wxBusyCursor();
};
//----------------------------------------------------------------------
//----------------------------------------------------------------------
//----------------------------------------------------------------------

View File

@ -2906,6 +2906,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -3016,6 +3017,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -7258,6 +7258,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -7423,6 +7424,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -6110,6 +6110,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -6212,6 +6213,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -5334,6 +5334,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -5390,6 +5391,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -1126,6 +1126,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1219,6 +1220,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -7399,6 +7399,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -7446,6 +7447,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -1802,6 +1802,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1865,6 +1866,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -882,6 +882,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -978,6 +979,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -56,6 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
#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;
@ -3807,7 +3808,74 @@ static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args,
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 },
@ -4002,6 +4070,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -4034,6 +4103,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxRegionIterator","_class_wxRegionIterator",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
{ "_wxRegion","_class_wxRegion",0},
{ "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxSize","_wxSize",0},
{0,0,0}};

View File

@ -504,6 +504,23 @@ class wxAcceleratorTable(wxAcceleratorTablePtr):
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 ------------------

View File

@ -1714,7 +1714,70 @@ static PyObject *_wrap_wxCaret_OnKillFocus(PyObject *self, PyObject *args, PyObj
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 },
@ -1809,6 +1872,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1824,6 +1888,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1855,6 +1920,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1906,6 +1972,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -89,6 +89,23 @@ class wxCaret(wxCaretPtr):
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 ------------------

View File

@ -57,6 +57,8 @@ extern PyObject *SWIG_newvarlink(void);
#include <wx/print.h>
#include <wx/printdlg.h>
#include "printfw.h"
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
@ -106,66 +108,53 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
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;
// 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;
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, 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, 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, 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);
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);
@ -4546,6 +4535,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -4650,6 +4640,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -1567,6 +1567,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1666,6 +1667,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -2715,6 +2715,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -2808,6 +2809,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -1666,6 +1666,35 @@ static PyObject *_wrap_wxWindow_GetGrandParent(PyObject *self, PyObject *args, P
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;
@ -6330,34 +6359,6 @@ static PyObject *_wrap_wxMenuBar_Check(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxMenuBar_Checked(_swigobj,_swigarg0) (_swigobj->Checked(_swigarg0))
static PyObject *_wrap_wxMenuBar_Checked(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMenuBar * _arg0;
int _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","id", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_Checked",_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_Checked. Expected _wxMenuBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMenuBar_Checked(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxMenuBar_Enable(_swigobj,_swigarg0,_swigarg1) (_swigobj->Enable(_swigarg0,_swigarg1))
static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -6389,8 +6390,8 @@ static PyObject *_wrap_wxMenuBar_Enable(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxMenuBar_Enabled(_swigobj,_swigarg0) (_swigobj->Enabled(_swigarg0))
static PyObject *_wrap_wxMenuBar_Enabled(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;
@ -6399,18 +6400,46 @@ static PyObject *_wrap_wxMenuBar_Enabled(PyObject *self, PyObject *args, PyObjec
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_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_Enabled. Expected _wxMenuBar_p.");
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_IsChecked. Expected _wxMenuBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMenuBar_Enabled(_arg0,_arg1);
_result = (bool )wxMenuBar_IsChecked(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#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;
int _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","id", NULL };
self = self;
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_IsEnabled. Expected _wxMenuBar_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMenuBar_IsEnabled(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
@ -6847,6 +6876,98 @@ static PyObject *_wrap_wxMenuBar_Refresh(PyObject *self, PyObject *args, PyObjec
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;
@ -7030,6 +7151,33 @@ static PyObject *_wrap_wxMenuItem_IsCheckable(PyObject *self, PyObject *args, Py
return _resultobj;
}
#define wxMenuItem_IsSubMenu(_swigobj) (_swigobj->IsSubMenu())
static PyObject *_wrap_wxMenuItem_IsSubMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxMenuItem * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
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_IsSubMenu. Expected _wxMenuItem_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxMenuItem_IsSubMenu(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxMenuItem_GetId(_swigobj) (_swigobj->GetId())
static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -7057,6 +7205,34 @@ static PyObject *_wrap_wxMenuItem_GetId(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxMenuItem_SetId(_swigobj,_swigarg0) (_swigobj->SetId(_swigarg0))
static PyObject *_wrap_wxMenuItem_SetId(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMenuItem * _arg0;
int _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","id", NULL };
self = self;
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_SetId. Expected _wxMenuItem_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxMenuItem_SetId(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxMenuItem_GetSubMenu(_swigobj) (_swigobj->GetSubMenu())
static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -7091,78 +7267,6 @@ static PyObject *_wrap_wxMenuItem_GetSubMenu(PyObject *self, PyObject *args, PyO
return _resultobj;
}
#define wxMenuItem_SetName(_swigobj,_swigarg0) (_swigobj->SetName(_swigarg0))
static PyObject *_wrap_wxMenuItem_SetName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMenuItem * _arg0;
wxString * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","strName", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMenuItem_SetName",_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_SetName. 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);
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) {
PyObject * _resultobj;
wxString * _result;
wxMenuItem * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuItem_GetName",_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.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxString (wxMenuItem_GetName(_arg0));
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
}
{
delete _result;
}
return _resultobj;
}
#define wxMenuItem_GetHelp(_swigobj) (_swigobj->GetHelp())
static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@ -7604,6 +7708,76 @@ static PyObject *_wrap_wxMenuItem_SetMarginWidth(PyObject *self, PyObject *args,
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;
@ -7667,9 +7841,79 @@ static PyObject *_wrap_wxMenuItem_DeleteSubMenu(PyObject *self, PyObject *args,
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 },
@ -7683,15 +7927,17 @@ static PyMethodDef windowscMethods[] = {
{ "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 },
@ -7704,9 +7950,9 @@ static PyMethodDef windowscMethods[] = {
{ "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 },
@ -7839,6 +8085,7 @@ static PyMethodDef windowscMethods[] = {
{ "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 },
@ -8005,6 +8252,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -8058,6 +8306,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -195,6 +195,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
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
@ -675,14 +678,14 @@ class wxMenuBarPtr(wxEvtHandlerPtr):
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)
@ -722,6 +725,14 @@ class wxMenuBarPtr(wxEvtHandlerPtr):
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):
@ -748,19 +759,19 @@ class wxMenuItemPtr :
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
@ -804,12 +815,24 @@ class wxMenuItemPtr :
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):

View File

@ -5563,6 +5563,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -5658,6 +5659,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -1925,6 +1925,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -2024,6 +2025,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},

View File

@ -1766,6 +1766,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1820,6 +1821,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -1890,6 +1892,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -2012,6 +2015,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_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},
@ -2165,6 +2169,7 @@ SWIGEXPORT(void) initwxc() {
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));
@ -2309,6 +2314,7 @@ SWIGEXPORT(void) initwxc() {
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));
@ -2695,6 +2701,9 @@ SWIGEXPORT(void) initwxc() {
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));

View File

@ -264,6 +264,7 @@ wxSL_SELRANGE = wxc.wxSL_SELRANGE
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
@ -408,6 +409,7 @@ wxOPEN = wxc.wxOPEN
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
@ -794,6 +796,9 @@ wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxc.wxEVT_COMMAND_TREE_ITEM_COLLAPSING
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
@ -1301,6 +1306,15 @@ def EVT_TREE_KEY_DOWN(win, id, func):
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):

View File

@ -0,0 +1,33 @@
/////////////////////////////////////////////////////////////////////////////
// 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;
};

View File

@ -16,6 +16,8 @@
#include "helpers.h"
#include <wx/print.h>
#include <wx/printdlg.h>
#include "printfw.h"
%}
//----------------------------------------------------------------------
@ -198,66 +200,53 @@ public:
//----------------------------------------------------------------------
// 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;
// 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;
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, 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, 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, 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);
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);

View File

@ -190,7 +190,6 @@ public:
}
}
int GetCharHeight();
int GetCharWidth();
%name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
@ -201,6 +200,11 @@ public:
wxFont& GetFont();
wxColour GetForegroundColour();
wxWindow * GetGrandParent();
%addmethods {
long GetHandle() {
return (long)self->GetHandle();
}
}
int GetId();
wxString GetLabel();
void SetLabel(const wxString& label);
@ -490,9 +494,11 @@ public:
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);
@ -505,6 +511,9 @@ public:
int GetMenuCount();
wxMenu* GetMenu(int i);
void Refresh();
wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
wxMenu *Remove(size_t pos);
};
@ -512,29 +521,29 @@ public:
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();
@ -544,9 +553,13 @@ public:
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
};
//---------------------------------------------------------------------------

View File

@ -181,19 +181,7 @@ public:
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $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.
//
//
//
//---------------------------------------------------------------------------