Update SWIG patch to output "True" ("False") in the autodoc string

when "true" ("false") is in the .i file.

Changed the .i files to use true/false to avoid collisions with any
True/False in headers that may be included.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-09-23 20:23:54 +00:00
parent f2ac038698
commit a72f4631fe
64 changed files with 425 additions and 426 deletions

View File

@@ -4,7 +4,7 @@ RCS file: /cvsroot/swig/SWIG/Doc/Manual/Python.html,v
retrieving revision 1.18 retrieving revision 1.18
diff -u -4 -r1.18 Python.html diff -u -4 -r1.18 Python.html
--- Doc/Manual/Python.html 2 Sep 2004 20:27:14 -0000 1.18 --- Doc/Manual/Python.html 2 Sep 2004 20:27:14 -0000 1.18
+++ Doc/Manual/Python.html 6 Sep 2004 21:06:11 -0000 +++ Doc/Manual/Python.html 23 Sep 2004 00:31:44 -0000
@@ -86,8 +86,15 @@ @@ -86,8 +86,15 @@
<li><a href="#Python_nn62">Mapping Python tuples into small arrays</a> <li><a href="#Python_nn62">Mapping Python tuples into small arrays</a>
<li><a href="#Python_nn63">Mapping sequences to C arrays</a> <li><a href="#Python_nn63">Mapping sequences to C arrays</a>
@@ -282,7 +282,7 @@ RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v
retrieving revision 1.50 retrieving revision 1.50
diff -u -4 -r1.50 python.cxx diff -u -4 -r1.50 python.cxx
--- Source/Modules/python.cxx 1 Sep 2004 22:25:56 -0000 1.50 --- Source/Modules/python.cxx 1 Sep 2004 22:25:56 -0000 1.50
+++ Source/Modules/python.cxx 6 Sep 2004 21:06:11 -0000 +++ Source/Modules/python.cxx 23 Sep 2004 00:31:44 -0000
@@ -19,8 +19,9 @@ @@ -19,8 +19,9 @@
static String *const_code = 0; static String *const_code = 0;
@@ -413,7 +413,7 @@ diff -u -4 -r1.50 python.cxx
} }
@@ -440,24 +486,303 @@ @@ -440,24 +486,307 @@
} }
@@ -662,6 +662,10 @@ diff -u -4 -r1.50 python.cxx
+ if (value) { + if (value) {
+ if (Strcmp(value, "NULL") == 0) + if (Strcmp(value, "NULL") == 0)
+ value = NewString("None"); + value = NewString("None");
+ else if (Strcmp(value, "true") == 0 || Strcmp(value, "TRUE") == 0)
+ value = NewString("True");
+ else if (Strcmp(value, "false") == 0 || Strcmp(value, "FALSE") == 0)
+ value = NewString("False");
+ else { + else {
+ lookup = Swig_symbol_clookup(value, 0); + lookup = Swig_symbol_clookup(value, 0);
+ if (lookup) + if (lookup)
@@ -725,7 +729,7 @@ diff -u -4 -r1.50 python.cxx
if (*t == '{') { if (*t == '{') {
Delitem(str ,0); Delitem(str ,0);
Delitem(str,DOH_END); Delitem(str,DOH_END);
@@ -1686,9 +2011,18 @@ @@ -1686,9 +2015,18 @@
mod = Getattr(n,"module"); mod = Getattr(n,"module");
if (mod) { if (mod) {
String *modname = Getattr(mod,"name"); String *modname = Getattr(mod,"name");
@@ -745,7 +749,7 @@ diff -u -4 -r1.50 python.cxx
importname = NewString(Getattr(n,"sym:name")); importname = NewString(Getattr(n,"sym:name"));
} }
Setattr(n,"python:proxy",importname); Setattr(n,"python:proxy",importname);
@@ -1760,9 +2094,11 @@ @@ -1760,9 +2098,11 @@
Printf(f_shadow, modern ? "(object)" : "(_object)"); Printf(f_shadow, modern ? "(object)" : "(_object)");
} }
} }
@@ -758,7 +762,7 @@ diff -u -4 -r1.50 python.cxx
Printv(f_shadow,tab4,"__swig_setmethods__ = {}\n",NIL); Printv(f_shadow,tab4,"__swig_setmethods__ = {}\n",NIL);
if (Len(base_class)) { if (Len(base_class)) {
Printf(f_shadow,"%sfor _s in [%s]: __swig_setmethods__.update(_s.__swig_setmethods__)\n",tab4,base_class); Printf(f_shadow,"%sfor _s in [%s]: __swig_setmethods__.update(_s.__swig_setmethods__)\n",tab4,base_class);
@@ -1906,16 +2242,24 @@ @@ -1906,16 +2246,24 @@
Delete(pyaction); Delete(pyaction);
Printv(f_shadow,pycode,"\n",NIL); Printv(f_shadow,pycode,"\n",NIL);
} else { } else {
@@ -790,7 +794,7 @@ diff -u -4 -r1.50 python.cxx
} }
} }
@@ -1930,14 +2274,22 @@ @@ -1930,14 +2278,22 @@
virtual int staticmemberfunctionHandler(Node *n) { virtual int staticmemberfunctionHandler(Node *n) {
String *symname = Getattr(n,"sym:name"); String *symname = Getattr(n,"sym:name");
Language::staticmemberfunctionHandler(n); Language::staticmemberfunctionHandler(n);
@@ -817,7 +821,7 @@ diff -u -4 -r1.50 python.cxx
" = staticmethod(", symname, ")\n", NIL); " = staticmethod(", symname, ")\n", NIL);
if (!modern) { if (!modern) {
@@ -2022,8 +2374,12 @@ @@ -2022,8 +2378,12 @@
} }
Printv(f_shadow, tab4, "def __init__(self, *args", Printv(f_shadow, tab4, "def __init__(self, *args",
@@ -830,7 +834,7 @@ diff -u -4 -r1.50 python.cxx
if (!modern) { if (!modern) {
Printv(f_shadow, tab8, "_swig_setattr(self, ", rclassname, ", 'this', ", Printv(f_shadow, tab8, "_swig_setattr(self, ", rclassname, ", 'this', ",
funcCallHelper(Swig_name_construct(symname), allow_kwargs), ")\n", NIL); funcCallHelper(Swig_name_construct(symname), allow_kwargs), ")\n", NIL);
@@ -2036,10 +2392,10 @@ @@ -2036,10 +2396,10 @@
Printv(f_shadow, tab8, "self.this = newobj.this\n", NIL); Printv(f_shadow, tab8, "self.this = newobj.this\n", NIL);
Printv(f_shadow, tab8, "self.thisown = 1\n", NIL); Printv(f_shadow, tab8, "self.thisown = 1\n", NIL);
Printv(f_shadow, tab8, "del newobj.thisown\n", NIL); Printv(f_shadow, tab8, "del newobj.thisown\n", NIL);
@@ -843,7 +847,7 @@ diff -u -4 -r1.50 python.cxx
} }
have_constructor = 1; have_constructor = 1;
} else { } else {
@@ -2055,13 +2411,17 @@ @@ -2055,13 +2415,17 @@
} else { } else {
Printv(f_shadow_stubs, "\ndef ", symname, "(*args", Printv(f_shadow_stubs, "\ndef ", symname, "(*args",
@@ -863,7 +867,7 @@ diff -u -4 -r1.50 python.cxx
} }
} }
} }
@@ -2088,13 +2448,18 @@ @@ -2088,13 +2452,18 @@
Delete(pyaction); Delete(pyaction);
Printv(f_shadow,pycode,"\n", NIL); Printv(f_shadow,pycode,"\n", NIL);
} else { } else {

View File

@@ -57,7 +57,7 @@ typedef unsigned short VARTYPE;
// Some conversion helpers // Some conversion helpers
static wxVariant _PyObj2Variant(PyObject* value); static wxVariant _PyObj2Variant(PyObject* value);
static bool _PyObj2Variant(PyObject* value, wxVariant& wv); static bool _PyObj2Variant(PyObject* value, wxVariant& wv);
static PyObject* _Variant2PyObj(wxVariant& value, bool useNone=False); static PyObject* _Variant2PyObj(wxVariant& value, bool useNone=false);
static wxString _VARTYPEname(VARTYPE vt); static wxString _VARTYPEname(VARTYPE vt);
// Check if an exception has been raised (blocking threads) // Check if an exception has been raised (blocking threads)
@@ -460,7 +460,7 @@ public:
// conversion errors for now // conversion errors for now
wxVariant wv; wxVariant wv;
MSWVariantToVariant(rv, wv); MSWVariantToVariant(rv, wv);
rval = _Variant2PyObj(wv, True); rval = _Variant2PyObj(wv, true);
VariantClear(&rv); VariantClear(&rv);
if (func.hasOut) { if (func.hasOut) {
@@ -477,7 +477,7 @@ public:
const wxParamX &px = func.params[i]; const wxParamX &px = func.params[i];
if (px.IsOut()) { if (px.IsOut()) {
MSWVariantToVariant(va, wv); MSWVariantToVariant(va, wv);
PyObject* obj = _Variant2PyObj(wv, True); PyObject* obj = _Variant2PyObj(wv, true);
PyList_Append(lst, obj); PyList_Append(lst, obj);
} }
} }
@@ -642,7 +642,7 @@ public:
Py_DECREF(pList); Py_DECREF(pList);
for (int i=0; i<self->ParamCount(); i+=1) { for (int i=0; i<self->ParamCount(); i+=1) {
PyObject* name = PyString_FromString((char*)(const char*)self->ParamName(i).mb_str()); PyObject* name = PyString_FromString((char*)(const char*)self->ParamName(i).mb_str());
PyObject* val = _Variant2PyObj((*self)[i], True); PyObject* val = _Variant2PyObj((*self)[i], true);
PyObject_SetAttr(pyself, name, val); PyObject_SetAttr(pyself, name, val);
PyList_Append(pList, name); PyList_Append(pList, name);
Py_DECREF(val); Py_DECREF(val);

View File

@@ -286,8 +286,8 @@ public:
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) { if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
PyObject* dcobj = wxPyMake_wxObject(&dc,false); PyObject* dcobj = wxPyMake_wxObject(&dc,false);
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), False); PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), false);
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), False); PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj)); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
Py_DECREF(dcobj); Py_DECREF(dcobj);
Py_DECREF(idobj); Py_DECREF(idobj);
@@ -455,7 +455,7 @@ public:
wxTreeListColumnInfo(const wxString& text = wxPyEmptyString, wxTreeListColumnInfo(const wxString& text = wxPyEmptyString,
int image = -1, int image = -1,
size_t width = 100, size_t width = 100,
bool shown = True, bool shown = true,
wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT); wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT);
bool GetShown() const; bool GetShown() const;
@@ -702,10 +702,10 @@ public:
// allow the user to expand the items which don't have any children now // allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory // - but instead add them only when needed, thus minimizing memory
// usage and loading time. // usage and loading time.
void SetItemHasChildren(const wxTreeItemId& item, bool has = True); void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
// the item will be shown in bold // the item will be shown in bold
void SetItemBold(const wxTreeItemId& item, bool bold = True); void SetItemBold(const wxTreeItemId& item, bool bold = true);
// set the item's text colour // set the item's text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour); void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour);
@@ -740,7 +740,7 @@ public:
// if 'recursively' is False, only immediate children count, otherwise // if 'recursively' is False, only immediate children count, otherwise
// the returned number is the number of all items in this branch // the returned number is the number of all items in this branch
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = True); size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true);
// wxTreeItemId.IsOk() will return False if there is no such item // wxTreeItemId.IsOk() will return False if there is no such item
@@ -762,7 +762,7 @@ public:
num = self->GetSelections(array); num = self->GetSelections(array);
for (x=0; x < num; x++) { for (x=0; x < num; x++) {
wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True); PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), true);
PyList_Append(rval, item); PyList_Append(rval, item);
} }
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
@@ -793,7 +793,7 @@ public:
wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie)); wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return tup; return tup;
@@ -808,7 +808,7 @@ public:
wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie)); wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return tup; return tup;
@@ -905,10 +905,10 @@ public:
void UnselectAll(); void UnselectAll();
// select this item // select this item
void SelectItem(const wxTreeItemId& item, bool unselect_others=True, void SelectItem(const wxTreeItemId& item, bool unselect_others=true,
bool extended_select=False); bool extended_select=false);
void SelectAll(bool extended_select=False); void SelectAll(bool extended_select=false);
// make sure this item is visible (expanding the parent item and/or // make sure this item is visible (expanding the parent item and/or
// scrolling to this item if necessary) // scrolling to this item if necessary)
@@ -922,7 +922,7 @@ public:
%extend { %extend {
// get the bounding rectangle of the item (or of its label only) // get the bounding rectangle of the item (or of its label only)
PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = False) { PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = false) {
wxRect rect; wxRect rect;
if (self->GetBoundingRect(item, rect, textOnly)) { if (self->GetBoundingRect(item, rect, textOnly)) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();

View File

@@ -100,8 +100,8 @@ public:
void SetCharset(wxString charset); void SetCharset(wxString charset);
void SetEditMode(bool seton); void SetEditMode(bool seton);
bool GetEditMode(); bool GetEditMode();
wxString GetStringSelection(bool asHTML = False); wxString GetStringSelection(bool asHTML = false);
wxString GetText(bool asHTML = False); wxString GetText(bool asHTML = false);
bool GoBack(); bool GoBack();
bool GoForward(); bool GoForward();

View File

@@ -112,7 +112,7 @@ public:
void base_OnDelete(); void base_OnDelete();
void base_OnDraw(wxDC& dc); void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc); void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = False); void base_OnDrawBranches(wxDC& dc, bool erase = false);
void base_OnMoveLinks(wxDC& dc); void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc); void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc); void base_OnEraseContents(wxDC& dc);
@@ -121,8 +121,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -132,7 +132,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -198,21 +198,21 @@ public:
void ResetMandatoryControlPoints(); void ResetMandatoryControlPoints();
bool Recompute(); bool Recompute();
void CalculateSize(); void CalculateSize();
void Select(bool select = True, wxDC* dc = NULL); void Select(bool select = true, wxDC* dc = NULL);
void SetHighlight(bool hi = True, bool recurse = False); void SetHighlight(bool hi = true, bool recurse = false);
bool IsHighlighted() ; bool IsHighlighted() ;
bool Selected(); bool Selected();
bool AncestorSelected(); bool AncestorSelected();
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = False); void SetSensitivityFilter(int sens = OP_ALL, bool recursive = false);
int GetSensitivityFilter(); int GetSensitivityFilter();
void SetDraggable(bool drag, bool recursive = False); void SetDraggable(bool drag, bool recursive = false);
void SetFixedSize(bool x, bool y); void SetFixedSize(bool x, bool y);
void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ; void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ;
bool GetFixedWidth(); bool GetFixedWidth();
bool GetFixedHeight(); bool GetFixedHeight();
void SetSpaceAttachments(bool sp); void SetSpaceAttachments(bool sp);
bool GetSpaceAttachments() ; bool GetSpaceAttachments() ;
void SetShadowMode(int mode, bool redraw = False); void SetShadowMode(int mode, bool redraw = false);
int GetShadowMode(); int GetShadowMode();
bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT); bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT);
void SetCentreResize(bool cr); void SetCentreResize(bool cr);
@@ -256,14 +256,14 @@ public:
void Show(bool show); void Show(bool show);
bool IsShown(); bool IsShown();
void Move(wxDC& dc, double x1, double y1, bool display = True); void Move(wxDC& dc, double x1, double y1, bool display = true);
void Erase(wxDC& dc); void Erase(wxDC& dc);
void EraseContents(wxDC& dc); void EraseContents(wxDC& dc);
void Draw(wxDC& dc); void Draw(wxDC& dc);
void Flash(); void Flash();
void MoveLinks(wxDC& dc); void MoveLinks(wxDC& dc);
void DrawContents(wxDC& dc); void DrawContents(wxDC& dc);
void SetSize(double x, double y, bool recursive = True); void SetSize(double x, double y, bool recursive = true);
void SetAttachmentSize(double x, double y); void SetAttachmentSize(double x, double y);
void Attach(wxPyShapeCanvas *can); void Attach(wxPyShapeCanvas *can);
void Detach(); void Detach();
@@ -330,8 +330,8 @@ public:
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2, wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
int nth, int noArcs, wxPyLineShape* line); int nth, int noArcs, wxPyLineShape* line);
bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2); bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = False); void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = false);
void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = False); void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = false);
bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move, bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move,
double x, double y); double x, double y);
@@ -362,7 +362,7 @@ public:
int LogicalToPhysicalAttachment(int logicalAttachment); int LogicalToPhysicalAttachment(int logicalAttachment);
bool Draggable(); bool Draggable();
bool HasDescendant(wxPyShape *image); bool HasDescendant(wxPyShape *image);
wxPyShape *CreateNewCopy(bool resetMapping = True, bool recompute = True); wxPyShape *CreateNewCopy(bool resetMapping = true, bool recompute = true);
void Copy(wxPyShape& copy); void Copy(wxPyShape& copy);
void CopyWithHandler(wxPyShape& copy); void CopyWithHandler(wxPyShape& copy);
void Rotate(double x, double y, double theta); void Rotate(double x, double y, double theta);
@@ -377,7 +377,7 @@ public:
void base_OnDelete(); void base_OnDelete();
void base_OnDraw(wxDC& dc); void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc); void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = False); void base_OnDrawBranches(wxDC& dc, bool erase = false);
void base_OnMoveLinks(wxDC& dc); void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc); void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc); void base_OnEraseContents(wxDC& dc);
@@ -386,8 +386,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -397,7 +397,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);

