From 8815349a371e4f86be67e95d52f98c768dd97902 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 2 Feb 2005 22:34:07 +0000 Subject: [PATCH] Some new def's, parameters, methods, etc. resulting from recent changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/__core_rename.i | 2 ++ wxPython/src/_datetime.i | 25 ++++++++++++------------- wxPython/src/_defs.i | 2 ++ wxPython/src/_functions.i | 4 +++- wxPython/src/_treectrl.i | 2 -- wxPython/src/_window.i | 2 +- wxPython/wxPython/_core.py | 2 ++ 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/wxPython/src/__core_rename.i b/wxPython/src/__core_rename.i index 9f17758594..380e9ccec8 100644 --- a/wxPython/src/__core_rename.i +++ b/wxPython/src/__core_rename.i @@ -51,10 +51,12 @@ %rename(RA_VERTICAL) wxRA_VERTICAL; %rename(RA_SPECIFY_ROWS) wxRA_SPECIFY_ROWS; %rename(RA_SPECIFY_COLS) wxRA_SPECIFY_COLS; +%rename(RA_USE_CHECKBOX) wxRA_USE_CHECKBOX; %rename(RB_GROUP) wxRB_GROUP; %rename(RB_SINGLE) wxRB_SINGLE; %rename(SB_HORIZONTAL) wxSB_HORIZONTAL; %rename(SB_VERTICAL) wxSB_VERTICAL; +%rename(RB_USE_CHECKBOX) wxRB_USE_CHECKBOX; %rename(ST_SIZEGRIP) wxST_SIZEGRIP; %rename(ST_NO_AUTORESIZE) wxST_NO_AUTORESIZE; %rename(FLOOD_SURFACE) wxFLOOD_SURFACE; diff --git a/wxPython/src/_datetime.i b/wxPython/src/_datetime.i index 4805236239..d5d47b6e2b 100644 --- a/wxPython/src/_datetime.i +++ b/wxPython/src/_datetime.i @@ -708,14 +708,15 @@ public: inline wxDateTime& operator-=(const wxDateSpan& diff); +// inline bool operator<(const wxDateTime& dt) const; +// inline bool operator<=(const wxDateTime& dt) const; +// inline bool operator>(const wxDateTime& dt) const; +// inline bool operator>=(const wxDateTime& dt) const; +// inline bool operator==(const wxDateTime& dt) const; +// inline bool operator!=(const wxDateTime& dt) const; + %nokwargs __add__; %nokwargs __sub__; - %nokwargs __lt__; - %nokwargs __le__; - %nokwargs __gt__; - %nokwargs __ge__; - %nokwargs __eq__; - %nokwargs __ne__; %extend { wxDateTime __add__(const wxTimeSpan& other) { return *self + other; } wxDateTime __add__(const wxDateSpan& other) { return *self + other; } @@ -724,14 +725,9 @@ 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; } - - // These fall back to just comparing pointers if other is NULL, or if - // either operand is invalid. + // either operand is invalid. This allows Python comparrisons to None + // to not assert and to return a sane value for the compare. bool __lt__(const wxDateTime* other) { if (!other || !self->IsValid() || !other->IsValid()) return self < other; return (*self < *other); @@ -759,6 +755,9 @@ public: } } + + + // ------------------------------------------------------------------------ // conversion from text: all conversions from text return -1 on failure, diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 81a04191c7..d196575a2e 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -442,10 +442,12 @@ enum { wxRA_VERTICAL, wxRA_SPECIFY_ROWS, wxRA_SPECIFY_COLS, + wxRA_USE_CHECKBOX, wxRB_GROUP, wxRB_SINGLE, wxSB_HORIZONTAL, wxSB_VERTICAL, + wxRB_USE_CHECKBOX, wxST_SIZEGRIP, wxST_NO_AUTORESIZE, diff --git a/wxPython/src/_functions.i b/wxPython/src/_functions.i index 31e312426c..704f56eea8 100644 --- a/wxPython/src/_functions.i +++ b/wxPython/src/_functions.i @@ -40,7 +40,9 @@ bool wxIsStockLabel(wxWindowID id, const wxString& label); // Returns label that should be used for given stock UI element (e.g. "&OK" // for wxID_OK): -wxString wxGetStockLabel(wxWindowID id); +wxString wxGetStockLabel(wxWindowID id, + bool withCodes = true, + wxString accelerator = wxPyEmptyString); MustHaveApp(wxBell); diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index a2e27f1ccc..e9f9f741dd 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -458,10 +458,8 @@ public: // the item will be shown in bold void SetItemBold(const wxTreeItemId& item, bool bold = true); -#ifdef __WXMSW__ // the item will be shown with a drop highlight void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true); -#endif // set the items text colour void SetItemTextColour(const wxTreeItemId& item, const wxColour& col); diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 8903da947f..66932fa7cc 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -1215,7 +1215,7 @@ to the window.", ""); DocDeclStr( - void , RefreshRect(const wxRect& rect), + void , RefreshRect(const wxRect& rect, bool eraseBackground = true), "Redraws the contents of the given rectangle: the area inside it will be repainted. This is the same as Refresh but has a nicer syntax.", ""); diff --git a/wxPython/wxPython/_core.py b/wxPython/wxPython/_core.py index 8fc09eca10..20a13e0dd8 100644 --- a/wxPython/wxPython/_core.py +++ b/wxPython/wxPython/_core.py @@ -67,10 +67,12 @@ wxRA_HORIZONTAL = wx._core.RA_HORIZONTAL wxRA_VERTICAL = wx._core.RA_VERTICAL wxRA_SPECIFY_ROWS = wx._core.RA_SPECIFY_ROWS wxRA_SPECIFY_COLS = wx._core.RA_SPECIFY_COLS +wxRA_USE_CHECKBOX = wx._core.RA_USE_CHECKBOX wxRB_GROUP = wx._core.RB_GROUP wxRB_SINGLE = wx._core.RB_SINGLE wxSB_HORIZONTAL = wx._core.SB_HORIZONTAL wxSB_VERTICAL = wx._core.SB_VERTICAL +wxRB_USE_CHECKBOX = wx._core.RB_USE_CHECKBOX wxST_SIZEGRIP = wx._core.ST_SIZEGRIP wxST_NO_AUTORESIZE = wx._core.ST_NO_AUTORESIZE wxFLOOD_SURFACE = wx._core.FLOOD_SURFACE