]> git.saurik.com Git - wxWidgets.git/commitdiff
Pass wxRect/wxPoint arguments to wxDataViewCustomRenderer by reference.
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 1 Mar 2011 12:16:49 +0000 (12:16 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 1 Mar 2011 12:16:49 +0000 (12:16 +0000)
Instead of passing them by value, use const reference. This change
is safe to do, because these methods' signatures were different in 2.8
anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/doxygen/overviews/changes_since28.h
include/wx/dvrenderers.h
include/wx/generic/dvrenderer.h
include/wx/generic/dvrenderers.h
interface/wx/dataview.h
samples/dataview/dataview.cpp
src/generic/datavgen.cpp

index 46761a31bb808e9f8acde52e48be4a7415ead04a..8687861a39921d6748065491a8357d14be81e669 100644 (file)
@@ -184,6 +184,10 @@ Changes in behaviour not resulting in compilation errors, please read this!
   wxAutomationInstance_SilentIfNone flag to prevent the error message if no
   currently running instances of this object are available.
 
+- Signatures of wxDataViewCustomRenderer::Activate(), LeftClick() and
+  StartDrag() virtual methods changed.  You will need to change them in your
+  derived renderer class too if you override them.
+
 
 Changes in behaviour which may result in compilation errors
 -----------------------------------------------------------
index 5fc6678a853bfbf1c610f47d45104bcc4ee8ff8b..8ec1c9fc1e467464e7e057cb6d1490bfc4684b3f 100644 (file)
@@ -176,5 +176,11 @@ Finally, a few structure fields, notable @c wxCmdLineEntryDesc::shortName,
   wxScrolled<T>::GetSizeAvailableForScrollTarget() method to compute the size
   available for the scroll target as function of the main window size, please
   see the documentation of this method for more details.
+
+- Signatures of wxDataViewCustomRenderer::Activate(),
+  wxDataViewCustomRenderer::LeftClick() and
+  wxDataViewCustomRenderer::StartDrag() virtual methods changed.  You will need
+  to change them in your derived renderer class too if you override them.
+
 */
 
index 97539bf19ab2f60dc296ca95dfa8c6f96e4288b1..a25fec93d0c74d0562535533931fb067afdc5c61 100644 (file)
@@ -230,21 +230,21 @@ public:
     // to drag it: by default they all simply return false indicating that the
     // events are not handled
 
-    virtual bool Activate(wxRect WXUNUSED(cell),
+    virtual bool Activate(const wxRect& WXUNUSED(cell),
                           wxDataViewModel *WXUNUSED(model),
                           const wxDataViewItem & WXUNUSED(item),
                           unsigned int WXUNUSED(col))
         { return false; }
 
-    virtual bool LeftClick(wxPoint WXUNUSED(cursor),
-                           wxRect WXUNUSED(cell),
+    virtual bool LeftClick(const wxPoint& WXUNUSED(cursor),
+                           const wxRect& WXUNUSED(cell),
                            wxDataViewModel *WXUNUSED(model),
                            const wxDataViewItem & WXUNUSED(item),
                            unsigned int WXUNUSED(col) )
         { return false; }
 
-    virtual bool StartDrag(wxPoint WXUNUSED(cursor),
-                           wxRect WXUNUSED(cell),
+    virtual bool StartDrag(const wxPoint& WXUNUSED(cursor),
+                           const wxRect& WXUNUSED(cell),
                            wxDataViewModel *WXUNUSED(model),
                            const wxDataViewItem & WXUNUSED(item),
                            unsigned int WXUNUSED(col) )
index 3914e83ccb8d066bfa8eb47673d88fd8627cd974..aa7f6151a6ffad2ad3bde49bfed3d91c349bffbb 100644 (file)
@@ -47,14 +47,14 @@ public:
     // generic implementation uses these ones for all of them, including the
     // standard ones.
 
-    virtual bool WXOnActivate(wxRect WXUNUSED(cell),
+    virtual bool WXOnActivate(const wxRect& WXUNUSED(cell),
                               wxDataViewModel *WXUNUSED(model),
                               const wxDataViewItem & WXUNUSED(item),
                               unsigned int WXUNUSED(col))
         { return false; }
 
-    virtual bool WXOnLeftClick(wxPoint WXUNUSED(cursor),
-                               wxRect WXUNUSED(cell),
+    virtual bool WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
+                               const wxRect& WXUNUSED(cell),
                                wxDataViewModel *WXUNUSED(model),
                                const wxDataViewItem & WXUNUSED(item),
                                unsigned int WXUNUSED(col) )
index dc1bc24f7f4fab40be15517e5d39b8f6bbe3fc8a..f9ae4142027161d50ffa351a2d5a3a8b9f66f4c0 100644 (file)
@@ -26,7 +26,7 @@ public:
 
     // see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h
 
-    virtual bool WXOnActivate(wxRect cell,
+    virtual bool WXOnActivate(const wxRect& cell,
                               wxDataViewModel *model,
                               const wxDataViewItem& item,
                               unsigned int col)
@@ -34,8 +34,8 @@ public:
         return Activate(cell, model, item, col);
     }
 
-    virtual bool WXOnLeftClick(wxPoint cursor,
-                               wxRect cell,
+    virtual bool WXOnLeftClick(const wxPoint& cursor,
+                               const wxRect& cell,
                                wxDataViewModel *model,
                                const wxDataViewItem &item,
                                unsigned int col)
@@ -121,8 +121,8 @@ public:
     wxSize GetSize() const;
 
     // Implementation only, don't use nor override
-    virtual bool WXOnLeftClick(wxPoint cursor,
-                               wxRect cell,
+    virtual bool WXOnLeftClick(const wxPoint& cursor,
+                               const wxRect& cell,
                                wxDataViewModel *model,
                                const wxDataViewItem& item,
                                unsigned int col);
@@ -206,7 +206,7 @@ public:
     virtual wxSize GetSize() const;
 
     // Implementation only, don't use nor override
-    virtual bool WXOnActivate(wxRect cell,
+    virtual bool WXOnActivate(const wxRect& cell,
                               wxDataViewModel *model,
                               const wxDataViewItem& item,
                               unsigned int col);
index f8961f82745e04b5c829bcfaed81a6ae2c7640f2..57d066ed1f421c562ec098af3b9be0d999064130 100644 (file)
@@ -1571,7 +1571,7 @@ public:
         Override this to react to double clicks or ENTER.
         This method will only be called in wxDATAVIEW_CELL_ACTIVATABLE mode.
     */
-    virtual bool Activate( wxRect cell,
+    virtual bool Activate( const wxRect& cell,
                            wxDataViewModel* model,
                            const wxDataViewItem & item,
                            unsigned int col );
@@ -1640,8 +1640,8 @@ public:
         Override this to react to a left click.
         This method will only be called in @c wxDATAVIEW_CELL_ACTIVATABLE mode.
     */
-    virtual bool LeftClick( wxPoint cursor,
-                            wxRect cell,
+    virtual bool LeftClick( const wxPoint& cursor,
+                            const wxRect& cell,
                             wxDataViewModel * model,
                             const wxDataViewItem & item,
                             unsigned int col );
@@ -1665,7 +1665,8 @@ public:
     /**
         Override this to start a drag operation. Not yet supported.
     */
-    virtual bool StartDrag(wxPoint cursor, wxRect cell,
+    virtual bool StartDrag(const wxPoint& cursor,
+                           const wxRect& cell,
                            wxDataViewModel* model,
                            const wxDataViewItem & item,
                            unsigned int col);
index ed3d828173440f534a0a6d51836a248f127bb5e9..b9d424622aed188f16748bc7dfa0589692cb23be 100644 (file)
@@ -189,7 +189,7 @@ public:
         return true;
     }
 
-    virtual bool Activate( wxRect WXUNUSED(cell),
+    virtual bool Activate( const wxRect& WXUNUSED(cell),
                            wxDataViewModel *WXUNUSED(model),
                            const wxDataViewItem &WXUNUSED(item),
                            unsigned int WXUNUSED(col) )
@@ -198,7 +198,8 @@ public:
         return false;
     }
 
-    virtual bool LeftClick( wxPoint cursor, wxRect WXUNUSED(cell),
+    virtual bool LeftClick(const wxPoint& cursor,
+                           const wxRect& WXUNUSED(cell),
                            wxDataViewModel *WXUNUSED(model),
                            const wxDataViewItem &WXUNUSED(item),
                            unsigned int WXUNUSED(col) )
index eb1b741996128be3c7438bb99690102319363533..d6ff164a8520bf382e207ea42b29cb46b0aef484 100644 (file)
@@ -863,8 +863,8 @@ bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state
     return true;
 }
 
-bool wxDataViewToggleRenderer::WXOnLeftClick(wxPoint WXUNUSED(cursor),
-                                             wxRect WXUNUSED(cell),
+bool wxDataViewToggleRenderer::WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
+                                             const wxRect& WXUNUSED(cell),
                                              wxDataViewModel *model,
                                              const wxDataViewItem& item,
                                              unsigned int col)
@@ -1027,7 +1027,7 @@ wxSize wxDataViewDateRenderer::GetSize() const
     return GetTextExtent(m_date.FormatDate());
 }
 
-bool wxDataViewDateRenderer::WXOnActivate(wxRect WXUNUSED(cell),
+bool wxDataViewDateRenderer::WXOnActivate(const wxRect& WXUNUSED(cell),
                                           wxDataViewModel *model,
                                           const wxDataViewItem& item,
                                           unsigned int col)