From 6a223074d30c2ec81b688f2c0f14845fdaa4da81 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 18 Sep 2006 19:44:21 +0000 Subject: [PATCH] docstrings and other minor tweaks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_dc.i | 10 +++++++--- wxPython/src/_event.i | 16 ++++++++-------- wxPython/src/_listctrl.i | 2 +- wxPython/src/_toolbar.i | 1 + wxPython/src/gtk/_controls.py | 1 + wxPython/src/gtk/_controls_wrap.cpp | 1 + wxPython/src/gtk/_gdi.py | 10 +++++++--- wxPython/src/mac/_controls.py | 1 + wxPython/src/mac/_controls_wrap.cpp | 5 +++-- wxPython/src/mac/_gdi.py | 10 +++++++--- wxPython/src/msw/_controls.py | 1 + wxPython/src/msw/_controls_wrap.cpp | 1 + wxPython/src/msw/_gdi.py | 10 +++++++--- 13 files changed, 46 insertions(+), 23 deletions(-) diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index 1977e7d003..8ee815c62d 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -1287,10 +1287,14 @@ on it, everything is in fact first drawn on an in-memory buffer (a `wx.Bitmap`) and then copied to the screen only once, when this object is destroyed. -It can be used in the same way as any other device -context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you -want to use it in your EVT_PAINT handler, you should look at +It can be used in the same way as any other device context. +wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to +use it in your EVT_PAINT handler, you should look at `wx.BufferedPaintDC`. + +Please note that GTK+ 2.0 and OS X provide double buffering themselves +natively so using this class on those platforms will normally result +in an unneeded level of buffering. ", ""); class wxBufferedDC : public wxMemoryDC diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index f90a8495ed..33f832615a 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -678,8 +678,8 @@ Events EVT_SCROLL_PAGEDOWN page down events EVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the 'thumb') - EVT_SCROLL_THUMBRELEASE thumb release events. - EVT_SCROLL_ENDSCROLL End of scrolling + EVT_SCROLL_THUMBRELEASE thumb release events + EVT_SCROLL_CHANGED End of scrolling ======================= ========================================== Note @@ -687,17 +687,17 @@ Note The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an - EVT_SCROLL_ENDSCROLL event). + EVT_SCROLL_CHANGED event). - The EVT_SCROLL_ENDSCROLL event also occurs when using the keyboard + The EVT_SCROLL_CHANGED event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen). - In short, the EVT_SCROLL_ENDSCROLL event is triggered when + In short, the EVT_SCROLL_CHANGED event is triggered when scrolling/ moving has finished. The only exception (unfortunately) is that changing the thumb position using the mousewheel does give - a EVT_SCROLL_THUMBRELEASE event but NOT an EVT_SCROLL_ENDSCROLL + a EVT_SCROLL_THUMBRELEASE event but NOT an EVT_SCROLL_CHANGED event. "); @@ -745,8 +745,8 @@ Events EVT_SCROLLWIN_PAGEDOWN page down events EVT_SCROLLWIN_THUMBTRACK thumbtrack events (frequent events sent as the user drags the 'thumb') - EVT_SCROLLWIN_THUMBRELEASE thumb release events. - EVT_SCROLLWIN_ENDSCROLL End of scrolling + EVT_SCROLLWIN_THUMBRELEASE thumb release events + EVT_SCROLLWIN_CHANGED End of scrolling ========================== ========================================== :see: `wx.ScrollEvent` diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index a982f7154b..c052337dd6 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -835,7 +835,7 @@ any.", "", %extend { wxWindow* GetMainWindow() { - #ifdef __WXMSW__ + #if defined(__WXMSW__) || defined(__WXMAC__) return self; #else return (wxWindow*)self->m_mainWin; diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index 65a1b76af6..bdabc3a308 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -44,6 +44,7 @@ enum { wxTB_HORZ_LAYOUT, wxTB_HORZ_TEXT, wxTB_NO_TOOLTIPS, + wxTB_BOTTOM }; diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 5e87c3c56e..62f2e997c7 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -3456,6 +3456,7 @@ TB_NOALIGN = _controls_.TB_NOALIGN TB_HORZ_LAYOUT = _controls_.TB_HORZ_LAYOUT TB_HORZ_TEXT = _controls_.TB_HORZ_TEXT TB_NO_TOOLTIPS = _controls_.TB_NO_TOOLTIPS +TB_BOTTOM = _controls_.TB_BOTTOM class ToolBarToolBase(_core.Object): """Proxy of C++ ToolBarToolBase class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index bbf5790f4f..4a6892cd36 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -48802,6 +48802,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "TB_HORZ_LAYOUT",SWIG_From_int(static_cast< int >(wxTB_HORZ_LAYOUT))); SWIG_Python_SetConstant(d, "TB_HORZ_TEXT",SWIG_From_int(static_cast< int >(wxTB_HORZ_TEXT))); SWIG_Python_SetConstant(d, "TB_NO_TOOLTIPS",SWIG_From_int(static_cast< int >(wxTB_NO_TOOLTIPS))); + SWIG_Python_SetConstant(d, "TB_BOTTOM",SWIG_From_int(static_cast< int >(wxTB_BOTTOM))); SWIG_addvarlink(SWIG_globals(),(char*)"ListCtrlNameStr",ListCtrlNameStr_get, ListCtrlNameStr_set); SWIG_Python_SetConstant(d, "LC_VRULES",SWIG_From_int(static_cast< int >(wxLC_VRULES))); SWIG_Python_SetConstant(d, "LC_HRULES",SWIG_From_int(static_cast< int >(wxLC_HRULES))); diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index b6e94f1f93..991796b8c3 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -4414,11 +4414,15 @@ class BufferedDC(MemoryDC): `wx.Bitmap`) and then copied to the screen only once, when this object is destroyed. - It can be used in the same way as any other device - context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you - want to use it in your EVT_PAINT handler, you should look at + It can be used in the same way as any other device context. + wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to + use it in your EVT_PAINT handler, you should look at `wx.BufferedPaintDC`. + Please note that GTK+ 2.0 and OS X provide double buffering themselves + natively so using this class on those platforms will normally result + in an unneeded level of buffering. + """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index e0b9124bbc..e477c0d8df 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -3449,6 +3449,7 @@ TB_NOALIGN = _controls_.TB_NOALIGN TB_HORZ_LAYOUT = _controls_.TB_HORZ_LAYOUT TB_HORZ_TEXT = _controls_.TB_HORZ_TEXT TB_NO_TOOLTIPS = _controls_.TB_NO_TOOLTIPS +TB_BOTTOM = _controls_.TB_BOTTOM class ToolBarToolBase(_core.Object): """Proxy of C++ ToolBarToolBase class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 4181f29bfa..2cebe72bba 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -3107,10 +3107,10 @@ SWIGINTERN bool wxPyListCtrl_SortItems(wxPyListCtrl *self,PyObject *func){ } SWIGINTERN wxWindow *wxPyListCtrl_GetMainWindow(wxPyListCtrl *self){ + return self; + - return (wxWindow*)self->m_mainWin; - } #include @@ -48725,6 +48725,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "TB_HORZ_LAYOUT",SWIG_From_int(static_cast< int >(wxTB_HORZ_LAYOUT))); SWIG_Python_SetConstant(d, "TB_HORZ_TEXT",SWIG_From_int(static_cast< int >(wxTB_HORZ_TEXT))); SWIG_Python_SetConstant(d, "TB_NO_TOOLTIPS",SWIG_From_int(static_cast< int >(wxTB_NO_TOOLTIPS))); + SWIG_Python_SetConstant(d, "TB_BOTTOM",SWIG_From_int(static_cast< int >(wxTB_BOTTOM))); SWIG_addvarlink(SWIG_globals(),(char*)"ListCtrlNameStr",ListCtrlNameStr_get, ListCtrlNameStr_set); SWIG_Python_SetConstant(d, "LC_VRULES",SWIG_From_int(static_cast< int >(wxLC_VRULES))); SWIG_Python_SetConstant(d, "LC_HRULES",SWIG_From_int(static_cast< int >(wxLC_HRULES))); diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index 3621a7fbad..e0c4876ba5 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -4413,11 +4413,15 @@ class BufferedDC(MemoryDC): `wx.Bitmap`) and then copied to the screen only once, when this object is destroyed. - It can be used in the same way as any other device - context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you - want to use it in your EVT_PAINT handler, you should look at + It can be used in the same way as any other device context. + wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to + use it in your EVT_PAINT handler, you should look at `wx.BufferedPaintDC`. + Please note that GTK+ 2.0 and OS X provide double buffering themselves + natively so using this class on those platforms will normally result + in an unneeded level of buffering. + """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 6a1cf94744..6b3845d939 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -3464,6 +3464,7 @@ TB_NOALIGN = _controls_.TB_NOALIGN TB_HORZ_LAYOUT = _controls_.TB_HORZ_LAYOUT TB_HORZ_TEXT = _controls_.TB_HORZ_TEXT TB_NO_TOOLTIPS = _controls_.TB_NO_TOOLTIPS +TB_BOTTOM = _controls_.TB_BOTTOM class ToolBarToolBase(_core.Object): """Proxy of C++ ToolBarToolBase class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index 5da76c00e6..0fb94e2d56 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -49025,6 +49025,7 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "TB_HORZ_LAYOUT",SWIG_From_int(static_cast< int >(wxTB_HORZ_LAYOUT))); SWIG_Python_SetConstant(d, "TB_HORZ_TEXT",SWIG_From_int(static_cast< int >(wxTB_HORZ_TEXT))); SWIG_Python_SetConstant(d, "TB_NO_TOOLTIPS",SWIG_From_int(static_cast< int >(wxTB_NO_TOOLTIPS))); + SWIG_Python_SetConstant(d, "TB_BOTTOM",SWIG_From_int(static_cast< int >(wxTB_BOTTOM))); SWIG_addvarlink(SWIG_globals(),(char*)"ListCtrlNameStr",ListCtrlNameStr_get, ListCtrlNameStr_set); SWIG_Python_SetConstant(d, "LC_VRULES",SWIG_From_int(static_cast< int >(wxLC_VRULES))); SWIG_Python_SetConstant(d, "LC_HRULES",SWIG_From_int(static_cast< int >(wxLC_HRULES))); diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 944c292c95..5696b7c0ce 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -4507,11 +4507,15 @@ class BufferedDC(MemoryDC): `wx.Bitmap`) and then copied to the screen only once, when this object is destroyed. - It can be used in the same way as any other device - context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you - want to use it in your EVT_PAINT handler, you should look at + It can be used in the same way as any other device context. + wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to + use it in your EVT_PAINT handler, you should look at `wx.BufferedPaintDC`. + Please note that GTK+ 2.0 and OS X provide double buffering themselves + natively so using this class on those platforms will normally result + in an unneeded level of buffering. + """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr -- 2.47.2