View File

@@ -153,8 +153,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -164,7 +164,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -204,8 +204,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -215,7 +215,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -255,8 +255,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -266,7 +266,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -335,8 +335,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -346,7 +346,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -457,8 +457,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -468,7 +468,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -508,8 +508,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -519,7 +519,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -586,8 +586,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -597,7 +597,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);

View File

@@ -39,8 +39,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -50,7 +50,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -83,8 +83,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -94,7 +94,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -247,8 +247,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -258,7 +258,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -344,8 +344,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -355,7 +355,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
@@ -388,8 +388,8 @@ public:
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0); void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0); void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y); void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True); void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0); void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
@@ -399,7 +399,7 @@ public:
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h); void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc); void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc); void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True); void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0); void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0); void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);

View File

@@ -53,9 +53,9 @@ public:
char Peek() { if (m_wxis) return m_wxis->Peek(); else return -1; } char Peek() { if (m_wxis) return m_wxis->Peek(); else return -1; }
char GetC() { if (m_wxis) return m_wxis->GetC(); else return -1; } char GetC() { if (m_wxis) return m_wxis->GetC(); else return -1; }
size_t LastRead() { if (m_wxis) return m_wxis->LastRead(); else return 0; } size_t LastRead() { if (m_wxis) return m_wxis->LastRead(); else return 0; }
bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return False; } bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return false; }
bool Eof() { if (m_wxis) return m_wxis->Eof(); else return False; } bool Eof() { if (m_wxis) return m_wxis->Eof(); else return false; }
bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return False; } bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return false; }
unsigned long SeekI(unsigned long pos, wxSeekMode mode) unsigned long SeekI(unsigned long pos, wxSeekMode mode)
{ if (m_wxis) return m_wxis->SeekI(pos, mode); else return 0; } { if (m_wxis) return m_wxis->SeekI(pos, mode); else return 0; }
@@ -72,7 +72,7 @@ public:
virtual size_t GetSize() const; virtual size_t GetSize() const;
// factory function // factory function
static wxPyCBInputStream* create(PyObject *py, bool block=True); static wxPyCBInputStream* create(PyObject *py, bool block=true);
protected: protected:
// can only be created via the factory // can only be created via the factory

View File

@@ -115,7 +115,7 @@ inline wxPyCoreAPI* wxPyGetCoreAPIPtr()
#define wxPyCBH_callCallbackObj(a, b) (wxPyGetCoreAPIPtr()->p_wxPyCBH_callCallbackObj(a, b)) #define wxPyCBH_callCallbackObj(a, b) (wxPyGetCoreAPIPtr()->p_wxPyCBH_callCallbackObj(a, b))
#define wxPyCBH_delete(a) (wxPyGetCoreAPIPtr()->p_wxPyCBH_delete(a)) #define wxPyCBH_delete(a) (wxPyGetCoreAPIPtr()->p_wxPyCBH_delete(a))
#define wxPyMake_wxObject(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b,True)) #define wxPyMake_wxObject(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b,true))
#define wxPyMake_wxObject2(a,b,c) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b,c)) #define wxPyMake_wxObject2(a,b,c) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b,c))
#define wxPyMake_wxSizer(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxSizer(a,b)) #define wxPyMake_wxSizer(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxSizer(a,b))
#define wxPyPtrTypeMap_Add(a, b) (wxPyGetCoreAPIPtr()->p_wxPyPtrTypeMap_Add(a, b)) #define wxPyPtrTypeMap_Add(a, b) (wxPyGetCoreAPIPtr()->p_wxPyPtrTypeMap_Add(a, b))

View File

