// Return the size of the item appropriate to its current value.
virtual wxSize GetSize() const = 0;
- // Define virtual function which are called when the item is activated
- // (double-clicked or Enter is pressed on it), clicked or the user starts
- // to drag it: by default they all simply return false indicating that the
- // events are not handled
-
- virtual bool Activate(const wxRect& WXUNUSED(cell),
- wxDataViewModel *WXUNUSED(model),
- const wxDataViewItem & WXUNUSED(item),
- unsigned int WXUNUSED(col))
- { return false; }
-
- virtual bool LeftClick(const wxPoint& WXUNUSED(cursor),
- const wxRect& WXUNUSED(cell),
- wxDataViewModel *WXUNUSED(model),
- const wxDataViewItem & WXUNUSED(item),
- unsigned int WXUNUSED(col) )
- { return false; }
+ // Define virtual function which are called when a key is pressed on the
+ // item, clicked or the user starts to drag it: by default they all simply
+ // return false indicating that the events are not handled
+
+ virtual bool ActivateCell(const wxRect& cell,
+ wxDataViewModel *model,
+ const wxDataViewItem & item,
+ unsigned int col,
+ const wxMouseEvent* mouseEvent);
+
+ // Deprecated, use (and override) ActivateCell() instead
+ wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
+ virtual bool Activate(wxRect WXUNUSED(cell),
+ wxDataViewModel *WXUNUSED(model),
+ const wxDataViewItem & WXUNUSED(item),
+ unsigned int WXUNUSED(col)),
+ return false; )
+
+ // Deprecated, use (and override) ActivateCell() instead
+ wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
+ virtual bool LeftClick(wxPoint WXUNUSED(cursor),
+ wxRect WXUNUSED(cell),
+ wxDataViewModel *WXUNUSED(model),
+ const wxDataViewItem & WXUNUSED(item),
+ unsigned int WXUNUSED(col)),
+ return false; )
virtual bool StartDrag(const wxPoint& WXUNUSED(cursor),
const wxRect& WXUNUSED(cell),
// platform-specific classes.
virtual wxDC *GetDC() = 0;
+ // To draw background use the background colour in wxDataViewItemAttr
+ virtual void RenderBackground(wxDC* dc, const wxRect& rect);
+
// Prepare DC to use attributes and call Render().
void WXCallRender(wxRect rect, wxDC *dc, int state);