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
+15 -11
View File
@@ -4,7 +4,7 @@ RCS file: /cvsroot/swig/SWIG/Doc/Manual/Python.html,v
retrieving revision 1.18
diff -u -4 -r1.18 Python.html
--- 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 @@
<li><a href="#Python_nn62">Mapping Python tuples into small 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
diff -u -4 -r1.50 python.cxx
--- 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 @@
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 (Strcmp(value, "NULL") == 0)
+ 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 {
+ lookup = Swig_symbol_clookup(value, 0);
+ if (lookup)
@@ -725,7 +729,7 @@ diff -u -4 -r1.50 python.cxx
if (*t == '{') {
Delitem(str ,0);
Delitem(str,DOH_END);
@@ -1686,9 +2011,18 @@
@@ -1686,9 +2015,18 @@
mod = Getattr(n,"module");
if (mod) {
String *modname = Getattr(mod,"name");
@@ -745,7 +749,7 @@ diff -u -4 -r1.50 python.cxx
importname = NewString(Getattr(n,"sym:name"));
}
Setattr(n,"python:proxy",importname);
@@ -1760,9 +2094,11 @@
@@ -1760,9 +2098,11 @@
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);
if (Len(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);
Printv(f_shadow,pycode,"\n",NIL);
} 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) {
String *symname = Getattr(n,"sym:name");
Language::staticmemberfunctionHandler(n);
@@ -817,7 +821,7 @@ diff -u -4 -r1.50 python.cxx
" = staticmethod(", symname, ")\n", NIL);
if (!modern) {
@@ -2022,8 +2374,12 @@
@@ -2022,8 +2378,12 @@
}
Printv(f_shadow, tab4, "def __init__(self, *args",
@@ -830,7 +834,7 @@ diff -u -4 -r1.50 python.cxx
if (!modern) {
Printv(f_shadow, tab8, "_swig_setattr(self, ", rclassname, ", 'this', ",
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.thisown = 1\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;
} else {
@@ -2055,13 +2411,17 @@
@@ -2055,13 +2415,17 @@
} else {
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);
Printv(f_shadow,pycode,"\n", NIL);
} else {
+4 -4
View File
@@ -57,7 +57,7 @@ typedef unsigned short VARTYPE;
// Some conversion helpers
static wxVariant _PyObj2Variant(PyObject* value);
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);
// Check if an exception has been raised (blocking threads)
@@ -460,7 +460,7 @@ public:
// conversion errors for now
wxVariant wv;
MSWVariantToVariant(rv, wv);
rval = _Variant2PyObj(wv, True);
rval = _Variant2PyObj(wv, true);
VariantClear(&rv);
if (func.hasOut) {
@@ -477,7 +477,7 @@ public:
const wxParamX &px = func.params[i];
if (px.IsOut()) {
MSWVariantToVariant(va, wv);
PyObject* obj = _Variant2PyObj(wv, True);
PyObject* obj = _Variant2PyObj(wv, true);
PyList_Append(lst, obj);
}
}
@@ -642,7 +642,7 @@ public:
Py_DECREF(pList);
for (int i=0; i<self->ParamCount(); i+=1) {
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);
PyList_Append(pList, name);
Py_DECREF(val);
+13 -13
View File
@@ -286,8 +286,8 @@ public:
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
PyObject* dcobj = wxPyMake_wxObject(&dc,false);
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), False);
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), False);
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), false);
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
Py_DECREF(dcobj);
Py_DECREF(idobj);
@@ -455,7 +455,7 @@ public:
wxTreeListColumnInfo(const wxString& text = wxPyEmptyString,
int image = -1,
size_t width = 100,
bool shown = True,
bool shown = true,
wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT);
bool GetShown() const;
@@ -702,10 +702,10 @@ public:
// allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory
// 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
void SetItemBold(const wxTreeItemId& item, bool bold = True);
void SetItemBold(const wxTreeItemId& item, bool bold = true);
// set the item's text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour);
@@ -740,7 +740,7 @@ public:
// if 'recursively' is False, only immediate children count, otherwise
// 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
@@ -762,7 +762,7 @@ public:
num = self->GetSelections(array);
for (x=0; x < num; 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);
}
wxPyEndBlockThreads(blocked);
@@ -793,7 +793,7 @@ public:
wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
bool blocked = wxPyBeginBlockThreads();
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")));
wxPyEndBlockThreads(blocked);
return tup;
@@ -808,7 +808,7 @@ public:
wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
bool blocked = wxPyBeginBlockThreads();
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")));
wxPyEndBlockThreads(blocked);
return tup;
@@ -905,10 +905,10 @@ public:
void UnselectAll();
// select this item
void SelectItem(const wxTreeItemId& item, bool unselect_others=True,
bool extended_select=False);
void SelectItem(const wxTreeItemId& item, bool unselect_others=true,
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
// scrolling to this item if necessary)
@@ -922,7 +922,7 @@ public:
%extend {
// 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;
if (self->GetBoundingRect(item, rect, textOnly)) {
bool blocked = wxPyBeginBlockThreads();
+2 -2
View File
@@ -100,8 +100,8 @@ public:
void SetCharset(wxString charset);
void SetEditMode(bool seton);
bool GetEditMode();
wxString GetStringSelection(bool asHTML = False);
wxString GetText(bool asHTML = False);
wxString GetStringSelection(bool asHTML = false);
wxString GetText(bool asHTML = false);
bool GoBack();
bool GoForward();
+18 -18
View File
@@ -112,7 +112,7 @@ public:
void base_OnDelete();
void base_OnDraw(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_OnErase(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_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
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);
void base_OnMovePost(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_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_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_OnDrawControlPoints(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_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);
@@ -198,21 +198,21 @@ public:
void ResetMandatoryControlPoints();
bool Recompute();
void CalculateSize();
void Select(bool select = True, wxDC* dc = NULL);
void SetHighlight(bool hi = True, bool recurse = False);
void Select(bool select = true, wxDC* dc = NULL);
void SetHighlight(bool hi = true, bool recurse = false);
bool IsHighlighted() ;
bool Selected();
bool AncestorSelected();
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = False);
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = false);
int GetSensitivityFilter();
void SetDraggable(bool drag, bool recursive = False);
void SetDraggable(bool drag, bool recursive = false);
void SetFixedSize(bool x, bool y);
void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ;
bool GetFixedWidth();
bool GetFixedHeight();
void SetSpaceAttachments(bool sp);
bool GetSpaceAttachments() ;
void SetShadowMode(int mode, bool redraw = False);
void SetShadowMode(int mode, bool redraw = false);
int GetShadowMode();
bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT);
void SetCentreResize(bool cr);
@@ -256,14 +256,14 @@ public:
void Show(bool show);
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 EraseContents(wxDC& dc);
void Draw(wxDC& dc);
void Flash();
void MoveLinks(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 Attach(wxPyShapeCanvas *can);
void Detach();
@@ -330,8 +330,8 @@ public:
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
int nth, int noArcs, wxPyLineShape* line);
bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = False);
void DrawLinks(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);
bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move,
double x, double y);
@@ -362,7 +362,7 @@ public:
int LogicalToPhysicalAttachment(int logicalAttachment);
bool Draggable();
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 CopyWithHandler(wxPyShape& copy);
void Rotate(double x, double y, double theta);
@@ -377,7 +377,7 @@ public:
void base_OnDelete();
void base_OnDraw(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_OnErase(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_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
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);
void base_OnMovePost(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_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_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_OnDrawControlPoints(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_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);
+21 -21
View File
@@ -153,8 +153,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -204,8 +204,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -255,8 +255,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -335,8 +335,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -457,8 +457,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -508,8 +508,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -586,8 +586,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
+15 -15
View File
@@ -39,8 +39,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -83,8 +83,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -247,8 +247,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -344,8 +344,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
@@ -388,8 +388,8 @@ public:
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_OnSize(double x, double y);
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);
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_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_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_OnDrawControlPoints(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_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);
+4 -4
View File
@@ -53,9 +53,9 @@ public:
char Peek() { if (m_wxis) return m_wxis->Peek(); else return -1; }
char GetC() { if (m_wxis) return m_wxis->GetC(); else return -1; }
size_t LastRead() { if (m_wxis) return m_wxis->LastRead(); else return 0; }
bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return False; }
bool Eof() { if (m_wxis) return m_wxis->Eof(); else return False; }
bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return False; }
bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return false; }
bool Eof() { if (m_wxis) return m_wxis->Eof(); else return false; }
bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return false; }
unsigned long SeekI(unsigned long pos, wxSeekMode mode)
{ if (m_wxis) return m_wxis->SeekI(pos, mode); else return 0; }
@@ -72,7 +72,7 @@ public:
virtual size_t GetSize() const;
// factory function
static wxPyCBInputStream* create(PyObject *py, bool block=True);
static wxPyCBInputStream* create(PyObject *py, bool block=true);
protected:
// can only be created via the factory
+1 -1
View File
@@ -115,7 +115,7 @@ inline wxPyCoreAPI* wxPyGetCoreAPIPtr()
#define wxPyCBH_callCallbackObj(a, b) (wxPyGetCoreAPIPtr()->p_wxPyCBH_callCallbackObj(a, b))
#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_wxSizer(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxSizer(a,b))
#define wxPyPtrTypeMap_Add(a, b) (wxPyGetCoreAPIPtr()->p_wxPyPtrTypeMap_Add(a, b))
+28 -30
View File
@@ -20,6 +20,7 @@
#include <wx/busyinfo.h>
#include <wx/caret.h>
#include <wx/choicebk.h>
#include <wx/clipbrd.h>
#include <wx/colordlg.h>
#include <wx/config.h>
@@ -82,9 +83,6 @@
typedef unsigned char byte;
typedef wxPoint2DDouble wxPoint2D;
const bool True = true;
const bool False = false;
#ifndef wxPyUSE_EXPORTED_API
@@ -109,7 +107,7 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* classname);
PyObject* wx2PyString(const wxString& src);
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);
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))
goto error;
*obj = ptr;
return True;
return true;
}
// otherwise a 2-tuple of integers is expected
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));
Py_DECREF(o1);
Py_DECREF(o2);
return True;
return true;
}
error:
wxString msg;
msg.Printf(wxT("Expected a 2-tuple of integers or a %s object."), name);
PyErr_SetString(PyExc_TypeError, msg.mb_str());
return False;
return false;
}
@@ -275,7 +273,7 @@ public:
wxPyEvtSelfRef();
~wxPyEvtSelfRef();
void SetSelf(PyObject* self, bool clone=False);
void SetSelf(PyObject* self, bool clone=false);
PyObject* GetSelf() const;
bool GetCloned() const { return m_cloned; }
@@ -517,7 +515,7 @@ public:
m_class = NULL;
m_self = NULL;
m_lastFound = NULL;
m_incRef = False;
m_incRef = false;
}
~wxPyCallbackHelper() {
@@ -528,7 +526,7 @@ public:
#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;
int callCallback(PyObject* argTuple) const;
PyObject* callCallbackObj(PyObject* argTuple) const;
@@ -664,7 +662,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INTINT(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a, int b) { \
bool rval=False, found; \
bool rval=false, found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
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) \
bool CLASS::CBNAME(bool a) { \
bool rval=False, found; \
bool rval=false, found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
@@ -898,7 +896,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INT(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a) { \
bool rval=False, found; \
bool rval=false, found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
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) \
bool CLASS::CBNAME(int a) { \
bool rval=False; \
bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \
else rval = False; \
else rval = false; \
wxPyEndBlockThreads(blocked); \
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 found; \
bool blocked = wxPyBeginBlockThreads(); \
bool rval=False; \
bool rval=false; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* obj = wxPyMake_wxObject(&a,false); \
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) \
bool CLASS::CBNAME(const wxString& a) { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1315,7 +1313,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a) { \
bool rval=False; \
bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* s = wx2PyString(a); \
@@ -1407,7 +1405,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1532,7 +1530,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxHtmlTag& a) { \
bool rval=False; \
bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)&a, wxT("wxHtmlTag"), 0);\
@@ -1677,7 +1675,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxWindow* a) { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1703,7 +1701,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_WXWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxWindow* a, wxDC& b) { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -1755,7 +1753,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME() { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
@@ -1778,7 +1776,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_const(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME() const { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
@@ -1850,7 +1848,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_DR(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxDragResult a) { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
@@ -1887,7 +1885,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(int a, int b, const wxString& c) { \
bool rval=False; \
bool rval=false; \
bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* s = wx2PyString(c); \
@@ -2033,7 +2031,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \
bool CLASS::CBNAME(Type& a) { \
bool rv=False; \
bool rv=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -2058,7 +2056,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_bool_anypure(CLASS, PCLASS, CBNAME, Type) \
bool CLASS::CBNAME(Type& a) { \
bool rv=False; \
bool rv=false; \
bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)&a, wxT(#Type), 0); \
@@ -2166,7 +2164,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxMouseEvent& e) { \
bool rval=False; \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
@@ -2285,7 +2283,7 @@ extern wxPyApp *wxPythonApp;
#define IMP_PYCALLBACK_BOOL_NODE_pure(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxXmlNode* a) { \
bool rv=False; \
bool rv=false; \
bool blocked = wxPyBeginBlockThreads(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* obj = wxPyConstructObject((void*)a, wxT("wxXmlNode"), 0); \
+2 -2
View File
@@ -115,7 +115,7 @@ during each event loop iteration.", "");
DocDeclStr(
virtual bool, Yield(bool onlyIfNeeded = False),
virtual bool, Yield(bool onlyIfNeeded = false),
"Process all currently pending events right now, instead of waiting
until return to the event loop. It is an error to call ``Yield``
recursively unless the value of ``onlyIfNeeded`` is True.
@@ -307,7 +307,7 @@ 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
user input to all program windows before calling `wx.Yield` and
re-enables it again afterwards. If ``win`` is not None, this window
+2 -2
View File
@@ -289,8 +289,8 @@ the ``type`` parameter.", "");
%pythoncode { def __nonzero__(self): return self.Ok() }
%extend {
bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : True; }
bool __eq__(const wxBitmap* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxBitmap* other) { return other ? (*self != *other) : true; }
}
};
+1 -1
View File
@@ -113,7 +113,7 @@ exit. Returns False if the operation is unsuccesful for any reason.", "");
DocDeclStr(
virtual void , UsePrimarySelection( bool primary = True ),
virtual void , UsePrimarySelection( bool primary = true ),
"On platforms supporting it (the X11 based platforms), selects the
so called PRIMARY SELECTION as the clipboard as opposed to the
normal clipboard, if primary is True.", "");
+8 -8
View File
@@ -92,7 +92,7 @@ reference to the previous global config object.", "");
DocDeclStr(
static wxConfigBase *, Get(bool createOnDemand = True),
static wxConfigBase *, Get(bool createOnDemand = true),
"Returns the current global config object, creating one if neccessary.", "");
@@ -192,12 +192,12 @@ GetNextGroup to fetch the next item.", "");
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
subgroups.", "");
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
subgroups.", "");
@@ -249,7 +249,7 @@ subgroups.", "");
DocStr(ReadBool,
"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;
self->Read(key, &rv, defaultVal);
return rv;
@@ -279,7 +279,7 @@ subgroups.", "");
DocDeclStr(
virtual bool , Flush(bool currentOnly = False),
virtual bool , Flush(bool currentOnly = false),
"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
DocDeclStr(
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
last key in it and the second parameter is True", "");
@@ -318,7 +318,7 @@ primarly intended for use by deinstallation routine.", "");
DocDeclStr(
void , SetExpandEnvVars(bool doIt = True),
void , SetExpandEnvVars(bool doIt = true),
"We can automatically expand environment variables in the config
entries this option is on by default, you can turn it on/off at any
time)", "");
@@ -329,7 +329,7 @@ time)", "");
DocDeclStr(
void , SetRecordDefaults(bool doIt = True),
void , SetRecordDefaults(bool doIt = true),
"Set whether the config objec should record default values.", "");
DocDeclStr(
+1 -1
View File
@@ -94,7 +94,7 @@ bool wxPyConvertSwigPtr(PyObject* obj, void **ptr,
const wxChar* 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;
}
+1 -1
View File
@@ -138,7 +138,7 @@ MustHaveApp(wxContextHelp);
class wxContextHelp : public wxObject {
public:
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
true (the default).
+1 -1
View File
@@ -77,7 +77,7 @@ This constructor is not available on wxGTK, use ``wx.StockCursor``,
``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.", "");
wxCursor(const wxString* cursorName, long type, int hotSpotX=0, int hotSpotY=0) {
%#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."));
%#else
return new wxCursor(*cursorName, type, hotSpotX, hotSpotY);
+8 -8
View File
@@ -247,7 +247,7 @@ in the given direction.", "");
PyObject* list = PyList_New(count);
for (size_t i=0; i<count; 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);
Py_DECREF(obj);
}
@@ -308,7 +308,7 @@ in the given direction.", "");
else {
// raise a TypeError if not a string
PyErr_SetString(PyExc_TypeError, "String expected.");
rval = False;
rval = false;
}
wxPyEndBlockThreads(blocked);
return rval;
@@ -395,7 +395,7 @@ derived class if the object supports setting its data.
else {
// raise a TypeError if not a string
PyErr_SetString(PyExc_TypeError, "String expected.");
rval = False;
rval = false;
}
wxPyEndBlockThreads(blocked);
return rval;
@@ -427,7 +427,7 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) const {
// return either a string or None and then act appropriately with the
// C++ version.
bool rval = False;
bool rval = false;
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) {
PyObject* ro;
@@ -446,7 +446,7 @@ bool wxPyDataObjectSimple::GetDataHere(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
// and send it to the Python method.
bool rval = False;
bool rval = false;
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "SetData")) {
PyObject* data = PyString_FromStringAndSize((char*)buf, len);
@@ -524,7 +524,7 @@ public:
%apply SWIGTYPE *DISOWN { wxDataObjectSimple *dataObject };
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
the preferred object if preferred is True.", "");
@@ -683,7 +683,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() const {
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
bool blocked = wxPyBeginBlockThreads();
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));
Py_DECREF(bo);
}
@@ -770,7 +770,7 @@ public:
else {
// raise a TypeError if not a string
PyErr_SetString(PyExc_TypeError, "String expected.");
rval = False;
rval = false;
}
wxPyEndBlockThreads(blocked);
return rval;
+22 -22
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));
temp = True;
temp = true;
}
%typemap(python,freearg) wxDateTime::TimeZone& {
if (temp$argnum) delete $1;
@@ -570,12 +570,12 @@ public:
// timezone stuff
// transform to any given timezone
wxDateTime ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = False);
wxDateTime& MakeTimezone(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);
// transform to GMT/UTC
wxDateTime ToGMT(bool noDST = False);
wxDateTime& MakeGMT(bool noDST = False);
wxDateTime ToGMT(bool noDST = false);
wxDateTime& MakeGMT(bool noDST = false);
// is daylight savings time in effect at this moment according to the
// rules of the specified country?
@@ -724,10 +724,10 @@ public:
wxDateTime __sub__(const wxTimeSpan& other) { return *self - other; }
wxDateTime __sub__(const wxDateSpan& other) { return *self - other; }
// bool __lt__(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 __ge__(const wxDateTime* other) { return other ? (*self >= *other) : True; }
// bool __lt__(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 __ge__(const wxDateTime* other) { return other ? (*self >= *other) : true; }
// 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 __rmul__(int n) { return n * *self; }
bool __lt__(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 __ge__(const wxTimeSpan* other) { return other ? (*self >= *other) : True; }
bool __eq__(const wxTimeSpan* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxTimeSpan* other) { return other ? (*self != *other) : True; }
bool __lt__(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 __ge__(const wxTimeSpan* other) { return other ? (*self >= *other) : true; }
bool __eq__(const wxTimeSpan* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxTimeSpan* other) { return other ? (*self != *other) : true; }
}
@@ -1120,13 +1120,13 @@ public:
wxDateSpan __mul__(int n) { return *self * n; }
wxDateSpan __rmul__(int n) { return n * *self; }
// bool __lt__(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 __ge__(const wxDateSpan* other) { return other ? (*self >= *other) : True; }
// bool __lt__(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 __ge__(const wxDateSpan* other) { return other ? (*self >= *other) : true; }
bool __eq__(const wxDateSpan* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxDateSpan* other) { return other ? (*self != *other) : True; }
bool __eq__(const wxDateSpan* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxDateSpan* other) { return other ? (*self != *other) : true; }
}
};
+6 -6
View File
@@ -246,8 +246,8 @@ current text background colour to draw the background (all bits set to
0).
:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`");
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);
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);
DocStr(
@@ -285,7 +285,7 @@ font. ``wx.SWISS_FONT`` is an example of a font which is.","
DocDeclStr(
bool , Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
int rop = wxCOPY, bool useMask = False,
int rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1),
"Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates,
@@ -312,7 +312,7 @@ position.", "
DocDeclStrName(
bool , Blit(const wxPoint& destPt, const wxSize& sz,
wxDC *source, const wxPoint& srcPt,
int rop = wxCOPY, bool useMask = False,
int rop = wxCOPY, bool useMask = false,
const wxPoint& srcPtMask = wxDefaultPosition),
"Copy from a source DC to this DC. Parameters specify the destination
coordinates, size of area to copy, source DC, source coordinates,
@@ -1575,7 +1575,7 @@ public:
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device,
// const wxString& output,
// bool interactive = True,
// bool interactive = true,
// int orientation = wxPORTRAIT);
};
@@ -1597,7 +1597,7 @@ public:
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
// const wxString& device,
// const wxString& output,
// bool interactive = True,
// bool interactive = true,
// int orientation = wxPORTRAIT);
};
#endif
+2 -2
View File
@@ -61,8 +61,8 @@ means unspecified/known", "");
%pythoncode { def __nonzero__(self): return self.IsOk() }
%extend {
bool __eq__(const wxVideoMode* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxVideoMode* other) { return other ? (*self != *other) : True; }
bool __eq__(const wxVideoMode* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxVideoMode* other) { return other ? (*self != *other) : true; }
}
+1 -1
View File
@@ -216,7 +216,7 @@ public:
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames) {
bool rval = False;
bool rval = false;
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
PyObject* list = wxArrayString2PyList_helper(filenames);
+1 -1
View File
@@ -52,7 +52,7 @@ public:
// Begin drag. hotspot is the location of the drag position relative to the upper-left
// corner of the image.
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
// corner of the image. This is full screen only. fullScreenRect gives the
+6 -6
View File
@@ -378,7 +378,7 @@ public:
// (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()
// 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;
// Determine if this event should be propagating to the parent window.
@@ -877,7 +877,7 @@ public:
class wxActivateEvent : public wxEvent
{
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;
};
@@ -922,7 +922,7 @@ public:
void SetLoggingOff(bool logOff);
bool GetLoggingOff() const;
void Veto(bool veto = True);
void Veto(bool veto = true);
void SetCanVeto(bool canVeto);
bool CanVeto() const;
@@ -936,7 +936,7 @@ public:
class wxShowEvent : public wxEvent
{
public:
wxShowEvent(int winid = 0, bool show = False);
wxShowEvent(int winid = 0, bool show = false);
void SetShow(bool show);
bool GetShow() const;
@@ -950,7 +950,7 @@ public:
class wxIconizeEvent: public wxEvent
{
public:
wxIconizeEvent(int id = 0, bool iconized = True);
wxIconizeEvent(int id = 0, bool iconized = true);
bool Iconized();
};
@@ -1220,7 +1220,7 @@ class wxIdleEvent : public wxEvent
public:
wxIdleEvent();
void RequestMore(bool needMore = True);
void RequestMore(bool needMore = true);
bool MoreRequested() const;
// Specify how wxWindows will send idle events: to
+1 -1
View File
@@ -127,7 +127,7 @@ public:
wxFileSystem();
~wxFileSystem();
void ChangePathTo(const wxString& location, bool is_dir = False);
void ChangePathTo(const wxString& location, bool is_dir = false);
wxString GetPath();
%newobject OpenFile;
+8 -8
View File
@@ -316,7 +316,7 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
{ wxPyRaiseNotImplemented(); return NULL; }
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
{ wxPyRaiseNotImplemented(); return False; }
{ wxPyRaiseNotImplemented(); return false; }
%}
#endif
@@ -356,7 +356,7 @@ public:
// interactive parameter is ignored in the base class, we behave as if it
// were always False
virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
bool interactive = True);
bool interactive = true);
// get the number of font encodings we know about
@@ -398,7 +398,7 @@ public:
%extend {
PyObject* GetAltForEncoding(wxFontEncoding encoding,
const wxString& facename = wxPyEmptyString,
bool interactive = True) {
bool interactive = true) {
wxFontEncoding alt_enc;
if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
return PyInt_FromLong(alt_enc);
@@ -439,7 +439,7 @@ public:
%pythonPrepend wxFont "if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']"
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);
~wxFont();
@@ -467,8 +467,8 @@ public:
// comparison
%extend {
bool __eq__(const wxFont* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxFont* other) { return other ? (*self != *other) : True; }
bool __eq__(const wxFont* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxFont* other) { return other ? (*self != *other) : true; }
}
// accessors: get the font characteristics
@@ -505,7 +505,7 @@ public:
wxString GetWeightString() const;
// Unofficial API, don't use
virtual void SetNoAntiAliasing( bool no = True );
virtual void SetNoAntiAliasing( bool no = true );
virtual bool GetNoAntiAliasing() const;
// the default encoding is used for creating all fonts with default
@@ -549,7 +549,7 @@ public:
bool EnumerateFacenames(
wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
bool fixedWidthOnly = False);
bool fixedWidthOnly = false);
bool EnumerateEncodings(const wxString& facename = wxPyEmptyString);
+6 -6
View File
@@ -49,7 +49,7 @@ void wxBell();
MustHaveApp(wxEndBusyCursor);
void wxEndBusyCursor();
long wxGetElapsedTime(bool resetTimer = True);
long wxGetElapsedTime(bool resetTimer = true);
MustHaveApp(wxGetMousePosition);
DocDeclA(
@@ -161,7 +161,7 @@ wxString wxGetTextFromUser(const wxString& message,
const wxString& default_value = wxPyEmptyString,
wxWindow *parent = NULL,
int x = -1, int y = -1,
bool centre = True);
bool centre = true);
MustHaveApp(wxGetPasswordFromUser);
wxString wxGetPasswordFromUser(const wxString& message,
@@ -175,7 +175,7 @@ wxString wxGetPasswordFromUser(const wxString& message,
// int LCOUNT, char** choices,
// int nsel, int *selection,
// 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);
@@ -183,7 +183,7 @@ wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
int choices, wxString* choices_array,
wxWindow *parent = NULL,
int x = -1, int y = -1,
bool centre = True,
bool centre = true,
int width=150, int height=200);
MustHaveApp(wxGetSingleChoiceIndex);
@@ -191,7 +191,7 @@ int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
int choices, wxString* choices_array,
wxWindow *parent = NULL,
int x = -1, int y = -1,
bool centre = True,
bool centre = true,
int width=150, int height=200);
@@ -318,7 +318,7 @@ MustHaveApp(wxThread);
#ifdef WXP_WITH_THREAD
return wxThread::IsMain();
#else
return True;
return true;
#endif
}
%}
+10 -10
View File
@@ -42,7 +42,7 @@ bool wxGBPosition_helper(PyObject* source, wxGBPosition** obj)
{
if (source == Py_None) {
**obj = wxGBPosition(-1,-1);
return True;
return true;
}
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBPosition"));
}
@@ -51,7 +51,7 @@ bool wxGBSpan_helper(PyObject* source, wxGBSpan** obj)
{
if (source == Py_None) {
**obj = wxGBSpan(-1,-1);
return True;
return true;
}
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBSpan"));
}
@@ -80,8 +80,8 @@ public:
void SetCol(int col);
// %extend {
// bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : False; }
// bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : True; }
// bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : false; }
// bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : true; }
// }
bool operator==(const wxGBPosition& other);
@@ -113,7 +113,7 @@ public:
elif index == 1: self.SetCol(val)
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
__safe_for_unpickling__ = True
__safe_for_unpickling__ = true
def __reduce__(self): return (wx.GBPosition, self.Get())
}
@@ -149,8 +149,8 @@ cell in each direction.", "");
void SetColspan(int colspan);
// %extend {
// bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : False; }
// bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : True; }
// bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : false; }
// bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : true; }
// }
bool operator==(const wxGBSpan& other);
bool operator!=(const wxGBSpan& other);
@@ -182,7 +182,7 @@ cell in each direction.", "");
elif index == 1: self.SetColspan(val)
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
__safe_for_unpickling__ = True
__safe_for_unpickling__ = true
def __reduce__(self): return (wx.GBSpan, self.Get())
}
@@ -386,7 +386,7 @@ position, False if something was already there.
wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked);
@@ -399,7 +399,7 @@ position, False if something was already there.
else if (info.gotSize)
return self->Add(info.size.GetWidth(), info.size.GetHeight(),
pos, span, flag, border, data);
return False;
return false;
}
}
+3 -3
View File
@@ -132,8 +132,8 @@ public:
// None/NULL is now handled properly by the typemap, so these are not needed.
// %extend {
// bool __eq__(const wxSize* other) { return other ? (*self == *other) : False; }
// bool __ne__(const wxSize* other) { return other ? (*self != *other) : True; }
// bool __eq__(const wxSize* other) { return other ? (*self == *other) : false; }
// bool __ne__(const wxSize* other) { return other ? (*self != *other) : true; }
// }
DocDeclStr(
@@ -594,7 +594,7 @@ DocAStr(wxIntersectRect,
if (dest != wxRect(0,0,0,0)) {
bool blocked = wxPyBeginBlockThreads();
wxRect* newRect = new wxRect(dest);
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), True);
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), true);
wxPyEndBlockThreads(blocked);
return obj;
}
+6 -6
View File
@@ -84,7 +84,7 @@ public:
%name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
%name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
%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)
return new wxImage(width, height, clear);
else
@@ -104,7 +104,7 @@ public:
return NULL;
}
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 GetMaskGreen();
unsigned char GetMaskBlue();
void SetMask( bool mask = True );
void SetMask( bool mask = true );
bool HasMask();
wxImage Rotate(double angle, const wxPoint & centre_of_rotation,
bool interpolating = True, wxPoint * offset_after_rotation = NULL) const ;
wxImage Rotate90( bool clockwise = True ) ;
wxImage Mirror( bool horizontally = True ) ;
bool interpolating = true, wxPoint * offset_after_rotation = NULL) const ;
wxImage Rotate90( bool clockwise = true ) ;
wxImage Mirror( bool horizontally = true ) ;
void Replace( unsigned char r1, unsigned char g1, unsigned char b1,
unsigned char r2, unsigned char g2, unsigned char b2 );
+2 -2
View File
@@ -43,7 +43,7 @@ MustHaveApp(wxImageList);
// two bitmaps, or an icon.
class wxImageList : public wxObject {
public:
wxImageList(int width, int height, int mask=True, int initialCount=1);
wxImageList(int width, int height, int mask=true, int initialCount=1);
~wxImageList();
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
@@ -58,7 +58,7 @@ public:
#endif
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();
bool Remove(int index);
+2 -2
View File
@@ -324,8 +324,8 @@ public:
%name(Init1)bool Init(const wxString& szName,
const wxString& szShort = wxPyEmptyString,
const wxString& szLocale = wxPyEmptyString,
bool bLoadDefault = True,
bool bConvertEncoding = False);
bool bLoadDefault = true,
bool bConvertEncoding = false);
%name(Init2) bool Init(int language = wxLANGUAGE_DEFAULT,
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
+10 -10
View File
@@ -64,7 +64,7 @@ public:
int GetMovementThreshold() { return -1; }
void SetMovementThreshold(int threshold) {}
bool IsOk(void) { return False; }
bool IsOk(void) { return false; }
int GetNumberJoysticks() { return -1; }
int GetManufacturerId() { return -1; }
int GetProductId() { return -1; }
@@ -88,16 +88,16 @@ public:
int GetVMin() { return -1; }
int GetVMax() { return -1; }
bool HasRudder() { return False; }
bool HasZ() { return False; }
bool HasU() { return False; }
bool HasV() { return False; }
bool HasPOV() { return False; }
bool HasPOV4Dir() { return False; }
bool HasPOVCTS() { return False; }
bool HasRudder() { return false; }
bool HasZ() { return false; }
bool HasU() { return false; }
bool HasV() { return false; }
bool HasPOV() { return false; }
bool HasPOV4Dir() { return false; }
bool HasPOVCTS() { return false; }
bool SetCapture(wxWindow* win, int pollingFreq = 0) { return False; }
bool ReleaseCapture() { return False; }
bool SetCapture(wxWindow* win, int pollingFreq = 0) { return false; }
bool ReleaseCapture() { return false; }
};
#endif
%}
+3 -3
View File
@@ -70,12 +70,12 @@ public:
// multiple selection logic
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);
void Deselect(int n);
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
// GetSelection which only works for listboxes with single selection)
@@ -168,7 +168,7 @@ public:
const wxString& name = wxPyListBoxNameStr);
bool IsChecked(int index);
void Check(int index, int check = True);
void Check(int index, int check = true);
#if defined(__WXMSW__) || defined(__WXGTK__)
int GetItemHeight();
+5 -5
View File
@@ -544,7 +544,7 @@ public:
wxSize GetItemSpacing() const;
#ifndef __WXMSW__
void SetItemSpacing( int spacing, bool isSmall = False );
void SetItemSpacing( int spacing, bool isSmall = false );
#endif
// Gets the number of selected items in the list control
@@ -561,7 +561,7 @@ public:
long GetTopItem() const ;
// 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
void SetWindowStyleFlag(long style) ;
@@ -627,7 +627,7 @@ public:
// Find an item whose label matches this string, starting from the item after 'start'
// 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'
// 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.
bool SortItems(PyObject* func) {
if (!PyCallable_Check(func))
return False;
return false;
return self->SortItems((wxListCtrlCompare)wxPyListCtrl_SortItems, (long)func);
}
}
@@ -807,7 +807,7 @@ public:
const wxString& name = wxPyListCtrlNameStr);
// [de]select an item
void Select(long n, bool on = True);
void Select(long n, bool on = true);
// focus and show the given item
void Focus(long index);
+5 -5
View File
@@ -61,7 +61,7 @@ public:
static bool IsEnabled();
// change the flag state, return the previous one
static bool EnableLogging(bool doIt = True);
static bool EnableLogging(bool doIt = true);
// static sink function
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'
// 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.
static void SetLogLevel(wxLogLevel logLevel);
@@ -181,10 +181,10 @@ class wxLogWindow : public wxLog
public:
wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL)
const wxString& szTitle, // the title of the frame
bool bShow = True, // show window immediately?
bool bPassToOld = True); // pass log messages to the old target?
bool bShow = true, // show window immediately?
bool bPassToOld = true); // pass log messages to the old target?
void Show(bool bShow = True);
void Show(bool bShow = true);
wxFrame *GetFrame() const;
wxLog *GetOldLog() const;
bool IsPassingMessages() const;
+4 -4
View File
@@ -249,7 +249,7 @@ public:
virtual void EnableTop(size_t pos, bool enable);
// 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
virtual void SetLabelTop(size_t pos, const wxString& label);
@@ -345,10 +345,10 @@ public:
wxMenu *GetSubMenu() const;
// state
virtual void Enable(bool enable = True);
virtual void Enable(bool enable = true);
virtual bool IsEnabled() const;
virtual void Check(bool check = True);
virtual void Check(bool check = true);
virtual bool IsChecked() const;
void Toggle();
@@ -384,7 +384,7 @@ public:
bool IsOwnerDrawn();
// switch on/off owner-drawing the item
void SetOwnerDrawn(bool ownerDrawn = True);
void SetOwnerDrawn(bool ownerDrawn = true);
void ResetOwnerDrawn();
#else
// just to keep the global renamers in sync
+3 -3
View File
@@ -193,7 +193,7 @@ public:
bool blocked = wxPyBeginBlockThreads();
PyObject* tuple = PyTuple_New(3);
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc),
wxT("wxIcon"), True));
wxT("wxIcon"), true));
PyTuple_SetItem(tuple, 1, wx2PyString(iconFile));
PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex));
wxPyEndBlockThreads(blocked);
@@ -266,7 +266,7 @@ public:
// set an arbitrary command, ask confirmation if it already exists and
// overwriteprompt is True
bool SetCommand(const wxString& cmd, const wxString& verb,
bool overwriteprompt = True);
bool overwriteprompt = true);
bool SetDefaultIcon(const wxString& cmd = wxPyEmptyString, int index = 0);
@@ -353,7 +353,7 @@ public:
// settings from other, previously parsed, files by this one: normally,
// the files read most recently would override the older files, but with
// 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
bool ReadMimeTypes(const wxString& filename);
+2 -2
View File
@@ -66,7 +66,7 @@ public:
void Move(const wxPoint& pt);
%name(SetSizeWH) void SetSize(int width, int height);
void SetSize(const wxSize& size);
void Show(int show = True);
void Show(int show = true);
void Hide();
%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
// at all, with or without Themes.
typedef BOOL (WINAPI *PrintWindow_t)(HWND, HDC, UINT);
static bool s_triedToLoad = False;
static bool s_triedToLoad = false;
static PrintWindow_t pfnPrintWindow = NULL;
if ( !s_triedToLoad )
{
+3 -6
View File
@@ -98,14 +98,14 @@ public:
// adds a new page to the control
virtual bool AddPage(wxWindow *page,
const wxString& text,
bool select = False,
bool select = false,
int imageId = -1);
// the same as AddPage(), but adds the page at the specified position
virtual bool InsertPage(size_t n,
wxWindow *page,
const wxString& text,
bool select = False,
bool select = false,
int imageId = -1)/* = 0*/;
// set the currently selected page, return the index of the previously
@@ -116,7 +116,7 @@ public:
// cycle thru the pages
void AdvanceSelection(bool forward = True);
void AdvanceSelection(bool forward = true);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -345,9 +345,6 @@ public:
//---------------------------------------------------------------------------
%{
#include <wx/choicebk.h>
%}
/*
* wxChoicebook flags
+1 -1
View File
@@ -95,7 +95,7 @@ public:
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0,
bool noRefresh = False );
bool noRefresh = false );
// scroll to the given (in logical coords) position
virtual void Scroll(int x, int y);
+2 -2
View File
@@ -107,8 +107,8 @@ public:
%extend {
bool __eq__(const wxPen* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxPen* other) { return other ? (*self != *other) : True; }
bool __eq__(const wxPen* other) { return other ? (*self == *other) : false; }
bool __ne__(const wxPen* other) { return other ? (*self != *other) : true; }
}
%pythoncode { def __nonzero__(self): return self.Ok() }
};
+28 -28
View File
@@ -282,7 +282,7 @@ public:
void CreateAbortWindow(wxWindow* parent, wxPyPrintout* printout);
wxPrintDialogData& GetPrintDialogData();
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=True);
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=true);
wxDC* PrintDialog(wxWindow *parent);
void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
bool Setup(wxWindow *parent);
@@ -299,7 +299,7 @@ public:
// Since this one would be tough and ugly to do with the Macros...
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
bool hadErr = False;
bool hadErr = false;
bool found;
bool blocked = wxPyBeginBlockThreads();
@@ -310,22 +310,22 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
val = PyTuple_GetItem(result, 0);
if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
val = PyTuple_GetItem(result, 1);
if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
val = PyTuple_GetItem(result, 2);
if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
val = PyTuple_GetItem(result, 3);
if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
else hadErr = True;
else hadErr = true;
}
else
hadErr = True;
hadErr = true;
if (hadErr) {
PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
@@ -560,30 +560,30 @@ public:
%{
#define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
#define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
bool base_##CBNAME(wxPreviewCanvas* a, wxDC& b)
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
bool rval=False; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* win = wxPyMake_wxObject(a,false); \
PyObject* dc = wxPyMake_wxObject(&b,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\
Py_DECREF(win); \
Py_DECREF(dc); \
} \
wxPyEndBlockThreads(blocked); \
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
return PCLASS::CBNAME(a, b); \
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
bool rval=false; \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
PyObject* win = wxPyMake_wxObject(a,false); \
PyObject* dc = wxPyMake_wxObject(&b,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc)); \
Py_DECREF(win); \
Py_DECREF(dc); \
} \
wxPyEndBlockThreads(blocked); \
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
} \
bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
return PCLASS::CBNAME(a, b); \
}
+2 -2
View File
@@ -70,8 +70,8 @@ public:
%pythoncode { SetItemLabel = SetString };
// change the individual radio button state
%name(EnableItem) virtual void Enable(int n, bool enable = True);
%name(ShowItem) virtual void Show(int n, bool show = True);
%name(EnableItem) virtual void Enable(int n, bool enable = true);
%name(ShowItem) virtual void Show(int n, bool show = true);
#ifndef __WXGTK__
// layout parameters
+1 -1
View File
@@ -53,7 +53,7 @@ public:
virtual void SetThumbPosition(int viewStart);
virtual void SetScrollbar(int position, int thumbSize,
int range, int pageSize,
bool refresh = True);
bool refresh = true);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+20 -20
View File
@@ -263,8 +263,8 @@ isn't any.", "");
struct wxPySizerItemInfo {
wxPySizerItemInfo()
: window(NULL), sizer(NULL), gotSize(False),
size(wxDefaultSize), gotPos(False), pos(-1)
: window(NULL), sizer(NULL), gotSize(false),
size(wxDefaultSize), gotPos(false), pos(-1)
{}
wxWindow* window;
@@ -295,13 +295,13 @@ static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize,
// try wxSize or (w,h)
if ( checkSize && wxSize_helper(item, &sizePtr)) {
info.size = *sizePtr;
info.gotSize = True;
info.gotSize = true;
}
// or a single int
if (checkIdx && PyInt_Check(item)) {
info.pos = PyInt_AsLong(item);
info.gotPos = True;
info.gotPos = true;
}
}
}
@@ -482,7 +482,7 @@ public:
wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked);
@@ -511,7 +511,7 @@ the item at index *before*. See `Add` for a description of the parameters.", ""
wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked);
@@ -541,7 +541,7 @@ this sizer. See `Add` for a description of the parameters.", "");
wxPyUserData* data = NULL;
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData);
wxPyEndBlockThreads(blocked);
@@ -575,7 +575,7 @@ and removed.", "
");
bool Remove(PyObject* item) {
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked);
if ( info.window )
return self->Remove(info.window);
@@ -584,7 +584,7 @@ and removed.", "
else if ( info.gotPos )
return self->Remove(info.pos);
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.", "");
bool Detach(PyObject* item) {
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked);
if ( info.window )
return self->Detach(info.window);
@@ -606,13 +606,13 @@ was found and detached.", "");
else if ( info.gotPos )
return self->Detach(info.pos);
else
return False;
return false;
}
void _SetItemMinSize(PyObject* item, const wxSize& size) {
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked);
if ( info.window )
self->SetItemMinSize(info.window, size);
@@ -793,7 +793,7 @@ this will set them appropriately.
DocDeclStr(
void , Clear( bool deleteWindows=False ),
void , Clear( bool deleteWindows=false ),
"Clear all items from the sizer, optionally destroying the window items
as well.", "");
@@ -820,15 +820,15 @@ as well.", "");
%extend {
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
disappear or reappear, use Show followed by `Layout`. The *item*
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
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();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
wxPyEndBlockThreads(blocked);
if ( info.window )
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.", "");
bool IsShown(PyObject* item) {
bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
wxPyEndBlockThreads(blocked);
if ( info.window )
return self->IsShown(info.window);
@@ -855,16 +855,16 @@ the item.", "");
else if ( info.gotPos )
return self->IsShown(info.pos);
else
return False;
return false;
}
}
%pythoncode {
def Hide(self, item, recursive=False):
def Hide(self, item, recursive=false):
"""
A convenience method for Show(item, False, recursive).
"""
return self.Show(item, False, recursive)
return self.Show(item, false, recursive)
}
+2 -2
View File
@@ -110,7 +110,7 @@ public:
%#ifndef __WXMAC__
unsigned char* buffer;
int size;
bool rv = False;
bool rv = false;
bool blocked = wxPyBeginBlockThreads();
if (!PyArg_Parse(data, "t#", &buffer, &size))
@@ -124,7 +124,7 @@ public:
PyErr_SetString(PyExc_NotImplementedError,
"Create from data is not available on this platform.");
wxPyEndBlockThreads(blocked);
return False;
return false;
%#endif
}
}
+1 -1
View File
@@ -293,7 +293,7 @@ showing the top-level window.", "");
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
are resized and the sash and border are redrawn.", "");
+1 -1
View File
@@ -128,7 +128,7 @@ public:
void AddFont(wxFont* font);
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);
void RemoveFont(wxFont *font);
+4 -4
View File
@@ -27,15 +27,15 @@
%typemap(in) wxInputStream* (wxPyInputStream* temp, bool created) {
if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) {
$1 = temp->m_wxis;
created = False;
created = false;
} else {
PyErr_Clear(); // clear the failure of the wxPyConvert above
$1 = wxPyCBInputStream_create($input, False);
$1 = wxPyCBInputStream_create($input, false);
if ($1 == NULL) {
PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
SWIG_fail;
}
created = True;
created = true;
}
}
%typemap(freearg) wxInputStream* {
@@ -54,7 +54,7 @@
if ($1) {
_ptr = new wxPyInputStream($1);
}
$result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), True);
$result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), true);
}

Some files were not shown because too many files have changed in this diff Show More