@@ -20,6 +20,7 @@
#include <wx/busyinfo.h> #include <wx/busyinfo.h>
#include <wx/caret.h> #include <wx/caret.h>
#include <wx/choicebk.h>
#include <wx/clipbrd.h> #include <wx/clipbrd.h>
#include <wx/colordlg.h> #include <wx/colordlg.h>
#include <wx/config.h> #include <wx/config.h>
@@ -82,9 +83,6 @@
typedef unsigned char byte; typedef unsigned char byte;
typedef wxPoint2DDouble wxPoint2D; typedef wxPoint2DDouble wxPoint2D;
const bool True = true;
const bool False = false;
#ifndef wxPyUSE_EXPORTED_API #ifndef wxPyUSE_EXPORTED_API
@@ -109,7 +107,7 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* classname);
PyObject* wx2PyString(const wxString& src); PyObject* wx2PyString(const wxString& src);
wxString Py2wxString(PyObject* source); wxString Py2wxString(PyObject* source);
PyObject* wxPyMake_wxObject(wxObject* source, bool setThisOwn, bool checkEvtHandler=True); PyObject* wxPyMake_wxObject(wxObject* source, bool setThisOwn, bool checkEvtHandler=true);
PyObject* wxPyMake_wxSizer(wxSizer* source, bool setThisOwn); PyObject* wxPyMake_wxSizer(wxSizer* source, bool setThisOwn);
void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName); void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName);
@@ -199,7 +197,7 @@ bool wxPyTwoIntItem_helper(PyObject* source, T** obj, const wxChar* name)
if (! wxPyConvertSwigPtr(source, (void **)&ptr, name)) if (! wxPyConvertSwigPtr(source, (void **)&ptr, name))
goto error; goto error;
*obj = ptr; *obj = ptr;
return True; return true;
} }
// otherwise a 2-tuple of integers is expected // otherwise a 2-tuple of integers is expected
else if (PySequence_Check(source) && PyObject_Length(source) == 2) { else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
@@ -213,14 +211,14 @@ bool wxPyTwoIntItem_helper(PyObject* source, T** obj, const wxChar* name)
**obj = T(PyInt_AsLong(o1), PyInt_AsLong(o2)); **obj = T(PyInt_AsLong(o1), PyInt_AsLong(o2));
Py_DECREF(o1); Py_DECREF(o1);
Py_DECREF(o2); Py_DECREF(o2);
return True; return true;
} }
error: error:
wxString msg; wxString msg;
msg.Printf(wxT("Expected a 2-tuple of integers or a %s object."), name); msg.Printf(wxT("Expected a 2-tuple of integers or a %s object."), name);
PyErr_SetString(PyExc_TypeError, msg.mb_str()); PyErr_SetString(PyExc_TypeError, msg.mb_str());
return False; return false;
} }
@@ -275,7 +273,7 @@ public:
wxPyEvtSelfRef(); wxPyEvtSelfRef();
~wxPyEvtSelfRef(); ~wxPyEvtSelfRef();
void SetSelf(PyObject* self, bool clone=False); void SetSelf(PyObject* self, bool clone=false);
PyObject* GetSelf() const; PyObject* GetSelf() const;
bool GetCloned() const { return m_cloned; } bool GetCloned() const { return m_cloned; }
@@ -517,7 +515,7 @@ public:
m_class = NULL; m_class = NULL;
m_self = NULL; m_self = NULL;
m_lastFound = NULL; m_lastFound = NULL;
m_incRef = False; m_incRef = false;
} }
~wxPyCallbackHelper() { ~wxPyCallbackHelper() {
@@ -528,7 +526,7 @@ public:
#endif #endif
} }
void setSelf(PyObject* self, PyObject* klass, int incref=True); void setSelf(PyObject* self, PyObject* klass, int incref=true);
bool findCallback(const char* name) const; bool findCallback(const char* name) const;
int callCallback(PyObject* argTuple) const; int callCallback(PyObject* argTuple) const;
PyObject* callCallbackObj(PyObject* argTuple) const; PyObject* callCallbackObj(PyObject* argTuple) const;
@@ -664,7 +662,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INTINT(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_INTINT(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a, int b) { \ bool CLASS::CBNAME(int a, int b) { \
bool rval=False, found; \ bool rval=false, found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \
@@ -876,7 +874,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_BOOL(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_BOOL(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(bool a) { \ bool CLASS::CBNAME(bool a) { \
bool rval=False, found; \ bool rval=false, found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
@@ -898,7 +896,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INT(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_INT(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a) { \ bool CLASS::CBNAME(int a) { \
bool rval=False, found; \ bool rval=false, found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
@@ -919,11 +917,11 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INT_pure(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_INT_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a) { \ bool CLASS::CBNAME(int a) { \
bool rval=False; \ bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \
else rval = False; \ else rval = false; \
wxPyEndBlockThreads(blocked); \ wxPyEndBlockThreads(blocked); \
return rval; \ return rval; \
} }
@@ -1081,7 +1079,7 @@ extern wxPyApp *wxPythonApp;
bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \ bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
bool rval=False; \ bool rval=false; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* obj = wxPyMake_wxObject(&a,false); \ PyObject* obj = wxPyMake_wxObject(&a,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\
@@ -1291,7 +1289,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a) { \ bool CLASS::CBNAME(const wxString& a) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1315,7 +1313,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a) { \ bool CLASS::CBNAME(const wxString& a) { \
bool rval=False; \ bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* s = wx2PyString(a); \ PyObject* s = wx2PyString(a); \
@@ -1407,7 +1405,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a, const wxString& b) { \ bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1532,7 +1530,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxHtmlTag& a) { \ bool CLASS::CBNAME(const wxHtmlTag& a) { \
bool rval=False; \ bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)&a, wxT("wxHtmlTag"), 0);\ PyObject* obj = wxPyConstructObject((void*)&a, wxT("wxHtmlTag"), 0);\
@@ -1677,7 +1675,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxWindow* a) { \ bool CLASS::CBNAME(wxWindow* a) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1703,7 +1701,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_WXWINDC(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_WXWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxWindow* a, wxDC& b) { \ bool CLASS::CBNAME(wxWindow* a, wxDC& b) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1755,7 +1753,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME() { \ bool CLASS::CBNAME() { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
@@ -1778,7 +1776,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_const(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_const(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME() const { \ bool CLASS::CBNAME() const { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
@@ -1850,7 +1848,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_DR(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_DR(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxDragResult a) { \ bool CLASS::CBNAME(wxDragResult a) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
@@ -1887,7 +1885,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a, int b, const wxString& c) { \ bool CLASS::CBNAME(int a, int b, const wxString& c) { \
bool rval=False; \ bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* s = wx2PyString(c); \ PyObject* s = wx2PyString(c); \
@@ -2033,7 +2031,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \ #define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \
bool CLASS::CBNAME(Type& a) { \ bool CLASS::CBNAME(Type& a) { \
bool rv=False; \ bool rv=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -2058,7 +2056,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_bool_anypure(CLASS, PCLASS, CBNAME, Type) \ #define IMP_PYCALLBACK_bool_anypure(CLASS, PCLASS, CBNAME, Type) \
bool CLASS::CBNAME(Type& a) { \ bool CLASS::CBNAME(Type& a) { \
bool rv=False; \ bool rv=false; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)&a, wxT(#Type), 0); \ PyObject* obj = wxPyConstructObject((void*)&a, wxT(#Type), 0); \
@@ -2166,7 +2164,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxMouseEvent& e) { \ bool CLASS::CBNAME(wxMouseEvent& e) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -2285,7 +2283,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_NODE_pure(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_NODE_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxXmlNode* a) { \ bool CLASS::CBNAME(wxXmlNode* a) { \
bool rv=False; \ bool rv=false; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)a, wxT("wxXmlNode"), 0); \ PyObject* obj = wxPyConstructObject((void*)a, wxT("wxXmlNode"), 0); \

View File

@@ -115,7 +115,7 @@ during each event loop iteration.", "");
DocDeclStr( DocDeclStr(
virtual bool, Yield(bool onlyIfNeeded = False), virtual bool, Yield(bool onlyIfNeeded = false),
"Process all currently pending events right now, instead of waiting "Process all currently pending events right now, instead of waiting
until return to the event loop. It is an error to call ``Yield`` until return to the event loop. It is an error to call ``Yield``
recursively unless the value of ``onlyIfNeeded`` is True. recursively unless the value of ``onlyIfNeeded`` is True.
@@ -307,7 +307,7 @@ DocDeclStr(
DocDeclStr( DocDeclStr(
bool, wxSafeYield(wxWindow* win=NULL, bool onlyIfNeeded=False), bool, wxSafeYield(wxWindow* win=NULL, bool onlyIfNeeded=false),
"This function is similar to `wx.Yield`, except that it disables the "This function is similar to `wx.Yield`, except that it disables the
user input to all program windows before calling `wx.Yield` and user input to all program windows before calling `wx.Yield` and
re-enables it again afterwards. If ``win`` is not None, this window re-enables it again afterwards. If ``win`` is not None, this window

View File

@@ -289,8 +289,8 @@ the ``type`` parameter.", "");
%pythoncode { def __nonzero__(self): return self.Ok() } %pythoncode { def __nonzero__(self): return self.Ok() }
%extend { %extend {
bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : False; } bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : True; } bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : true; }
} }
}; };

View File

@@ -113,7 +113,7 @@ exit. Returns False if the operation is unsuccesful for any reason.", "");
DocDeclStr( DocDeclStr(
virtual void , UsePrimarySelection( bool primary = True ), virtual void , UsePrimarySelection( bool primary = true ),
"On platforms supporting it (the X11 based platforms), selects the "On platforms supporting it (the X11 based platforms), selects the
so called PRIMARY SELECTION as the clipboard as opposed to the so called PRIMARY SELECTION as the clipboard as opposed to the
normal clipboard, if primary is True.", ""); normal clipboard, if primary is True.", "");

View File

@@ -92,7 +92,7 @@ reference to the previous global config object.", "");
DocDeclStr( DocDeclStr(
static wxConfigBase *, Get(bool createOnDemand = True), static wxConfigBase *, Get(bool createOnDemand = true),
"Returns the current global config object, creating one if neccessary.", ""); "Returns the current global config object, creating one if neccessary.", "");
@@ -192,12 +192,12 @@ GetNextGroup to fetch the next item.", "");
DocDeclStr( DocDeclStr(
virtual size_t , GetNumberOfEntries(bool recursive = False) const, virtual size_t , GetNumberOfEntries(bool recursive = false) const,
"Get the number of entries in the current group, with or without its "Get the number of entries in the current group, with or without its
subgroups.", ""); subgroups.", "");
DocDeclStr( DocDeclStr(
virtual size_t , GetNumberOfGroups(bool recursive = False) const, virtual size_t , GetNumberOfGroups(bool recursive = false) const,
"Get the number of subgroups in the current group, with or without its "Get the number of subgroups in the current group, with or without its
subgroups.", ""); subgroups.", "");
@@ -249,7 +249,7 @@ subgroups.", "");
DocStr(ReadBool, DocStr(ReadBool,
"Returns the value of key if it exists, defaultVal otherwise.", ""); "Returns the value of key if it exists, defaultVal otherwise.", "");
bool ReadBool(const wxString& key, bool defaultVal = False) { bool ReadBool(const wxString& key, bool defaultVal = false) {
bool rv; bool rv;
self->Read(key, &rv, defaultVal); self->Read(key, &rv, defaultVal);
return rv; return rv;
@@ -279,7 +279,7 @@ subgroups.", "");
DocDeclStr( DocDeclStr(
virtual bool , Flush(bool currentOnly = False), virtual bool , Flush(bool currentOnly = false),
"permanently writes all changes", ""); "permanently writes all changes", "");
@@ -300,7 +300,7 @@ name is already taken by an existing entry)", "");
// it was the last key in it and the second parameter is True // it was the last key in it and the second parameter is True
DocDeclStr( DocDeclStr(
virtual bool , DeleteEntry(const wxString& key, virtual bool , DeleteEntry(const wxString& key,
bool deleteGroupIfEmpty = True), bool deleteGroupIfEmpty = true),
"Deletes the specified entry and the group it belongs to if it was the "Deletes the specified entry and the group it belongs to if it was the
last key in it and the second parameter is True", ""); last key in it and the second parameter is True", "");
@@ -318,7 +318,7 @@ primarly intended for use by deinstallation routine.", "");
DocDeclStr( DocDeclStr(
void , SetExpandEnvVars(bool doIt = True), void , SetExpandEnvVars(bool doIt = true),
"We can automatically expand environment variables in the config "We can automatically expand environment variables in the config
entries this option is on by default, you can turn it on/off at any entries this option is on by default, you can turn it on/off at any
time)", ""); time)", "");
@@ -329,7 +329,7 @@ time)", "");
DocDeclStr( DocDeclStr(
void , SetRecordDefaults(bool doIt = True), void , SetRecordDefaults(bool doIt = true),
"Set whether the config objec should record default values.", ""); "Set whether the config objec should record default values.", "");
DocDeclStr( DocDeclStr(

View File

@@ -94,7 +94,7 @@ bool wxPyConvertSwigPtr(PyObject* obj, void **ptr,
const wxChar* className) { const wxChar* className) {
swig_type_info* swigType = wxPyFindSwigType(className); swig_type_info* swigType = wxPyFindSwigType(className);
wxCHECK_MSG(swigType != NULL, False, wxT("Unknown type in wxPyConvertSwigPtr")); wxCHECK_MSG(swigType != NULL, false, wxT("Unknown type in wxPyConvertSwigPtr"));
return SWIG_Python_ConvertPtr(obj, ptr, swigType, SWIG_POINTER_EXCEPTION) != -1; return SWIG_Python_ConvertPtr(obj, ptr, swigType, SWIG_POINTER_EXCEPTION) != -1;
} }

View File

@@ -138,7 +138,7 @@ MustHaveApp(wxContextHelp);
class wxContextHelp : public wxObject { class wxContextHelp : public wxObject {
public: public:
DocCtorStr( DocCtorStr(
wxContextHelp(wxWindow* window = NULL, bool doNow = True), wxContextHelp(wxWindow* window = NULL, bool doNow = true),
"Constructs a context help object, calling BeginContextHelp if doNow is "Constructs a context help object, calling BeginContextHelp if doNow is
true (the default). true (the default).

View File

@@ -77,7 +77,7 @@ This constructor is not available on wxGTK, use ``wx.StockCursor``,
``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.", ""); ``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.", "");
wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) { wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) {
%#ifdef __WXGTK__ %#ifdef __WXGTK__
wxCHECK_MSG(False, NULL, wxCHECK_MSG(false, NULL,
wxT("wx.Cursor constructor not implemented for wxGTK, use wx.StockCursor, wx.CursorFromImage, or wx.CursorFromBits instead.")); wxT("wx.Cursor constructor not implemented for wxGTK, use wx.StockCursor, wx.CursorFromImage, or wx.CursorFromBits instead."));
%#else %#else
return new wxCursor(*cursorName, type, hotSpotX, hotSpotY); return new wxCursor(*cursorName, type, hotSpotX, hotSpotY);

View File

@@ -247,7 +247,7 @@ in the given direction.", "");
PyObject* list = PyList_New(count); PyObject* list = PyList_New(count);
for (size_t i=0; i<count; i++) { for (size_t i=0; i<count; i++) {
wxDataFormat* format = new wxDataFormat(formats[i]); wxDataFormat* format = new wxDataFormat(formats[i]);
PyObject* obj = wxPyConstructObject((void*)format, wxT("wxDataFormat"), True); PyObject* obj = wxPyConstructObject((void*)format, wxT("wxDataFormat"), true);
PyList_Append(list, obj); PyList_Append(list, obj);
Py_DECREF(obj); Py_DECREF(obj);
} }
@@ -308,7 +308,7 @@ in the given direction.", "");
else { else {
// raise a TypeError if not a string // raise a TypeError if not a string
PyErr_SetString(PyExc_TypeError, "String expected."); PyErr_SetString(PyExc_TypeError, "String expected.");
rval = False; rval = false;
} }
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return rval; return rval;
@@ -395,7 +395,7 @@ derived class if the object supports setting its data.
else { else {
// raise a TypeError if not a string // raise a TypeError if not a string
PyErr_SetString(PyExc_TypeError, "String expected."); PyErr_SetString(PyExc_TypeError, "String expected.");
rval = False; rval = false;
} }
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return rval; return rval;
@@ -427,7 +427,7 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) const {
// return either a string or None and then act appropriately with the // return either a string or None and then act appropriately with the
// C++ version. // C++ version.
bool rval = False; bool rval = false;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) { if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) {
PyObject* ro; PyObject* ro;
@@ -446,7 +446,7 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) const {
bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{ bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{
// For this one we simply need to make a string from buf and len // For this one we simply need to make a string from buf and len
// and send it to the Python method. // and send it to the Python method.
bool rval = False; bool rval = false;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetData")) { if (wxPyCBH_findCallback(m_myInst, "SetData")) {
PyObject* data = PyString_FromStringAndSize((char*)buf, len); PyObject* data = PyString_FromStringAndSize((char*)buf, len);
@@ -524,7 +524,7 @@ public:
%apply SWIGTYPE *DISOWN { wxDataObjectSimple *dataObject }; %apply SWIGTYPE *DISOWN { wxDataObjectSimple *dataObject };
DocDeclStr( DocDeclStr(
void , Add(wxDataObjectSimple *dataObject, bool preferred = False), void , Add(wxDataObjectSimple *dataObject, bool preferred = false),
"Adds the dataObject to the list of supported objects and it becomes "Adds the dataObject to the list of supported objects and it becomes
the preferred object if preferred is True.", ""); the preferred object if preferred is True.", "");
@@ -683,7 +683,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() const {
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) { if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) {
PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), False); PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo)); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo));
Py_DECREF(bo); Py_DECREF(bo);
} }
@@ -770,7 +770,7 @@ public:
else { else {
// raise a TypeError if not a string // raise a TypeError if not a string
PyErr_SetString(PyExc_TypeError, "String expected."); PyErr_SetString(PyExc_TypeError, "String expected.");
rval = False; rval = false;
} }
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return rval; return rval;

View File

@@ -26,9 +26,9 @@ MAKE_CONST_WXSTRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
%typemap(in) wxDateTime::TimeZone& (bool temp=False) { %typemap(in) wxDateTime::TimeZone& (bool temp=false) {
$1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input)); $1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong($input));
temp = True; temp = true;
} }
%typemap(python,freearg) wxDateTime::TimeZone& { %typemap(python,freearg) wxDateTime::TimeZone& {
if (temp$argnum) delete $1; if (temp$argnum) delete $1;
@@ -570,12 +570,12 @@ public:
// timezone stuff // timezone stuff
// transform to any given timezone // transform to any given timezone
wxDateTime ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = False); wxDateTime ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = false);
wxDateTime& MakeTimezone(const wxDateTime::TimeZone& tz, bool noDST = False); wxDateTime& MakeTimezone(const wxDateTime::TimeZone& tz, bool noDST = false);
// transform to GMT/UTC // transform to GMT/UTC
wxDateTime ToGMT(bool noDST = False); wxDateTime ToGMT(bool noDST = false);
wxDateTime& MakeGMT(bool noDST = False); wxDateTime& MakeGMT(bool noDST = false);
// is daylight savings time in effect at this moment according to the // is daylight savings time in effect at this moment according to the
// rules of the specified country? // rules of the specified country?
@@ -724,10 +724,10 @@ public:
wxDateTime __sub__(const wxTimeSpan& other) { return *self - other; } wxDateTime __sub__(const wxTimeSpan& other) { return *self - other; }
wxDateTime __sub__(const wxDateSpan& other) { return *self - other; } wxDateTime __sub__(const wxDateSpan& other) { return *self - other; }
// bool __lt__(const wxDateTime* other) { return other ? (*self < *other) : False; } // bool __lt__(const wxDateTime* other) { return other ? (*self < *other) : false; }
// bool __le__(const wxDateTime* other) { return other ? (*self <= *other) : False; } // bool __le__(const wxDateTime* other) { return other ? (*self <= *other) : false; }
// bool __gt__(const wxDateTime* other) { return other ? (*self > *other) : True; } // bool __gt__(const wxDateTime* other) { return other ? (*self > *other) : true; }
// bool __ge__(const wxDateTime* other) { return other ? (*self >= *other) : True; } // bool __ge__(const wxDateTime* other) { return other ? (*self >= *other) : true; }
// These fall back to just comparing pointers if other is NULL, or if // These fall back to just comparing pointers if other is NULL, or if
@@ -934,12 +934,12 @@ public:
wxTimeSpan __mul__(int n) { return *self * n; } wxTimeSpan __mul__(int n) { return *self * n; }
wxTimeSpan __rmul__(int n) { return n * *self; } wxTimeSpan __rmul__(int n) { return n * *self; }
bool __lt__(const wxTimeSpan* other) { return other ? (*self < *other) : False; } bool __lt__(const wxTimeSpan* other) { return other ? (*self < *other) : false; }
bool __le__(const wxTimeSpan* other) { return other ? (*self <= *other) : False; } bool __le__(const wxTimeSpan* other) { return other ? (*self <= *other) : false; }
bool __gt__(const wxTimeSpan* other) { return other ? (*self > *other) : True; } bool __gt__(const wxTimeSpan* other) { return other ? (*self > *other) : true; }
bool __ge__(const wxTimeSpan* other) { return other ? (*self >= *other) : True; } bool __ge__(const wxTimeSpan* other) { return other ? (*self >= *other) : true; }
bool __eq__(const wxTimeSpan* other) { return other ? (*self == *other) : False; } bool __eq__(const wxTimeSpan* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxTimeSpan* other) { return other ? (*self != *other) : True; } bool __ne__(const wxTimeSpan* other) { return other ? (*self != *other) : true; }
} }
@@ -1120,13 +1120,13 @@ public:
wxDateSpan __mul__(int n) { return *self * n; } wxDateSpan __mul__(int n) { return *self * n; }
wxDateSpan __rmul__(int n) { return n * *self; } wxDateSpan __rmul__(int n) { return n * *self; }
// bool __lt__(const wxDateSpan* other) { return other ? (*self < *other) : False; } // bool __lt__(const wxDateSpan* other) { return other ? (*self < *other) : false; }
// bool __le__(const wxDateSpan* other) { return other ? (*self <= *other) : False; } // bool __le__(const wxDateSpan* other) { return other ? (*self <= *other) : false; }
// bool __gt__(const wxDateSpan* other) { return other ? (*self > *other) : True; } // bool __gt__(const wxDateSpan* other) { return other ? (*self > *other) : true; }
// bool __ge__(const wxDateSpan* other) { return other ? (*self >= *other) : True; } // bool __ge__(const wxDateSpan* other) { return other ? (*self >= *other) : true; }
bool __eq__(const wxDateSpan* other) { return other ? (*self == *other) : False; } bool __eq__(const wxDateSpan* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxDateSpan* other) { return other ? (*self != *other) : True; } bool __ne__(const wxDateSpan* other) { return other ? (*self != *other) : true; }
} }
}; };

View File

@@ -246,8 +246,8 @@ current text background colour to draw the background (all bits set to
0). 0).
:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`"); :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`");
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = False); void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = false);
%name(DrawBitmapPoint) void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = False); %name(DrawBitmapPoint) void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = false);
DocStr( DocStr(
@@ -285,7 +285,7 @@ font. ``wx.SWISS_FONT`` is an example of a font which is.","
DocDeclStr( DocDeclStr(
bool , Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, bool , Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = False, int rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1), wxCoord xsrcMask = -1, wxCoord ysrcMask = -1),
"Copy from a source DC to this DC. Parameters specify the destination "Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates, coordinates, size of area to copy, source DC, source coordinates,
@@ -312,7 +312,7 @@ position.", "
DocDeclStrName( DocDeclStrName(
bool , Blit(const wxPoint& destPt, const wxSize& sz, bool , Blit(const wxPoint& destPt, const wxSize& sz,
wxDC *source, const wxPoint& srcPt, wxDC *source, const wxPoint& srcPt,
int rop = wxCOPY, bool useMask = False, int rop = wxCOPY, bool useMask = false,
const wxPoint& srcPtMask = wxDefaultPosition), const wxPoint& srcPtMask = wxDefaultPosition),
"Copy from a source DC to this DC. Parameters specify the destination "Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates, coordinates, size of area to copy, source DC, source coordinates,
@@ -1575,7 +1575,7 @@ public:
// %name(PrinterDC2) wxPrinterDC(const wxString& driver, // %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device, // const wxString& device,
// const wxString& output, // const wxString& output,
// bool interactive = True, // bool interactive = true,
// int orientation = wxPORTRAIT); // int orientation = wxPORTRAIT);
}; };
@@ -1597,7 +1597,7 @@ public:
// %name(PrinterDC2) wxPrinterDC(const wxString& driver, // %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device, // const wxString& device,
// const wxString& output, // const wxString& output,
// bool interactive = True, // bool interactive = true,
// int orientation = wxPORTRAIT); // int orientation = wxPORTRAIT);
}; };
#endif #endif

View File

@@ -61,8 +61,8 @@ means unspecified/known", "");
%pythoncode { def __nonzero__(self): return self.IsOk() } %pythoncode { def __nonzero__(self): return self.IsOk() }
%extend { %extend {
bool __eq__(const wxVideoMode* other) { return other ? (*self == *other) : False; } bool __eq__(const wxVideoMode* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxVideoMode* other) { return other ? (*self != *other) : True; } bool __ne__(const wxVideoMode* other) { return other ? (*self != *other) : true; }
} }

View File

@@ -216,7 +216,7 @@ public:
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y, bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames) { const wxArrayString& filenames) {
bool rval = False; bool rval = false;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) { if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
PyObject* list = wxArrayString2PyList_helper(filenames); PyObject* list = wxArrayString2PyList_helper(filenames);

View File

@@ -52,7 +52,7 @@ public:
// Begin drag. hotspot is the location of the drag position relative to the upper-left // Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. // corner of the image.
bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
bool fullScreen = False, wxRect* rect = NULL); bool fullScreen = false, wxRect* rect = NULL);
// Begin drag. hotspot is the location of the drag position relative to the upper-left // Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image. This is full screen only. fullScreenRect gives the // corner of the image. This is full screen only. fullScreenRect gives the

View File

@@ -378,7 +378,7 @@ public:
// (treat as if the event table entry had not been found): this must be done // (treat as if the event table entry had not been found): this must be done
// to allow the event processing by the base classes (calling event.Skip() // to allow the event processing by the base classes (calling event.Skip()
// is the analog of calling the base class verstion of a virtual function) // is the analog of calling the base class verstion of a virtual function)
void Skip(bool skip = True); void Skip(bool skip = true);
bool GetSkipped() const; bool GetSkipped() const;
// Determine if this event should be propagating to the parent window. // Determine if this event should be propagating to the parent window.
@@ -877,7 +877,7 @@ public:
class wxActivateEvent : public wxEvent class wxActivateEvent : public wxEvent
{ {
public: public:
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = True, int Id = 0); wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0);
bool GetActive() const; bool GetActive() const;
}; };
@@ -922,7 +922,7 @@ public:
void SetLoggingOff(bool logOff); void SetLoggingOff(bool logOff);
bool GetLoggingOff() const; bool GetLoggingOff() const;
void Veto(bool veto = True); void Veto(bool veto = true);
void SetCanVeto(bool canVeto); void SetCanVeto(bool canVeto);
bool CanVeto() const; bool CanVeto() const;
@@ -936,7 +936,7 @@ public:
class wxShowEvent : public wxEvent class wxShowEvent : public wxEvent
{ {
public: public:
wxShowEvent(int winid = 0, bool show = False); wxShowEvent(int winid = 0, bool show = false);
void SetShow(bool show); void SetShow(bool show);
bool GetShow() const; bool GetShow() const;
@@ -950,7 +950,7 @@ public:
class wxIconizeEvent: public wxEvent class wxIconizeEvent: public wxEvent
{ {
public: public:
wxIconizeEvent(int id = 0, bool iconized = True); wxIconizeEvent(int id = 0, bool iconized = true);
bool Iconized(); bool Iconized();
}; };
@@ -1220,7 +1220,7 @@ class wxIdleEvent : public wxEvent
public: public:
wxIdleEvent(); wxIdleEvent();
void RequestMore(bool needMore = True); void RequestMore(bool needMore = true);
bool MoreRequested() const; bool MoreRequested() const;
// Specify how wxWindows will send idle events: to // Specify how wxWindows will send idle events: to

View File

@@ -127,7 +127,7 @@ public:
wxFileSystem(); wxFileSystem();
~wxFileSystem(); ~wxFileSystem();
void ChangePathTo(const wxString& location, bool is_dir = False); void ChangePathTo(const wxString& location, bool is_dir = false);
wxString GetPath(); wxString GetPath();
%newobject OpenFile; %newobject OpenFile;

View File

@@ -316,7 +316,7 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
{ wxPyRaiseNotImplemented(); return NULL; } { wxPyRaiseNotImplemented(); return NULL; }
bool wxTestFontEncoding(const wxNativeEncodingInfo& info) bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
{ wxPyRaiseNotImplemented(); return False; } { wxPyRaiseNotImplemented(); return false; }
%} %}
#endif #endif
@@ -356,7 +356,7 @@ public:
// interactive parameter is ignored in the base class, we behave as if it // interactive parameter is ignored in the base class, we behave as if it
// were always False // were always False
virtual wxFontEncoding CharsetToEncoding(const wxString& charset, virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
bool interactive = True); bool interactive = true);
// get the number of font encodings we know about // get the number of font encodings we know about
@@ -398,7 +398,7 @@ public:
%extend { %extend {
PyObject* GetAltForEncoding(wxFontEncoding encoding, PyObject* GetAltForEncoding(wxFontEncoding encoding,
const wxString& facename = wxPyEmptyString, const wxString& facename = wxPyEmptyString,
bool interactive = True) { bool interactive = true) {
wxFontEncoding alt_enc; wxFontEncoding alt_enc;
if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive)) if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
return PyInt_FromLong(alt_enc); return PyInt_FromLong(alt_enc);
@@ -439,7 +439,7 @@ public:
%pythonPrepend wxFont "if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']" %pythonPrepend wxFont "if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']"
wxFont( int pointSize, int family, int style, int weight, wxFont( int pointSize, int family, int style, int weight,
bool underline=False, const wxString& face = wxPyEmptyString, bool underline=false, const wxString& face = wxPyEmptyString,
wxFontEncoding encoding=wxFONTENCODING_DEFAULT); wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
~wxFont(); ~wxFont();
@@ -467,8 +467,8 @@ public:
// comparison // comparison
%extend { %extend {
bool __eq__(const wxFont* other) { return other ? (*self == *other) : False; } bool __eq__(const wxFont* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxFont* other) { return other ? (*self != *other) : True; } bool __ne__(const wxFont* other) { return other ? (*self != *other) : true; }
} }
// accessors: get the font characteristics // accessors: get the font characteristics
@@ -505,7 +505,7 @@ public:
wxString GetWeightString() const; wxString GetWeightString() const;
// Unofficial API, don't use // Unofficial API, don't use
virtual void SetNoAntiAliasing( bool no = True ); virtual void SetNoAntiAliasing( bool no = true );
virtual bool GetNoAntiAliasing() const; virtual bool GetNoAntiAliasing() const;
// the default encoding is used for creating all fonts with default // the default encoding is used for creating all fonts with default
@@ -549,7 +549,7 @@ public:
bool EnumerateFacenames( bool EnumerateFacenames(
wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
bool fixedWidthOnly = False); bool fixedWidthOnly = false);
bool EnumerateEncodings(const wxString& facename = wxPyEmptyString); bool EnumerateEncodings(const wxString& facename = wxPyEmptyString);

View File

@@ -49,7 +49,7 @@ void wxBell();
MustHaveApp(wxEndBusyCursor); MustHaveApp(wxEndBusyCursor);
void wxEndBusyCursor(); void wxEndBusyCursor();
long wxGetElapsedTime(bool resetTimer = True); long wxGetElapsedTime(bool resetTimer = true);
MustHaveApp(wxGetMousePosition); MustHaveApp(wxGetMousePosition);
DocDeclA( DocDeclA(
@@ -161,7 +161,7 @@ wxString wxGetTextFromUser(const wxString& message,
const wxString& default_value = wxPyEmptyString, const wxString& default_value = wxPyEmptyString,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1, int x = -1, int y = -1,
bool centre = True); bool centre = true);
MustHaveApp(wxGetPasswordFromUser); MustHaveApp(wxGetPasswordFromUser);
wxString wxGetPasswordFromUser(const wxString& message, wxString wxGetPasswordFromUser(const wxString& message,
@@ -175,7 +175,7 @@ wxString wxGetPasswordFromUser(const wxString& message,
// int LCOUNT, char** choices, // int LCOUNT, char** choices,
// int nsel, int *selection, // int nsel, int *selection,
// wxWindow *parent = NULL, int x = -1, int y = -1, // wxWindow *parent = NULL, int x = -1, int y = -1,
// bool centre = True, int width=150, int height=200); // bool centre = true, int width=150, int height=200);
MustHaveApp(wxGetSingleChoice); MustHaveApp(wxGetSingleChoice);
@@ -183,7 +183,7 @@ wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
int choices, wxString* choices_array, int choices, wxString* choices_array,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1, int x = -1, int y = -1,
bool centre = True, bool centre = true,
int width=150, int height=200); int width=150, int height=200);
MustHaveApp(wxGetSingleChoiceIndex); MustHaveApp(wxGetSingleChoiceIndex);
@@ -191,7 +191,7 @@ int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
int choices, wxString* choices_array, int choices, wxString* choices_array,
wxWindow *parent = NULL, wxWindow *parent = NULL,
int x = -1, int y = -1, int x = -1, int y = -1,
bool centre = True, bool centre = true,
int width=150, int height=200); int width=150, int height=200);
@@ -318,7 +318,7 @@ MustHaveApp(wxThread);
#ifdef WXP_WITH_THREAD #ifdef WXP_WITH_THREAD
return wxThread::IsMain(); return wxThread::IsMain();
#else #else
return True; return true;
#endif #endif
} }
%} %}

View File

@@ -42,7 +42,7 @@ bool wxGBPosition_helper(PyObject* source, wxGBPosition** obj)
{ {
if (source == Py_None) { if (source == Py_None) {
**obj = wxGBPosition(-1,-1); **obj = wxGBPosition(-1,-1);
return True; return true;
} }
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBPosition")); return wxPyTwoIntItem_helper(source, obj, wxT("wxGBPosition"));
} }
@@ -51,7 +51,7 @@ bool wxGBSpan_helper(PyObject* source, wxGBSpan** obj)
{ {
if (source == Py_None) { if (source == Py_None) {
**obj = wxGBSpan(-1,-1); **obj = wxGBSpan(-1,-1);
return True; return true;
} }
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBSpan")); return wxPyTwoIntItem_helper(source, obj, wxT("wxGBSpan"));
} }
@@ -80,8 +80,8 @@ public:
void SetCol(int col); void SetCol(int col);
// %extend { // %extend {
// bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : False; } // bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : false; }
// bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : True; } // bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : true; }
// } // }
bool operator==(const wxGBPosition& other); bool operator==(const wxGBPosition& other);
@@ -113,7 +113,7 @@ public:
elif index == 1: self.SetCol(val) elif index == 1: self.SetCol(val)
else: raise IndexError else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0) def __nonzero__(self): return self.Get() != (0,0)
__safe_for_unpickling__ = True __safe_for_unpickling__ = true
def __reduce__(self): return (wx.GBPosition, self.Get()) def __reduce__(self): return (wx.GBPosition, self.Get())
} }
@@ -149,8 +149,8 @@ cell in each direction.", "");
void SetColspan(int colspan); void SetColspan(int colspan);
// %extend { // %extend {
// bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : False; } // bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : false; }
// bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : True; } // bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : true; }
// } // }
bool operator==(const wxGBSpan& other); bool operator==(const wxGBSpan& other);
bool operator!=(const wxGBSpan& other); bool operator!=(const wxGBSpan& other);
@@ -182,7 +182,7 @@ cell in each direction.", "");
elif index == 1: self.SetColspan(val) elif index == 1: self.SetColspan(val)
else: raise IndexError else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0) def __nonzero__(self): return self.Get() != (0,0)
__safe_for_unpickling__ = True __safe_for_unpickling__ = true
def __reduce__(self): return (wx.GBSpan, self.Get()) def __reduce__(self): return (wx.GBSpan, self.Get())
} }
@@ -386,7 +386,7 @@ position, False if something was already there.
wxPyUserData* data = NULL; wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) ) if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData); data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
@@ -399,7 +399,7 @@ position, False if something was already there.
else if (info.gotSize) else if (info.gotSize)
return self->Add(info.size.GetWidth(), info.size.GetHeight(), return self->Add(info.size.GetWidth(), info.size.GetHeight(),
pos, span, flag, border, data); pos, span, flag, border, data);
return False; return false;
} }
} }

