Pass wxRect/wxPoint arguments to wxDataViewCustomRenderer by reference.

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
This commit is contained in:
Václav Slavík
2011-03-01 12:16:49 +00:00
parent 43ff861df4
commit 548fa9c1eb
8 changed files with 35 additions and 23 deletions

View 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 wxAutomationInstance_SilentIfNone flag to prevent the error message if no
currently running instances of this object are available. 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 Changes in behaviour which may result in compilation errors
----------------------------------------------------------- -----------------------------------------------------------

View File

@@ -176,5 +176,11 @@ Finally, a few structure fields, notable @c wxCmdLineEntryDesc::shortName,
wxScrolled<T>::GetSizeAvailableForScrollTarget() method to compute the size wxScrolled<T>::GetSizeAvailableForScrollTarget() method to compute the size
available for the scroll target as function of the main window size, please available for the scroll target as function of the main window size, please
see the documentation of this method for more details. 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.
*/ */

View File

@@ -230,21 +230,21 @@ public:
// to drag it: by default they all simply return false indicating that the // to drag it: by default they all simply return false indicating that the
// events are not handled // events are not handled
virtual bool Activate(wxRect WXUNUSED(cell), virtual bool Activate(const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item), const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col)) unsigned int WXUNUSED(col))
{ return false; } { return false; }
virtual bool LeftClick(wxPoint WXUNUSED(cursor), virtual bool LeftClick(const wxPoint& WXUNUSED(cursor),
wxRect WXUNUSED(cell), const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item), const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) ) unsigned int WXUNUSED(col) )
{ return false; } { return false; }
virtual bool StartDrag(wxPoint WXUNUSED(cursor), virtual bool StartDrag(const wxPoint& WXUNUSED(cursor),
wxRect WXUNUSED(cell), const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item), const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) ) unsigned int WXUNUSED(col) )

View File

@@ -47,14 +47,14 @@ public:
// generic implementation uses these ones for all of them, including the // generic implementation uses these ones for all of them, including the
// standard ones. // standard ones.
virtual bool WXOnActivate(wxRect WXUNUSED(cell), virtual bool WXOnActivate(const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item), const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col)) unsigned int WXUNUSED(col))
{ return false; } { return false; }
virtual bool WXOnLeftClick(wxPoint WXUNUSED(cursor), virtual bool WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
wxRect WXUNUSED(cell), const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item), const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) ) unsigned int WXUNUSED(col) )

View File

@@ -26,7 +26,7 @@ public:
// see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h // 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, wxDataViewModel *model,
const wxDataViewItem& item, const wxDataViewItem& item,
unsigned int col) unsigned int col)
@@ -34,8 +34,8 @@ public:
return Activate(cell, model, item, col); return Activate(cell, model, item, col);
} }
virtual bool WXOnLeftClick(wxPoint cursor, virtual bool WXOnLeftClick(const wxPoint& cursor,
wxRect cell, const wxRect& cell,
wxDataViewModel *model, wxDataViewModel *model,
const wxDataViewItem &item, const wxDataViewItem &item,
unsigned int col) unsigned int col)
@@ -121,8 +121,8 @@ public:
wxSize GetSize() const; wxSize GetSize() const;
// Implementation only, don't use nor override // Implementation only, don't use nor override
virtual bool WXOnLeftClick(wxPoint cursor, virtual bool WXOnLeftClick(const wxPoint& cursor,
wxRect cell, const wxRect& cell,
wxDataViewModel *model, wxDataViewModel *model,
const wxDataViewItem& item, const wxDataViewItem& item,
unsigned int col); unsigned int col);
@@ -206,7 +206,7 @@ public:
virtual wxSize GetSize() const; virtual wxSize GetSize() const;
// Implementation only, don't use nor override // Implementation only, don't use nor override
virtual bool WXOnActivate(wxRect cell, virtual bool WXOnActivate(const wxRect& cell,
wxDataViewModel *model, wxDataViewModel *model,
const wxDataViewItem& item, const wxDataViewItem& item,
unsigned int col); unsigned int col);

View File

@@ -1571,7 +1571,7 @@ public:
Override this to react to double clicks or ENTER. Override this to react to double clicks or ENTER.
This method will only be called in wxDATAVIEW_CELL_ACTIVATABLE mode. This method will only be called in wxDATAVIEW_CELL_ACTIVATABLE mode.
*/ */
virtual bool Activate( wxRect cell, virtual bool Activate( const wxRect& cell,
wxDataViewModel* model, wxDataViewModel* model,
const wxDataViewItem & item, const wxDataViewItem & item,
unsigned int col ); unsigned int col );
@@ -1640,8 +1640,8 @@ public:
Override this to react to a left click. Override this to react to a left click.
This method will only be called in @c wxDATAVIEW_CELL_ACTIVATABLE mode. This method will only be called in @c wxDATAVIEW_CELL_ACTIVATABLE mode.
*/ */
virtual bool LeftClick( wxPoint cursor, virtual bool LeftClick( const wxPoint& cursor,
wxRect cell, const wxRect& cell,
wxDataViewModel * model, wxDataViewModel * model,
const wxDataViewItem & item, const wxDataViewItem & item,
unsigned int col ); unsigned int col );
@@ -1665,7 +1665,8 @@ public:
/** /**
Override this to start a drag operation. Not yet supported. 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, wxDataViewModel* model,
const wxDataViewItem & item, const wxDataViewItem & item,
unsigned int col); unsigned int col);

View File

@@ -189,7 +189,7 @@ public:
return true; return true;
} }
virtual bool Activate( wxRect WXUNUSED(cell), virtual bool Activate( const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem &WXUNUSED(item), const wxDataViewItem &WXUNUSED(item),
unsigned int WXUNUSED(col) ) unsigned int WXUNUSED(col) )
@@ -198,7 +198,8 @@ public:
return false; return false;
} }
virtual bool LeftClick( wxPoint cursor, wxRect WXUNUSED(cell), virtual bool LeftClick(const wxPoint& cursor,
const wxRect& WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), wxDataViewModel *WXUNUSED(model),
const wxDataViewItem &WXUNUSED(item), const wxDataViewItem &WXUNUSED(item),
unsigned int WXUNUSED(col) ) unsigned int WXUNUSED(col) )

View File

@@ -863,8 +863,8 @@ bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state
return true; return true;
} }
bool wxDataViewToggleRenderer::WXOnLeftClick(wxPoint WXUNUSED(cursor), bool wxDataViewToggleRenderer::WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
wxRect WXUNUSED(cell), const wxRect& WXUNUSED(cell),
wxDataViewModel *model, wxDataViewModel *model,
const wxDataViewItem& item, const wxDataViewItem& item,
unsigned int col) unsigned int col)
@@ -1027,7 +1027,7 @@ wxSize wxDataViewDateRenderer::GetSize() const
return GetTextExtent(m_date.FormatDate()); return GetTextExtent(m_date.FormatDate());
} }
bool wxDataViewDateRenderer::WXOnActivate(wxRect WXUNUSED(cell), bool wxDataViewDateRenderer::WXOnActivate(const wxRect& WXUNUSED(cell),
wxDataViewModel *model, wxDataViewModel *model,
const wxDataViewItem& item, const wxDataViewItem& item,
unsigned int col) unsigned int col)