View File

@@ -132,8 +132,8 @@ public:
// None/NULL is now handled properly by the typemap, so these are not needed. // None/NULL is now handled properly by the typemap, so these are not needed.
// %extend { // %extend {
// bool __eq__(const wxSize* other) { return other ? (*self == *other) : False; } // bool __eq__(const wxSize* other) { return other ? (*self == *other) : false; }
// bool __ne__(const wxSize* other) { return other ? (*self != *other) : True; } // bool __ne__(const wxSize* other) { return other ? (*self != *other) : true; }
// } // }
DocDeclStr( DocDeclStr(
@@ -594,7 +594,7 @@ DocAStr(wxIntersectRect,
if (dest != wxRect(0,0,0,0)) { if (dest != wxRect(0,0,0,0)) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxRect* newRect = new wxRect(dest); wxRect* newRect = new wxRect(dest);
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), True); obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), true);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return obj; return obj;
} }

View File

@@ -84,7 +84,7 @@ public:
%name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1); %name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
%name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 ); %name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
%extend { %extend {
%name(EmptyImage) wxImage(int width=0, int height=0, bool clear = True) { %name(EmptyImage) wxImage(int width=0, int height=0, bool clear = true) {
if (width > 0 && height > 0) if (width > 0 && height > 0)
return new wxImage(width, height, clear); return new wxImage(width, height, clear);
else else
@@ -104,7 +104,7 @@ public:
return NULL; return NULL;
} }
memcpy(copy, data, width*height*3); memcpy(copy, data, width*height*3);
return new wxImage(width, height, copy, False); return new wxImage(width, height, copy, false);
} }
} }
@@ -297,13 +297,13 @@ nothing.", "");
unsigned char GetMaskRed(); unsigned char GetMaskRed();
unsigned char GetMaskGreen(); unsigned char GetMaskGreen();
unsigned char GetMaskBlue(); unsigned char GetMaskBlue();
void SetMask( bool mask = True ); void SetMask( bool mask = true );
bool HasMask(); bool HasMask();
wxImage Rotate(double angle, const wxPoint & centre_of_rotation, wxImage Rotate(double angle, const wxPoint & centre_of_rotation,
bool interpolating = True, wxPoint * offset_after_rotation = NULL) const ; bool interpolating = true, wxPoint * offset_after_rotation = NULL) const ;
wxImage Rotate90( bool clockwise = True ) ; wxImage Rotate90( bool clockwise = true ) ;
wxImage Mirror( bool horizontally = True ) ; wxImage Mirror( bool horizontally = true ) ;
void Replace( unsigned char r1, unsigned char g1, unsigned char b1, void Replace( unsigned char r1, unsigned char g1, unsigned char b1,
unsigned char r2, unsigned char g2, unsigned char b2 ); unsigned char r2, unsigned char g2, unsigned char b2 );

View File

@@ -43,7 +43,7 @@ MustHaveApp(wxImageList);
// two bitmaps, or an icon. // two bitmaps, or an icon.
class wxImageList : public wxObject { class wxImageList : public wxObject {
public: public:
wxImageList(int width, int height, int mask=True, int initialCount=1); wxImageList(int width, int height, int mask=true, int initialCount=1);
~wxImageList(); ~wxImageList();
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
@@ -58,7 +58,7 @@ public:
#endif #endif
bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL, bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL,
const bool solidBackground = False); const bool solidBackground = false);
int GetImageCount(); int GetImageCount();
bool Remove(int index); bool Remove(int index);

View File

@@ -324,8 +324,8 @@ public:
%name(Init1)bool Init(const wxString& szName, %name(Init1)bool Init(const wxString& szName,
const wxString& szShort = wxPyEmptyString, const wxString& szShort = wxPyEmptyString,
const wxString& szLocale = wxPyEmptyString, const wxString& szLocale = wxPyEmptyString,
bool bLoadDefault = True, bool bLoadDefault = true,
bool bConvertEncoding = False); bool bConvertEncoding = false);
%name(Init2) bool Init(int language = wxLANGUAGE_DEFAULT, %name(Init2) bool Init(int language = wxLANGUAGE_DEFAULT,
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);

View File

@@ -64,7 +64,7 @@ public:
int GetMovementThreshold() { return -1; } int GetMovementThreshold() { return -1; }
void SetMovementThreshold(int threshold) {} void SetMovementThreshold(int threshold) {}
bool IsOk(void) { return False; } bool IsOk(void) { return false; }
int GetNumberJoysticks() { return -1; } int GetNumberJoysticks() { return -1; }
int GetManufacturerId() { return -1; } int GetManufacturerId() { return -1; }
int GetProductId() { return -1; } int GetProductId() { return -1; }
@@ -88,16 +88,16 @@ public:
int GetVMin() { return -1; } int GetVMin() { return -1; }
int GetVMax() { return -1; } int GetVMax() { return -1; }
bool HasRudder() { return False; } bool HasRudder() { return false; }
bool HasZ() { return False; } bool HasZ() { return false; }
bool HasU() { return False; } bool HasU() { return false; }
bool HasV() { return False; } bool HasV() { return false; }
bool HasPOV() { return False; } bool HasPOV() { return false; }
bool HasPOV4Dir() { return False; } bool HasPOV4Dir() { return false; }
bool HasPOVCTS() { return False; } bool HasPOVCTS() { return false; }
bool SetCapture(wxWindow* win, int pollingFreq = 0) { return False; } bool SetCapture(wxWindow* win, int pollingFreq = 0) { return false; }
bool ReleaseCapture() { return False; } bool ReleaseCapture() { return false; }
}; };
#endif #endif
%} %}

View File

@@ -70,12 +70,12 @@ public:
// multiple selection logic // multiple selection logic
virtual bool IsSelected(int n) const; virtual bool IsSelected(int n) const;
virtual void SetSelection(int n, bool select = True); virtual void SetSelection(int n, bool select = true);
virtual void Select(int n); virtual void Select(int n);
void Deselect(int n); void Deselect(int n);
void DeselectAll(int itemToLeaveSelected = -1); void DeselectAll(int itemToLeaveSelected = -1);
virtual bool SetStringSelection(const wxString& s, bool select = True); virtual bool SetStringSelection(const wxString& s, bool select = true);
// works for single as well as multiple selection listboxes (unlike // works for single as well as multiple selection listboxes (unlike
// GetSelection which only works for listboxes with single selection) // GetSelection which only works for listboxes with single selection)
@@ -168,7 +168,7 @@ public:
const wxString& name = wxPyListBoxNameStr); const wxString& name = wxPyListBoxNameStr);
bool IsChecked(int index); bool IsChecked(int index);
void Check(int index, int check = True); void Check(int index, int check = true);
#if defined(__WXMSW__) || defined(__WXGTK__) #if defined(__WXMSW__) || defined(__WXGTK__)
int GetItemHeight(); int GetItemHeight();

View File

@@ -544,7 +544,7 @@ public:
wxSize GetItemSpacing() const; wxSize GetItemSpacing() const;
#ifndef __WXMSW__ #ifndef __WXMSW__
void SetItemSpacing( int spacing, bool isSmall = False ); void SetItemSpacing( int spacing, bool isSmall = false );
#endif #endif
// Gets the number of selected items in the list control // Gets the number of selected items in the list control
@@ -561,7 +561,7 @@ public:
long GetTopItem() const ; long GetTopItem() const ;
// Add or remove a single window style // Add or remove a single window style
void SetSingleStyle(long style, bool add = True) ; void SetSingleStyle(long style, bool add = true) ;
// Set the whole window style // Set the whole window style
void SetWindowStyleFlag(long style) ; void SetWindowStyleFlag(long style) ;
@@ -627,7 +627,7 @@ public:
// Find an item whose label matches this string, starting from the item after 'start' // Find an item whose label matches this string, starting from the item after 'start'
// or the beginning if 'start' is -1. // or the beginning if 'start' is -1.
long FindItem(long start, const wxString& str, bool partial = False); long FindItem(long start, const wxString& str, bool partial = false);
// Find an item whose data matches this data, starting from the item after 'start' // Find an item whose data matches this data, starting from the item after 'start'
// or the beginning if 'start' is -1. // or the beginning if 'start' is -1.
@@ -754,7 +754,7 @@ details in the second return value (see wxLIST_HITTEST_... flags.)", "");
// or zero if the two items are equivalent. // or zero if the two items are equivalent.
bool SortItems(PyObject* func) { bool SortItems(PyObject* func) {
if (!PyCallable_Check(func)) if (!PyCallable_Check(func))
return False; return false;
return self->SortItems((wxListCtrlCompare)wxPyListCtrl_SortItems, (long)func); return self->SortItems((wxListCtrlCompare)wxPyListCtrl_SortItems, (long)func);
} }
} }
@@ -807,7 +807,7 @@ public:
const wxString& name = wxPyListCtrlNameStr); const wxString& name = wxPyListCtrlNameStr);
// [de]select an item // [de]select an item
void Select(long n, bool on = True); void Select(long n, bool on = true);
// focus and show the given item // focus and show the given item
void Focus(long index); void Focus(long index);

View File

@@ -61,7 +61,7 @@ public:
static bool IsEnabled(); static bool IsEnabled();
// change the flag state, return the previous one // change the flag state, return the previous one
static bool EnableLogging(bool doIt = True); static bool EnableLogging(bool doIt = true);
// static sink function // static sink function
static void OnLog(wxLogLevel level, const wxChar *szString, time_t t); static void OnLog(wxLogLevel level, const wxChar *szString, time_t t);
@@ -94,7 +94,7 @@ public:
// verbose mode is activated by standard command-line '-verbose' // verbose mode is activated by standard command-line '-verbose'
// option // option
static void SetVerbose(bool bVerbose = True); static void SetVerbose(bool bVerbose = true);
// Set log level. Log messages with level > logLevel will not be logged. // Set log level. Log messages with level > logLevel will not be logged.
static void SetLogLevel(wxLogLevel logLevel); static void SetLogLevel(wxLogLevel logLevel);
@@ -181,10 +181,10 @@ class wxLogWindow : public wxLog
public: public:
wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL) wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL)
const wxString& szTitle, // the title of the frame const wxString& szTitle, // the title of the frame
bool bShow = True, // show window immediately? bool bShow = true, // show window immediately?
bool bPassToOld = True); // pass log messages to the old target? bool bPassToOld = true); // pass log messages to the old target?
void Show(bool bShow = True); void Show(bool bShow = true);
wxFrame *GetFrame() const; wxFrame *GetFrame() const;
wxLog *GetOldLog() const; wxLog *GetOldLog() const;
bool IsPassingMessages() const; bool IsPassingMessages() const;

View File

@@ -249,7 +249,7 @@ public:
virtual void EnableTop(size_t pos, bool enable); virtual void EnableTop(size_t pos, bool enable);
// is the menu enabled? // is the menu enabled?
virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return True; } virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return true; }
// get or change the label of the menu at given position // get or change the label of the menu at given position
virtual void SetLabelTop(size_t pos, const wxString& label); virtual void SetLabelTop(size_t pos, const wxString& label);
@@ -345,10 +345,10 @@ public:
wxMenu *GetSubMenu() const; wxMenu *GetSubMenu() const;
// state // state
virtual void Enable(bool enable = True); virtual void Enable(bool enable = true);
virtual bool IsEnabled() const; virtual bool IsEnabled() const;
virtual void Check(bool check = True); virtual void Check(bool check = true);
virtual bool IsChecked() const; virtual bool IsChecked() const;
void Toggle(); void Toggle();
@@ -384,7 +384,7 @@ public:
bool IsOwnerDrawn(); bool IsOwnerDrawn();
// switch on/off owner-drawing the item // switch on/off owner-drawing the item
void SetOwnerDrawn(bool ownerDrawn = True); void SetOwnerDrawn(bool ownerDrawn = true);
void ResetOwnerDrawn(); void ResetOwnerDrawn();
#else #else
// just to keep the global renamers in sync // just to keep the global renamers in sync

View File

@@ -193,7 +193,7 @@ public:
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tuple = PyTuple_New(3); PyObject* tuple = PyTuple_New(3);
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc), PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc),
wxT("wxIcon"), True)); wxT("wxIcon"), true));
PyTuple_SetItem(tuple, 1, wx2PyString(iconFile)); PyTuple_SetItem(tuple, 1, wx2PyString(iconFile));
PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex)); PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex));
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
@@ -266,7 +266,7 @@ public:
// set an arbitrary command, ask confirmation if it already exists and // set an arbitrary command, ask confirmation if it already exists and
// overwriteprompt is True // overwriteprompt is True
bool SetCommand(const wxString& cmd, const wxString& verb, bool SetCommand(const wxString& cmd, const wxString& verb,
bool overwriteprompt = True); bool overwriteprompt = true);
bool SetDefaultIcon(const wxString& cmd = wxPyEmptyString, int index = 0); bool SetDefaultIcon(const wxString& cmd = wxPyEmptyString, int index = 0);
@@ -353,7 +353,7 @@ public:
// settings from other, previously parsed, files by this one: normally, // settings from other, previously parsed, files by this one: normally,
// the files read most recently would override the older files, but with // the files read most recently would override the older files, but with
// fallback == True this won't happen // fallback == True this won't happen
bool ReadMailcap(const wxString& filename, bool fallback = False); bool ReadMailcap(const wxString& filename, bool fallback = false);
// read in additional file in mime.types format // read in additional file in mime.types format
bool ReadMimeTypes(const wxString& filename); bool ReadMimeTypes(const wxString& filename);

View File

@@ -66,7 +66,7 @@ public:
void Move(const wxPoint& pt); void Move(const wxPoint& pt);
%name(SetSizeWH) void SetSize(int width, int height); %name(SetSizeWH) void SetSize(int width, int height);
void SetSize(const wxSize& size); void SetSize(const wxSize& size);
void Show(int show = True); void Show(int show = true);
void Hide(); void Hide();
%pythoncode { def __nonzero__(self): return self.IsOk() } %pythoncode { def __nonzero__(self): return self.IsOk() }
@@ -264,7 +264,7 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
// WM_PRINT. For most native widgets nothing is drawn to the dc // WM_PRINT. For most native widgets nothing is drawn to the dc
// at all, with or without Themes. // at all, with or without Themes.
typedef BOOL (WINAPI *PrintWindow_t)(HWND, HDC, UINT); typedef BOOL (WINAPI *PrintWindow_t)(HWND, HDC, UINT);
static bool s_triedToLoad = False; static bool s_triedToLoad = false;
static PrintWindow_t pfnPrintWindow = NULL; static PrintWindow_t pfnPrintWindow = NULL;
if ( !s_triedToLoad ) if ( !s_triedToLoad )
{ {

View File

@@ -98,14 +98,14 @@ public:
// adds a new page to the control // adds a new page to the control
virtual bool AddPage(wxWindow *page, virtual bool AddPage(wxWindow *page,
const wxString& text, const wxString& text,
bool select = False, bool select = false,
int imageId = -1); int imageId = -1);
// the same as AddPage(), but adds the page at the specified position // the same as AddPage(), but adds the page at the specified position
virtual bool InsertPage(size_t n, virtual bool InsertPage(size_t n,
wxWindow *page, wxWindow *page,
const wxString& text, const wxString& text,
bool select = False, bool select = false,
int imageId = -1)/* = 0*/; int imageId = -1)/* = 0*/;
// set the currently selected page, return the index of the previously // set the currently selected page, return the index of the previously
@@ -116,7 +116,7 @@ public:
// cycle thru the pages // cycle thru the pages
void AdvanceSelection(bool forward = True); void AdvanceSelection(bool forward = true);
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -345,9 +345,6 @@ public:
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
%{
#include <wx/choicebk.h>
%}
/* /*
* wxChoicebook flags * wxChoicebook flags

View File

@@ -95,7 +95,7 @@ public:
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY, int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0, int xPos = 0, int yPos = 0,
bool noRefresh = False ); bool noRefresh = false );
// scroll to the given (in logical coords) position // scroll to the given (in logical coords) position
virtual void Scroll(int x, int y); virtual void Scroll(int x, int y);

View File

@@ -107,8 +107,8 @@ public:
%extend { %extend {
bool __eq__(const wxPen* other) { return other ? (*self == *other) : False; } bool __eq__(const wxPen* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxPen* other) { return other ? (*self != *other) : True; } bool __ne__(const wxPen* other) { return other ? (*self != *other) : true; }
} }
%pythoncode { def __nonzero__(self): return self.Ok() } %pythoncode { def __nonzero__(self): return self.Ok() }
}; };

View File

@@ -282,7 +282,7 @@ public:
void CreateAbortWindow(wxWindow* parent, wxPyPrintout* printout); void CreateAbortWindow(wxWindow* parent, wxPyPrintout* printout);
wxPrintDialogData& GetPrintDialogData(); wxPrintDialogData& GetPrintDialogData();
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=True); bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=true);
wxDC* PrintDialog(wxWindow *parent); wxDC* PrintDialog(wxWindow *parent);
void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message); void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
bool Setup(wxWindow *parent); bool Setup(wxWindow *parent);
@@ -299,7 +299,7 @@ public:
// Since this one would be tough and ugly to do with the Macros... // Since this one would be tough and ugly to do with the Macros...
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) { void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
bool hadErr = False; bool hadErr = false;
bool found; bool found;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
@@ -310,22 +310,22 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
val = PyTuple_GetItem(result, 0); val = PyTuple_GetItem(result, 0);
if (PyInt_Check(val)) *minPage = PyInt_AsLong(val); if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
else hadErr = True; else hadErr = true;
val = PyTuple_GetItem(result, 1); val = PyTuple_GetItem(result, 1);
if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val); if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
else hadErr = True; else hadErr = true;
val = PyTuple_GetItem(result, 2); val = PyTuple_GetItem(result, 2);
if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val); if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
else hadErr = True; else hadErr = true;
val = PyTuple_GetItem(result, 3); val = PyTuple_GetItem(result, 3);
if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val); if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
else hadErr = True; else hadErr = true;
} }
else else
hadErr = True; hadErr = true;
if (hadErr) { if (hadErr) {
PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers."); PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
@@ -567,7 +567,7 @@ public:
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \ #define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \ bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
bool rval=False; \ bool rval=false; \
bool found; \ bool found; \
bool blocked = wxPyBeginBlockThreads(); \ bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \

View File

@@ -70,8 +70,8 @@ public:
%pythoncode { SetItemLabel = SetString }; %pythoncode { SetItemLabel = SetString };
// change the individual radio button state // change the individual radio button state
%name(EnableItem) virtual void Enable(int n, bool enable = True); %name(EnableItem) virtual void Enable(int n, bool enable = true);
%name(ShowItem) virtual void Show(int n, bool show = True); %name(ShowItem) virtual void Show(int n, bool show = true);
#ifndef __WXGTK__ #ifndef __WXGTK__
// layout parameters // layout parameters

View File

@@ -53,7 +53,7 @@ public:
virtual void SetThumbPosition(int viewStart); virtual void SetThumbPosition(int viewStart);
virtual void SetScrollbar(int position, int thumbSize, virtual void SetScrollbar(int position, int thumbSize,
int range, int pageSize, int range, int pageSize,
bool refresh = True); bool refresh = true);
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

View File

@@ -263,8 +263,8 @@ isn't any.", "");
struct wxPySizerItemInfo { struct wxPySizerItemInfo {
wxPySizerItemInfo() wxPySizerItemInfo()
: window(NULL), sizer(NULL), gotSize(False), : window(NULL), sizer(NULL), gotSize(false),
size(wxDefaultSize), gotPos(False), pos(-1) size(wxDefaultSize), gotPos(false), pos(-1)
{} {}
wxWindow* window; wxWindow* window;
@@ -295,13 +295,13 @@ static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize,
// try wxSize or (w,h) // try wxSize or (w,h)
if ( checkSize && wxSize_helper(item, &sizePtr)) { if ( checkSize && wxSize_helper(item, &sizePtr)) {
info.size = *sizePtr; info.size = *sizePtr;
info.gotSize = True; info.gotSize = true;
} }
// or a single int // or a single int
if (checkIdx && PyInt_Check(item)) { if (checkIdx && PyInt_Check(item)) {
info.pos = PyInt_AsLong(item); info.pos = PyInt_AsLong(item);
info.gotPos = True; info.gotPos = true;
} }
} }
} }
@@ -482,7 +482,7 @@ public:
wxPyUserData* data = NULL; wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) ) if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData); data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
@@ -511,7 +511,7 @@ the item at index *before*. See `Add` for a description of the parameters.", ""
wxPyUserData* data = NULL; wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) ) if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData); data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
@@ -541,7 +541,7 @@ this sizer. See `Add` for a description of the parameters.", "");
wxPyUserData* data = NULL; wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) ) if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData); data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
@@ -575,7 +575,7 @@ and removed.", "
"); ");
bool Remove(PyObject* item) { bool Remove(PyObject* item) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
if ( info.window ) if ( info.window )
return self->Remove(info.window); return self->Remove(info.window);
@@ -584,7 +584,7 @@ and removed.", "
else if ( info.gotPos ) else if ( info.gotPos )
return self->Remove(info.pos); return self->Remove(info.pos);
else else
return False; return false;
} }
@@ -597,7 +597,7 @@ zero-based index of the item to be detached. Returns True if the child item
was found and detached.", ""); was found and detached.", "");
bool Detach(PyObject* item) { bool Detach(PyObject* item) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
if ( info.window ) if ( info.window )
return self->Detach(info.window); return self->Detach(info.window);
@@ -606,13 +606,13 @@ was found and detached.", "");
else if ( info.gotPos ) else if ( info.gotPos )
return self->Detach(info.pos); return self->Detach(info.pos);
else else
return False; return false;
} }
void _SetItemMinSize(PyObject* item, const wxSize& size) { void _SetItemMinSize(PyObject* item, const wxSize& size) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
if ( info.window ) if ( info.window )
self->SetItemMinSize(info.window, size); self->SetItemMinSize(info.window, size);
@@ -793,7 +793,7 @@ this will set them appropriately.
DocDeclStr( DocDeclStr(
void , Clear( bool deleteWindows=False ), void , Clear( bool deleteWindows=false ),
"Clear all items from the sizer, optionally destroying the window items "Clear all items from the sizer, optionally destroying the window items
as well.", ""); as well.", "");
@@ -820,15 +820,15 @@ as well.", "");
%extend { %extend {
DocAStr(Show, DocAStr(Show,
"Show(self, item, bool show=True, bool recursive=False) -> bool", "Show(self, item, bool show=True, bool recursive=false) -> bool",
"Shows or hides an item managed by the sizer. To make a sizer item "Shows or hides an item managed by the sizer. To make a sizer item
disappear or reappear, use Show followed by `Layout`. The *item* disappear or reappear, use Show followed by `Layout`. The *item*
parameter can be either a window, a sizer, or the zero-based index of parameter can be either a window, a sizer, or the zero-based index of
the item. Use the recursive parameter to show or hide an item in a the item. Use the recursive parameter to show or hide an item in a
subsizer. Returns True if the item was found.", ""); subsizer. Returns True if the item was found.", "");
bool Show(PyObject* item, bool show = True, bool recursive=False) { bool Show(PyObject* item, bool show = true, bool recursive=false) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
if ( info.window ) if ( info.window )
return self->Show(info.window, show, recursive); return self->Show(info.window, show, recursive);
@@ -846,7 +846,7 @@ parameter can be either a window, a sizer, or the zero-based index of
the item.", ""); the item.", "");
bool IsShown(PyObject* item) { bool IsShown(PyObject* item) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False); wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
if ( info.window ) if ( info.window )
return self->IsShown(info.window); return self->IsShown(info.window);
@@ -855,16 +855,16 @@ the item.", "");
else if ( info.gotPos ) else if ( info.gotPos )
return self->IsShown(info.pos); return self->IsShown(info.pos);
else else
return False; return false;
} }
} }
%pythoncode { %pythoncode {
def Hide(self, item, recursive=False): def Hide(self, item, recursive=false):
""" """
A convenience method for Show(item, False, recursive). A convenience method for Show(item, False, recursive).
""" """
return self.Show(item, False, recursive) return self.Show(item, false, recursive)
} }

View File

@@ -110,7 +110,7 @@ public:
%#ifndef __WXMAC__ %#ifndef __WXMAC__
unsigned char* buffer; unsigned char* buffer;
int size; int size;
bool rv = False; bool rv = false;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if (!PyArg_Parse(data, "t#", &buffer, &size)) if (!PyArg_Parse(data, "t#", &buffer, &size))
@@ -124,7 +124,7 @@ public:
PyErr_SetString(PyExc_NotImplementedError, PyErr_SetString(PyExc_NotImplementedError,
"Create from data is not available on this platform."); "Create from data is not available on this platform.");
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return False; return false;
%#endif %#endif
} }
} }

View File

@@ -293,7 +293,7 @@ showing the top-level window.", "");
DocDeclStr( DocDeclStr(
void , SetSashPosition(int position, bool redraw = True), void , SetSashPosition(int position, bool redraw = true),
"Sets the sash position, in pixels. If redraw is Ttrue then the panes "Sets the sash position, in pixels. If redraw is Ttrue then the panes
are resized and the sash and border are redrawn.", ""); are resized and the sash and border are redrawn.", "");

View File

@@ -128,7 +128,7 @@ public:
void AddFont(wxFont* font); void AddFont(wxFont* font);
wxFont * FindOrCreateFont(int point_size, int family, int style, int weight, wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
bool underline = False, const wxString& facename = wxPyEmptyString, bool underline = false, const wxString& facename = wxPyEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
void RemoveFont(wxFont *font); void RemoveFont(wxFont *font);

View File

@@ -27,15 +27,15 @@
%typemap(in) wxInputStream* (wxPyInputStream* temp, bool created) { %typemap(in) wxInputStream* (wxPyInputStream* temp, bool created) {
if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) { if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) {
$1 = temp->m_wxis; $1 = temp->m_wxis;
created = False; created = false;
} else { } else {
PyErr_Clear(); // clear the failure of the wxPyConvert above PyErr_Clear(); // clear the failure of the wxPyConvert above
$1 = wxPyCBInputStream_create($input, False); $1 = wxPyCBInputStream_create($input, false);
if ($1 == NULL) { if ($1 == NULL) {
PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object."); PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
SWIG_fail; SWIG_fail;
} }
created = True; created = true;
} }
} }
%typemap(freearg) wxInputStream* { %typemap(freearg) wxInputStream* {
@@ -54,7 +54,7 @@
if ($1) { if ($1) {
_ptr = new wxPyInputStream($1); _ptr = new wxPyInputStream($1);
} }
$result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), True); $result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), true);
} }

View File

@@ -305,7 +305,7 @@ the client area origin nor scrolling. ", "",
#ifdef __WXMSW__ #ifdef __WXMSW__
// Caret handling (Windows only) // Caret handling (Windows only)
bool ShowNativeCaret(bool show = True); bool ShowNativeCaret(bool show = true);
bool HideNativeCaret(); bool HideNativeCaret();
#endif #endif

View File

@@ -80,7 +80,7 @@ public:
// //
// it is now valid to call Start() multiple times: this just restarts the // it is now valid to call Start() multiple times: this just restarts the
// timer if it is already running // timer if it is already running
virtual bool Start(int milliseconds = -1, bool oneShot = False); virtual bool Start(int milliseconds = -1, bool oneShot = false);
// stop the timer // stop the timer
virtual void Stop(); virtual void Stop();
@@ -138,10 +138,10 @@ class wxTimerRunner
public: public:
%nokwargs wxTimerRunner; %nokwargs wxTimerRunner;
wxTimerRunner(wxTimer& timer); wxTimerRunner(wxTimer& timer);
wxTimerRunner(wxTimer& timer, int milli, bool oneShot = False); wxTimerRunner(wxTimer& timer, int milli, bool oneShot = false);
~wxTimerRunner(); ~wxTimerRunner();
void Start(int milli, bool oneShot = False); void Start(int milli, bool oneShot = false);
}; };

View File

@@ -82,7 +82,7 @@ public:
// //
// The function returns True if this checkbox is checked, False otherwise. // The function returns True if this checkbox is checked, False otherwise.
MustHaveApp(wxShowTip); MustHaveApp(wxShowTip);
bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = True); bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = true);
// a function which returns an implementation of wxTipProvider using the // a function which returns an implementation of wxTipProvider using the
// specified text file as the source of tips (each line is a tip). // specified text file as the source of tips (each line is a tip).

View File

@@ -85,13 +85,13 @@ public:
// No constructor as it can not be used directly from Python // No constructor as it can not be used directly from Python
// maximize = True => maximize, otherwise - restore // maximize = True => maximize, otherwise - restore
virtual void Maximize(bool maximize = True); virtual void Maximize(bool maximize = true);
// undo Maximize() or Iconize() // undo Maximize() or Iconize()
virtual void Restore(); virtual void Restore();
// iconize = True => iconize, otherwise - restore // iconize = True => iconize, otherwise - restore
virtual void Iconize(bool iconize = True); virtual void Iconize(bool iconize = true);
// return True if the frame is maximized // return True if the frame is maximized
virtual bool IsMaximized() const; virtual bool IsMaximized() const;

View File

@@ -96,8 +96,8 @@ public:
bool IsOk() const; bool IsOk() const;
%extend { %extend {
bool __eq__(const wxTreeItemId* other) { return other ? (*self == *other) : False; } bool __eq__(const wxTreeItemId* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxTreeItemId* other) { return other ? (*self != *other) : True; } bool __ne__(const wxTreeItemId* other) { return other ? (*self != *other) : true; }
} }
void* m_pItem; void* m_pItem;
@@ -288,8 +288,8 @@ public:
bool found; bool found;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) { if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) {
PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), False); PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), false);
PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), False); PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), false);
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2)); rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2));
Py_DECREF(o1); Py_DECREF(o1);
Py_DECREF(o2); Py_DECREF(o2);
@@ -450,14 +450,14 @@ public:
// allow the user to expand the items which don't have any children now // allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory // - but instead add them only when needed, thus minimizing memory
// usage and loading time. // usage and loading time.
void SetItemHasChildren(const wxTreeItemId& item, bool has = True); void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
// the item will be shown in bold // the item will be shown in bold
void SetItemBold(const wxTreeItemId& item, bool bold = True); void SetItemBold(const wxTreeItemId& item, bool bold = true);
#ifdef __WXMSW__ #ifdef __WXMSW__
// the item will be shown with a drop highlight // the item will be shown with a drop highlight
void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = True); void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true);
#endif #endif
// set the items text colour // set the items text colour
@@ -489,7 +489,7 @@ public:
// if 'recursively' is False, only immediate children count, otherwise // if 'recursively' is False, only immediate children count, otherwise
// the returned number is the number of all items in this branch // the returned number is the number of all items in this branch
size_t GetChildrenCount(const wxTreeItemId& item, size_t GetChildrenCount(const wxTreeItemId& item,
bool recursively = True) /*const*/; bool recursively = true) /*const*/;
@@ -514,7 +514,7 @@ public:
num = self->GetSelections(array); num = self->GetSelections(array);
for (x=0; x < num; x++) { for (x=0; x < num; x++) {
wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True); PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), true);
PyList_Append(rval, item); PyList_Append(rval, item);
Py_DECREF(item); Py_DECREF(item);
} }
@@ -539,7 +539,7 @@ public:
wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie)); wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return tup; return tup;
@@ -554,7 +554,7 @@ public:
wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie)); wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2); PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return tup; return tup;
@@ -651,7 +651,7 @@ public:
void UnselectAll(); void UnselectAll();
// select this item // select this item
void SelectItem(const wxTreeItemId& item, bool select = True); void SelectItem(const wxTreeItemId& item, bool select = true);
// toggle the item selection // toggle the item selection
void ToggleItemSelection(const wxTreeItemId& item); void ToggleItemSelection(const wxTreeItemId& item);
@@ -678,7 +678,7 @@ public:
#ifdef __WXMSW__ #ifdef __WXMSW__
// end editing and accept or discard the changes to item label // end editing and accept or discard the changes to item label
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = False); void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false);
#endif #endif
@@ -702,12 +702,12 @@ value is set to a bitmask of wxTREE_HITTEST_xxx constants.
%extend { %extend {
// get the bounding rectangle of the item (or of its label only) // get the bounding rectangle of the item (or of its label only)
PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = False) { PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = false) {
wxRect rect; wxRect rect;
if (self->GetBoundingRect(item, rect, textOnly)) { if (self->GetBoundingRect(item, rect, textOnly)) {
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
wxRect* r = new wxRect(rect); wxRect* r = new wxRect(rect);
PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect"), True); PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect"), true);
wxPyEndBlockThreads(blocked); wxPyEndBlockThreads(blocked);
return val; return val;
} }

View File

@@ -61,7 +61,7 @@ public:
// validators beep by default if invalid key is pressed, these functions // validators beep by default if invalid key is pressed, these functions
// allow to change it // allow to change it
static bool IsSilent(); static bool IsSilent();
static void SetBellOnError(int doIt = True); static void SetBellOnError(int doIt = true);
}; };
@@ -83,7 +83,7 @@ public:
self._setOORInfo(self)" self._setOORInfo(self)"
wxPyValidator(); wxPyValidator();
void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=True); void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=true);
}; };

View File

@@ -87,7 +87,7 @@ public:
// find the index of the line we need to show at the top of the window such // find the index of the line we need to show at the top of the window such
// that the last (fully or partially) visible line is the given one // that the last (fully or partially) visible line is the given one
size_t FindFirstFromBottom(size_t lineLast, bool fullyVisible = False) size_t FindFirstFromBottom(size_t lineLast, bool fullyVisible = false)
{ return wxVScrolledWindow::FindFirstFromBottom(lineLast, fullyVisible); } { return wxVScrolledWindow::FindFirstFromBottom(lineLast, fullyVisible); }
// get the total height of the lines between lineMin (inclusive) and // get the total height of the lines between lineMin (inclusive) and
@@ -399,7 +399,7 @@ public:
// otherwise // otherwise
// //
// this function is only valid for the multiple selection listboxes // this function is only valid for the multiple selection listboxes
bool Select(size_t item, bool select = True); bool Select(size_t item, bool select = true);
// selects the items in the specified range whose end points may be given // selects the items in the specified range whose end points may be given
// in any order // in any order

View File

@@ -232,7 +232,7 @@ public:
DocDeclStr( DocDeclStr(
bool , Close( bool force = False ), bool , Close( bool force = false ),
"This function simply generates a EVT_CLOSE event whose handler usually "This function simply generates a EVT_CLOSE event whose handler usually
tries to close the window. It doesn't close the window itself, tries to close the window. It doesn't close the window itself,
however. If force is False (the default) then the window's close however. If force is False (the default) then the window's close
@@ -696,7 +696,7 @@ sizer, interior children, or other means)", "");
// ------------ // ------------
DocDeclStr( DocDeclStr(
virtual bool , Show( bool show = True ), virtual bool , Show( bool show = true ),
"Shows or hides the window. You may need to call Raise for a top level "Shows or hides the window. You may need to call Raise for a top level
window if you want to bring it to top, although this is not needed if window if you want to bring it to top, although this is not needed if
Show is called immediately after the frame creation. Returns True if Show is called immediately after the frame creation. Returns True if
@@ -709,7 +709,7 @@ because it already was in the requested state.", "");
DocDeclStr( DocDeclStr(
virtual bool , Enable( bool enable = True ), virtual bool , Enable( bool enable = true ),
"Enable or disable the window for user input. Note that when a parent "Enable or disable the window for user input. Note that when a parent
window is disabled, all of its children are disabled as well and they window is disabled, all of its children are disabled as well and they
are reenabled again when the parent is. Returns true if the window are reenabled again when the parent is. Returns true if the window
@@ -772,7 +772,7 @@ SetWindowStyleFlag()", "");
DocDeclStr( DocDeclStr(
virtual void , MakeModal(bool modal = True), virtual void , MakeModal(bool modal = true),
"Disables all other windows in the application so that the user can "Disables all other windows in the application so that the user can
only interact with this window. Passing False will reverse this only interact with this window. Passing False will reverse this
effect.", ""); effect.", "");
@@ -1015,7 +1015,7 @@ remove the event handler.", "");
DocDeclStr( DocDeclStr(
wxEvtHandler *, PopEventHandler( bool deleteHandler = False ), wxEvtHandler *, PopEventHandler( bool deleteHandler = false ),
"Removes and returns the top-most event handler on the event handler "Removes and returns the top-most event handler on the event handler
stack. If deleteHandler is True then the wx.EvtHandler object will be stack. If deleteHandler is True then the wx.EvtHandler object will be
destroyed after it is popped.", ""); destroyed after it is popped.", "");
@@ -1110,7 +1110,7 @@ hotkey was registered successfully.", "");
%#if wxUSE_HOTKEY %#if wxUSE_HOTKEY
return self->RegisterHotKey(hotkeyId, modifiers, keycode); return self->RegisterHotKey(hotkeyId, modifiers, keycode);
%#else %#else
return False; return false;
%#endif %#endif
} }
@@ -1121,7 +1121,7 @@ hotkey was registered successfully.", "");
#if wxUSE_HOTKEY #if wxUSE_HOTKEY
return self->UnregisterHotKey(hotkeyId); return self->UnregisterHotKey(hotkeyId);
#else #else
return False; return false;
#endif #endif
} }
} }
@@ -1200,7 +1200,7 @@ release the mouse as many times as you capture it.", "");
// ------------------- // -------------------
DocDeclStr( DocDeclStr(
virtual void , Refresh( bool eraseBackground = True, virtual void , Refresh( bool eraseBackground = true,
const wxRect *rect = NULL ), const wxRect *rect = NULL ),
"Mark the specified rectangle (or the whole window) as \"dirty\" so it "Mark the specified rectangle (or the whole window) as \"dirty\" so it
will be repainted. Causes an EVT_PAINT event to be generated and sent will be repainted. Causes an EVT_PAINT event to be generated and sent
@@ -1610,7 +1610,7 @@ toplevel parent of the window.", "");
int position, int position,
int thumbSize, int thumbSize,
int range, int range,
bool refresh = True ), bool refresh = true ),
"Sets the scrollbar properties of a built-in scrollbar.", "Sets the scrollbar properties of a built-in scrollbar.",
" "
:param orientation: Determines the scrollbar whose page size is to :param orientation: Determines the scrollbar whose page size is to
@@ -1627,7 +1627,7 @@ toplevel parent of the window.", "");
"); ");
DocDeclStr( DocDeclStr(
virtual void , SetScrollPos( int orientation, int pos, bool refresh = True ), virtual void , SetScrollPos( int orientation, int pos, bool refresh = true ),
"Sets the position of one of the built-in scrollbars.", ""); "Sets the position of one of the built-in scrollbars.", "");
DocDeclStr( DocDeclStr(
@@ -1814,16 +1814,16 @@ handler when the window is resized.", "");
DocDeclStr( DocDeclStr(
void , SetSizer(wxSizer *sizer, bool deleteOld = True ), void , SetSizer(wxSizer *sizer, bool deleteOld = true ),
"Sets the window to have the given layout sizer. The window will then "Sets the window to have the given layout sizer. The window will then
own the object, and will take care of its deletion. If an existing own the object, and will take care of its deletion. If an existing
layout sizer object is already owned by the window, it will be deleted layout sizer object is already owned by the window, it will be deleted
if the deleteOld parameter is true. Note that this function will also if the deleteOld parameter is true. Note that this function will also
call SetAutoLayout implicitly with a True parameter if the sizer is call SetAutoLayout implicitly with a True parameter if the sizer is
non-NoneL and False otherwise.", ""); non-None, and False otherwise.", "");
DocDeclStr( DocDeclStr(
void , SetSizerAndFit( wxSizer *sizer, bool deleteOld = True ), void , SetSizerAndFit( wxSizer *sizer, bool deleteOld = true ),
"The same as SetSizer, except it also sets the size hints for the "The same as SetSizer, except it also sets the size hints for the
window based on the sizer's minimum size.", ""); window based on the sizer's minimum size.", "");

View File

@@ -69,7 +69,7 @@ public:
int GetStyle(const wxString& param = wxT("style"), int defaults = 0) int GetStyle(const wxString& param = wxT("style"), int defaults = 0)
{ return wxXmlResourceHandler::GetStyle(param, defaults); } { return wxXmlResourceHandler::GetStyle(param, defaults); }
wxString GetText(const wxString& param, bool translate = True) wxString GetText(const wxString& param, bool translate = true)
{ return wxXmlResourceHandler::GetText(param, translate); } { return wxXmlResourceHandler::GetText(param, translate); }
int GetID() int GetID()
@@ -78,7 +78,7 @@ public:
wxString GetName() wxString GetName()
{ return wxXmlResourceHandler::GetName(); } { return wxXmlResourceHandler::GetName(); }
bool GetBool(const wxString& param, bool defaultv = False) bool GetBool(const wxString& param, bool defaultv = false)
{ return wxXmlResourceHandler::GetBool(param, defaultv); } { return wxXmlResourceHandler::GetBool(param, defaultv); }
long GetLong( const wxString& param, long defaultv = 0 ) long GetLong( const wxString& param, long defaultv = 0 )
@@ -112,7 +112,7 @@ public:
void SetupWindow(wxWindow *wnd) void SetupWindow(wxWindow *wnd)
{ wxXmlResourceHandler::SetupWindow(wnd); } { wxXmlResourceHandler::SetupWindow(wnd); }
void CreateChildren(wxObject *parent, bool this_hnd_only = False) void CreateChildren(wxObject *parent, bool this_hnd_only = false)
{ wxXmlResourceHandler::CreateChildren(parent, this_hnd_only); } { wxXmlResourceHandler::CreateChildren(parent, this_hnd_only); }
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL) void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL)
@@ -204,7 +204,7 @@ public:
// - replaces \n, \r, \t by respective chars (according to C syntax) // - replaces \n, \r, \t by respective chars (according to C syntax)
// - replaces _ by & and __ by _ (needed for _File => &File because of XML) // - replaces _ by & and __ by _ (needed for _File => &File because of XML)
// - calls wxGetTranslations (unless disabled in wxXmlResource) // - calls wxGetTranslations (unless disabled in wxXmlResource)
wxString GetText(const wxString& param, bool translate = True); wxString GetText(const wxString& param, bool translate = true);
// Returns the XRCID. // Returns the XRCID.
int GetID(); int GetID();
@@ -212,8 +212,8 @@ public:
// Returns the resource name. // Returns the resource name.
wxString GetName(); wxString GetName();
// Gets a bool flag (1, t, yes, on, true are True, everything else is False). // Gets a bool flag (1, t, yes, on, true are True, everything else is false).
bool GetBool(const wxString& param, bool defaultv = False); bool GetBool(const wxString& param, bool defaultv = false);
// Gets the integer value from the parameter. // Gets the integer value from the parameter.
long GetLong( const wxString& param, long defaultv = 0 ); long GetLong( const wxString& param, long defaultv = 0 );
@@ -247,7 +247,7 @@ public:
void SetupWindow(wxWindow *wnd); void SetupWindow(wxWindow *wnd);
// Creates children. // Creates children.
void CreateChildren(wxObject *parent, bool this_hnd_only = False); void CreateChildren(wxObject *parent, bool this_hnd_only = false);
// Helper function. // Helper function.
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);

View File

@@ -292,20 +292,20 @@ creation.", "");
DocDeclStr( DocDeclStr(
void, EnableYearChange(bool enable = True), void, EnableYearChange(bool enable = true),
"This function should be used instead of changing CAL_NO_YEAR_CHANGE "This function should be used instead of changing CAL_NO_YEAR_CHANGE
style bit directly. It allows or disallows the user to change the year style bit directly. It allows or disallows the user to change the year
interactively.", ""); interactively.", "");
DocDeclStr( DocDeclStr(
void, EnableMonthChange(bool enable = True), void, EnableMonthChange(bool enable = true),
"This function should be used instead of changing CAL_NO_MONTH_CHANGE "This function should be used instead of changing CAL_NO_MONTH_CHANGE
style bit. It allows or disallows the user to change the month style bit. It allows or disallows the user to change the month
interactively. Note that if the month can not be changed, the year can interactively. Note that if the month can not be changed, the year can
not be changed either.", ""); not be changed either.", "");
DocDeclStr( DocDeclStr(
void, EnableHolidayDisplay(bool display = True), void, EnableHolidayDisplay(bool display = true),
"This function should be used instead of changing CAL_SHOW_HOLIDAYS "This function should be used instead of changing CAL_SHOW_HOLIDAYS
style bit directly. It enables or disables the special highlighting of style bit directly. It enables or disables the special highlighting of
the holidays.", ""); the holidays.", "");

View File

@@ -835,7 +835,7 @@ public:
bool EndEdit(int row, int col, wxGrid* grid) { bool EndEdit(int row, int col, wxGrid* grid) {
bool rv = False; bool rv = false;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
PyObject* go = wxPyMake_wxObject(grid,false); PyObject* go = wxPyMake_wxObject(grid,false);
@@ -993,7 +993,7 @@ public:
%pythonAppend wxGridCellChoiceEditor "self._setOORInfo(self)" %pythonAppend wxGridCellChoiceEditor "self._setOORInfo(self)"
wxGridCellChoiceEditor(int choices = 0, wxGridCellChoiceEditor(int choices = 0,
const wxString* choices_array = NULL, const wxString* choices_array = NULL,
bool allowOthers = False); bool allowOthers = false);
virtual wxString GetValue(); virtual wxString GetValue();
}; };
@@ -1053,8 +1053,8 @@ public:
void SetFont(const wxFont& font); void SetFont(const wxFont& font);
void SetAlignment(int hAlign, int vAlign); void SetAlignment(int hAlign, int vAlign);
void SetSize(int num_rows, int num_cols); void SetSize(int num_rows, int num_cols);
void SetOverflow( bool allow = True ); void SetOverflow( bool allow = true );
void SetReadOnly(bool isReadOnly = True); void SetReadOnly(bool isReadOnly = true);
void SetRenderer(wxGridCellRenderer *renderer); void SetRenderer(wxGridCellRenderer *renderer);
void SetEditor(wxGridCellEditor* editor); void SetEditor(wxGridCellEditor* editor);
@@ -1453,7 +1453,7 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
if (source == Py_None) { if (source == Py_None) {
**obj = wxGridCellCoords(-1,-1); **obj = wxGridCellCoords(-1,-1);
return True; return true;
} }
// If source is an object instance then it may already be the right type // If source is an object instance then it may already be the right type
@@ -1462,7 +1462,7 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords"))) if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
goto error; goto error;
*obj = ptr; *obj = ptr;
return True; return true;
} }
// otherwise a 2-tuple of integers is expected // otherwise a 2-tuple of integers is expected
else if (PySequence_Check(source) && PyObject_Length(source) == 2) { else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
@@ -1476,12 +1476,12 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
**obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2)); **obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2));
Py_DECREF(o1); Py_DECREF(o1);
Py_DECREF(o2); Py_DECREF(o2);
return True; return true;
} }
error: error:
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object."); PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object.");
return False; return false;
} }
@@ -1490,13 +1490,13 @@ bool wxGridCellCoords_typecheck(PyObject* source) {
if (wxPySwigInstance_Check(source) && if (wxPySwigInstance_Check(source) &&
wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords"))) wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
return True; return true;
PyErr_Clear(); PyErr_Clear();
if (PySequence_Check(source) && PySequence_Length(source) == 2) if (PySequence_Check(source) && PySequence_Length(source) == 2)
return True; return true;
return False; return false;
} }
%} %}
@@ -1643,17 +1643,17 @@ public:
wxGridTableBase * GetTable() const; wxGridTableBase * GetTable() const;
bool SetTable( wxGridTableBase *table, bool takeOwnership=False, bool SetTable( wxGridTableBase *table, bool takeOwnership=false,
WXGRIDSELECTIONMODES selmode = WXGRIDSELECTIONMODES selmode =
wxGrid::wxGridSelectCells ); wxGrid::wxGridSelectCells );
void ClearGrid(); void ClearGrid();
bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=True ); bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=true );
bool AppendRows( int numRows = 1, bool updateLabels=True ); bool AppendRows( int numRows = 1, bool updateLabels=true );
bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels=True ); bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels=true );
bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels=True ); bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels=true );
bool AppendCols( int numCols = 1, bool updateLabels=True ); bool AppendCols( int numCols = 1, bool updateLabels=true );
bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=True ); bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=true );
// this function is called when the current cell highlight must be redrawn // this function is called when the current cell highlight must be redrawn
@@ -1695,7 +1695,7 @@ public:
bool IsEditable(); bool IsEditable();
void EnableEditing( bool edit ); void EnableEditing( bool edit );
void EnableCellEditControl( bool enable = True ); void EnableCellEditControl( bool enable = true );
void DisableCellEditControl(); void DisableCellEditControl();
bool CanEnableCellControl() const; bool CanEnableCellControl() const;
bool IsCellEditControlEnabled() const; bool IsCellEditControlEnabled() const;
@@ -1739,8 +1739,8 @@ public:
// check to see if a cell is either wholly visible (the default arg) or // check to see if a cell is either wholly visible (the default arg) or
// at least partially visible in the grid window // at least partially visible in the grid window
// //
bool IsVisible( int row, int col, bool wholeCellVisible = True ); bool IsVisible( int row, int col, bool wholeCellVisible = true );
// TODO: ??? bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = True ); // TODO: ??? bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = true );
void MakeCellVisible( int row, int col ); void MakeCellVisible( int row, int col );
// TODO: ??? void MakeCellVisible( const wxGridCellCoords& coords ); // TODO: ??? void MakeCellVisible( const wxGridCellCoords& coords );
@@ -1801,17 +1801,17 @@ public:
void SetCellHighlightPenWidth(int width); void SetCellHighlightPenWidth(int width);
void SetCellHighlightROPenWidth(int width); void SetCellHighlightROPenWidth(int width);
void EnableDragRowSize( bool enable = True ); void EnableDragRowSize( bool enable = true );
void DisableDragRowSize(); void DisableDragRowSize();
bool CanDragRowSize(); bool CanDragRowSize();
void EnableDragColSize( bool enable = True ); void EnableDragColSize( bool enable = true );
void DisableDragColSize(); void DisableDragColSize();
bool CanDragColSize(); bool CanDragColSize();
void EnableDragGridSize(bool enable = True); void EnableDragGridSize(bool enable = true);
void DisableDragGridSize(); void DisableDragGridSize();
bool CanDragGridSize(); bool CanDragGridSize();
void EnableDragCell( bool enable = True ); void EnableDragCell( bool enable = true );
void DisableDragCell(); void DisableDragCell();
bool CanDragCell(); bool CanDragCell();
@@ -1835,7 +1835,7 @@ public:
void SetColFormatFloat(int col, int width = -1, int precision = -1); void SetColFormatFloat(int col, int width = -1, int precision = -1);
void SetColFormatCustom(int col, const wxString& typeName); void SetColFormatCustom(int col, const wxString& typeName);
void EnableGridLines( bool enable = True ); void EnableGridLines( bool enable = true );
bool GridLinesEnabled(); bool GridLinesEnabled();
// ------ row and col formatting // ------ row and col formatting
@@ -1866,22 +1866,22 @@ public:
void, GetCellSize( int row, int col, int *OUTPUT, int *OUTPUT ), void, GetCellSize( int row, int col, int *OUTPUT, int *OUTPUT ),
"GetCellSize(int row, int col) -> (num_rows, num_cols)"); "GetCellSize(int row, int col) -> (num_rows, num_cols)");
void SetDefaultRowSize( int height, bool resizeExistingRows = False ); void SetDefaultRowSize( int height, bool resizeExistingRows = false );
void SetRowSize( int row, int height ); void SetRowSize( int row, int height );
void SetDefaultColSize( int width, bool resizeExistingCols = False ); void SetDefaultColSize( int width, bool resizeExistingCols = false );
void SetColSize( int col, int width ); void SetColSize( int col, int width );
// automatically size the column or row to fit to its contents, if // automatically size the column or row to fit to its contents, if
// setAsMin is True, this optimal width will also be set as minimal width // setAsMin is True, this optimal width will also be set as minimal width
// for this column // for this column
void AutoSizeColumn( int col, bool setAsMin = True ); void AutoSizeColumn( int col, bool setAsMin = true );
void AutoSizeRow( int row, bool setAsMin = True ); void AutoSizeRow( int row, bool setAsMin = true );
// auto size all columns (very ineffective for big grids!) // auto size all columns (very ineffective for big grids!)
void AutoSizeColumns( bool setAsMin = True ); void AutoSizeColumns( bool setAsMin = true );
void AutoSizeRows( bool setAsMin = True ); void AutoSizeRows( bool setAsMin = true );
// auto size the grid, that is make the columns/rows of the "right" size // auto size the grid, that is make the columns/rows of the "right" size
// and also set the grid size to just fit its contents // and also set the grid size to just fit its contents
@@ -1944,15 +1944,15 @@ public:
bool IsReadOnly(int row, int col) const; bool IsReadOnly(int row, int col) const;
// make the cell editable/readonly // make the cell editable/readonly
void SetReadOnly(int row, int col, bool isReadOnly = True); void SetReadOnly(int row, int col, bool isReadOnly = true);
// ------ selections of blocks of cells // ------ selections of blocks of cells
// //
void SelectRow( int row, bool addToSelected = False ); void SelectRow( int row, bool addToSelected = false );
void SelectCol( int col, bool addToSelected = False ); void SelectCol( int col, bool addToSelected = false );
void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
bool addToSelected = False ); bool addToSelected = false );
// TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft, // TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft,
// TODO: ??? const wxGridCellCoords& bottomRight ) // TODO: ??? const wxGridCellCoords& bottomRight )
@@ -2026,8 +2026,8 @@ class wxGridEvent : public wxNotifyEvent
{ {
public: public:
wxGridEvent(int id, wxEventType type, wxGrid* obj, wxGridEvent(int id, wxEventType type, wxGrid* obj,
int row=-1, int col=-1, int x=-1, int y=-1, bool sel = True, int row=-1, int col=-1, int x=-1, int y=-1, bool sel = true,
bool control=False, bool shift=False, bool alt=False, bool meta=False); bool control=false, bool shift=false, bool alt=false, bool meta=false);
virtual int GetRow(); virtual int GetRow();
virtual int GetCol(); virtual int GetCol();
@@ -2046,7 +2046,7 @@ class wxGridSizeEvent : public wxNotifyEvent
public: public:
wxGridSizeEvent(int id, wxEventType type, wxGrid* obj, wxGridSizeEvent(int id, wxEventType type, wxGrid* obj,
int rowOrCol=-1, int x=-1, int y=-1, int rowOrCol=-1, int x=-1, int y=-1,
bool control=False, bool shift=False, bool alt=False, bool meta=False); bool control=false, bool shift=false, bool alt=false, bool meta=false);
int GetRowOrCol(); int GetRowOrCol();
wxPoint GetPosition(); wxPoint GetPosition();
@@ -2064,9 +2064,9 @@ public:
wxGridRangeSelectEvent(int id, wxEventType type, wxGrid* obj, wxGridRangeSelectEvent(int id, wxEventType type, wxGrid* obj,
const wxGridCellCoords& topLeft, const wxGridCellCoords& topLeft,
const wxGridCellCoords& bottomRight, const wxGridCellCoords& bottomRight,
bool sel = True, bool sel = true,
bool control=False, bool shift=False, bool control=false, bool shift=false,
bool alt=False, bool meta=False); bool alt=false, bool meta=false);
wxGridCellCoords GetTopLeftCoords(); wxGridCellCoords GetTopLeftCoords();
wxGridCellCoords GetBottomRightCoords(); wxGridCellCoords GetBottomRightCoords();

View File

@@ -137,7 +137,7 @@ public:
wxString GetName(); wxString GetName();
bool HasParam(const wxString& par); bool HasParam(const wxString& par);
wxString GetParam(const wxString& par, int with_commas = False); wxString GetParam(const wxString& par, int with_commas = false);
// Can't do this one as-is, but GetParam should be enough... // Can't do this one as-is, but GetParam should be enough...
//int ScanParam(const wxString& par, const char *format, void* param); //int ScanParam(const wxString& par, const char *format, void* param);
@@ -635,7 +635,7 @@ public:
// returns True if this filter is able to open&read given file // returns True if this filter is able to open&read given file
virtual bool CanRead(const wxFSFile& file) const { virtual bool CanRead(const wxFSFile& file) const {
bool rval = False; bool rval = false;
bool found; bool found;
bool blocked = wxPyBeginBlockThreads(); bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) { if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) {
@@ -947,7 +947,7 @@ public:
void SetSize(int width, int height); void SetSize(int width, int height);
void SetHtmlText(const wxString& html, void SetHtmlText(const wxString& html,
const wxString& basepath = wxPyEmptyString, const wxString& basepath = wxPyEmptyString,
bool isdir = True); bool isdir = true);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used). // Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
%extend { %extend {
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) { void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
@@ -962,7 +962,7 @@ public:
// Sets font sizes to be relative to the given size or the system default size // Sets font sizes to be relative to the given size or the system default size
void NormalizeFontSizes(int size=-1); void NormalizeFontSizes(int size=-1);
int Render(int x, int y, int from = 0, int dont_render = False, int to = INT_MAX, int Render(int x, int y, int from = 0, int dont_render = false, int to = INT_MAX,
//int *known_pagebreaks = NULL, int number_of_pages = 0 //int *known_pagebreaks = NULL, int number_of_pages = 0
int* choices=NULL, int LCOUNT = 0 int* choices=NULL, int LCOUNT = 0
); );
@@ -988,7 +988,7 @@ public:
void SetHtmlText(const wxString& html, void SetHtmlText(const wxString& html,
const wxString &basepath = wxPyEmptyString, const wxString &basepath = wxPyEmptyString,
bool isdir = True); bool isdir = true);
void SetHtmlFile(const wxString &htmlfile); void SetHtmlFile(const wxString &htmlfile);
void SetHeader(const wxString& header, int pg = wxPAGE_ALL); void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL); void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
@@ -1188,7 +1188,7 @@ public:
void SetTitleFormat(const wxString& format); void SetTitleFormat(const wxString& format);
void SetTempDir(const wxString& path); void SetTempDir(const wxString& path);
bool AddBook(const wxString& book, int show_wait_msg = False); bool AddBook(const wxString& book, int show_wait_msg = false);
void Display(const wxString& x); void Display(const wxString& x);
%name(DisplayID) void Display(int id); %name(DisplayID) void Display(int id);
void DisplayContents(); void DisplayContents();

View File

@@ -47,10 +47,10 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
// wxString typemaps // wxString typemaps
%typemap(in) wxString& (bool temp=False) { %typemap(in) wxString& (bool temp=false) {
$1 = wxString_in_helper($input); $1 = wxString_in_helper($input);
if ($1 == NULL) SWIG_fail; if ($1 == NULL) SWIG_fail;
temp = True; temp = true;
} }
%typemap(freearg) wxString& { %typemap(freearg) wxString& {
if (temp$argnum) if (temp$argnum)
@@ -101,7 +101,7 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// wxMemoryBuffer (needed for wxSTC) // wxMemoryBuffer (needed for wxSTC)
%typemap(in) wxMemoryBuffer& (bool temp=False) { %typemap(in) wxMemoryBuffer& (bool temp=false) {
if (!PyString_Check($input)) { if (!PyString_Check($input)) {
PyErr_SetString(PyExc_TypeError, "String buffer expected"); PyErr_SetString(PyExc_TypeError, "String buffer expected");
SWIG_fail; SWIG_fail;
@@ -109,7 +109,7 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
char* str = PyString_AS_STRING($input); char* str = PyString_AS_STRING($input);
int len = PyString_GET_SIZE($input); int len = PyString_GET_SIZE($input);
$1 = new wxMemoryBuffer(len); $1 = new wxMemoryBuffer(len);
temp = True; temp = true;
memcpy($1->GetData(), str, len); memcpy($1->GetData(), str, len);
$1->SetDataLen(len); $1->SetDataLen(len);
} }
@@ -191,13 +191,13 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Typemap for wxArrayString from Python sequence objects // Typemap for wxArrayString from Python sequence objects
%typemap(in) wxArrayString& (bool temp=False) { %typemap(in) wxArrayString& (bool temp=false) {
if (! PySequence_Check($input)) { if (! PySequence_Check($input)) {
PyErr_SetString(PyExc_TypeError, "Sequence of strings expected."); PyErr_SetString(PyExc_TypeError, "Sequence of strings expected.");
SWIG_fail; SWIG_fail;
} }
$1 = new wxArrayString; $1 = new wxArrayString;
temp = True; temp = true;
int i, len=PySequence_Length($input); int i, len=PySequence_Length($input);
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
PyObject* item = PySequence_GetItem($input, i); PyObject* item = PySequence_GetItem($input, i);
@@ -220,13 +220,13 @@ MAKE_INT_ARRAY_TYPEMAPS(styles, styles_field)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Typemap for wxArrayInt from Python sequence objects // Typemap for wxArrayInt from Python sequence objects
%typemap(in) wxArrayInt& (bool temp=False) { %typemap(in) wxArrayInt& (bool temp=false) {
if (! PySequence_Check($input)) { if (! PySequence_Check($input)) {
PyErr_SetString(PyExc_TypeError, "Sequence of integers expected."); PyErr_SetString(PyExc_TypeError, "Sequence of integers expected.");
SWIG_fail; SWIG_fail;
} }
$1 = new wxArrayInt; $1 = new wxArrayInt;
temp = True; temp = true;
int i, len=PySequence_Length($input); int i, len=PySequence_Length($input);
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
PyObject* item = PySequence_GetItem($input, i); PyObject* item = PySequence_GetItem($input, i);

View File

@@ -65,7 +65,7 @@ class wxWizardEvent : public wxNotifyEvent
public: public:
wxWizardEvent(wxEventType type = wxEVT_NULL, wxWizardEvent(wxEventType type = wxEVT_NULL,
int id = -1, int id = -1,
bool direction = True, bool direction = true,
wxWizardPage* page = NULL); wxWizardPage* page = NULL);
// for EVT_WIZARD_PAGE_CHANGING, return True if we're going forward or // for EVT_WIZARD_PAGE_CHANGING, return True if we're going forward or
@@ -380,7 +380,7 @@ public:
// show the prev/next page, but call TransferDataFromWindow on the current // show the prev/next page, but call TransferDataFromWindow on the current
// page first and return False without changing the page if // page first and return False without changing the page if
// TransferDataFromWindow() returns False - otherwise, returns True // TransferDataFromWindow() returns False - otherwise, returns True
bool ShowPage(wxWizardPage *page, bool goingForward = True); bool ShowPage(wxWizardPage *page, bool goingForward = true);
bool HasNextPage(wxWizardPage* page); bool HasNextPage(wxWizardPage* page);
bool HasPrevPage(wxWizardPage* page); bool HasPrevPage(wxWizardPage* page);