1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/dataview_osx.cpp
3 // Purpose: wxDataViewCtrl native mac implementation
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
13 #if (wxUSE_DATAVIEWCTRL != 0) && (!defined(wxUSE_GENERICDATAVIEWCTRL) || (wxUSE_GENERICDATAVIEWCTRL == 0))
19 #include "wx/settings.h"
20 #include "wx/dcclient.h"
24 #include "wx/osx/core/dataview.h"
25 #include "wx/osx/private.h"
26 #include "wx/renderer.h"
28 // ============================================================================
29 // Helper functions for dataviewe implementation on OSX
30 // ============================================================================
31 wxString
ConcatenateDataViewItemValues(wxDataViewCtrl
const* dataViewCtrlPtr
, wxDataViewItem
const& dataViewItem
)
33 wxString dataString
; // contains the TAB concatenated data
36 for (size_t i
=0; i
<dataViewCtrlPtr
->GetColumnCount(); i
++)
38 // variable definition:
41 dataViewCtrlPtr
->GetModel()->GetValue(dataValue
,dataViewItem
,dataViewCtrlPtr
->GetColumn(i
)->GetModelColumn());
43 dataString
<< wxT('\t');
44 dataString
<< dataValue
.MakeString();
49 // ============================================================================
50 // wxOSXDataViewModelNotifier
51 // ============================================================================
52 class wxOSXDataViewModelNotifier
: public wxDataViewModelNotifier
56 // constructors / destructor
58 wxOSXDataViewModelNotifier(wxDataViewCtrl
* initDataViewCtrlPtr
);
61 // inherited methods from wxDataViewModelNotifier
63 virtual bool ItemAdded (wxDataViewItem
const &parent
, wxDataViewItem
const &item
);
64 virtual bool ItemsAdded (wxDataViewItem
const& parent
, wxDataViewItemArray
const& items
);
65 virtual bool ItemChanged (wxDataViewItem
const& item
);
66 virtual bool ItemsChanged(wxDataViewItemArray
const& items
);
67 virtual bool ItemDeleted (wxDataViewItem
const& parent
, wxDataViewItem
const& item
);
68 virtual bool ItemsDeleted(wxDataViewItem
const& parent
, wxDataViewItemArray
const& items
);
69 virtual bool ValueChanged(wxDataViewItem
const& item
, unsigned int col
);
70 virtual bool Cleared();
71 virtual void Resort();
74 // if the dataview control can have a variable row height this method sets the dataview's control row height of
75 // the passed item to the maximum value occupied by the item in all columns
76 void AdjustRowHeight(wxDataViewItem
const& item
);
77 // ... and the same method for a couple of items:
78 void AdjustRowHeights(wxDataViewItemArray
const& items
);
79 // adjust wxCOL_WIDTH_AUTOSIZE columns to fit the data
80 void AdjustAutosizedColumns();
83 wxDataViewCtrl
* m_DataViewCtrlPtr
;
87 // constructors / destructor
89 wxOSXDataViewModelNotifier::wxOSXDataViewModelNotifier(wxDataViewCtrl
* initDataViewCtrlPtr
)
90 :m_DataViewCtrlPtr(initDataViewCtrlPtr
)
92 if (initDataViewCtrlPtr
== NULL
)
93 wxFAIL_MSG("Pointer to dataview control must not be NULL");
96 bool wxOSXDataViewModelNotifier::ItemAdded(wxDataViewItem
const& parent
, wxDataViewItem
const& item
)
101 wxCHECK_MSG(item
.IsOk(),false,"Added item is invalid.");
102 noFailureFlag
= m_DataViewCtrlPtr
->GetDataViewPeer()->Add(parent
,item
);
103 AdjustRowHeight(item
);
104 return noFailureFlag
;
107 bool wxOSXDataViewModelNotifier::ItemsAdded(wxDataViewItem
const& parent
, wxDataViewItemArray
const& items
)
112 // insert all valid items into control:
113 noFailureFlag
= m_DataViewCtrlPtr
->GetDataViewPeer()->Add(parent
,items
);
114 // adjust row heights:
115 AdjustRowHeights(items
);
117 return noFailureFlag
;
120 bool wxOSXDataViewModelNotifier::ItemChanged(wxDataViewItem
const& item
)
122 wxCHECK_MSG(item
.IsOk(), false,"Changed item is invalid.");
123 wxCHECK_MSG(GetOwner() != NULL
,false,"Owner not initialized.");
124 if (m_DataViewCtrlPtr
->GetDataViewPeer()->Update(GetOwner()->GetParent(item
),item
))
126 // sent the equivalent wxWidget event:
127 wxDataViewEvent
dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED
,m_DataViewCtrlPtr
->GetId());
129 dataViewEvent
.SetEventObject(m_DataViewCtrlPtr
);
130 dataViewEvent
.SetItem(item
);
131 // sent the equivalent wxWidget event:
132 m_DataViewCtrlPtr
->HandleWindowEvent(dataViewEvent
);
133 // row height may have to be adjusted:
134 AdjustRowHeight(item
);
135 AdjustAutosizedColumns();
143 bool wxOSXDataViewModelNotifier::ItemsChanged(wxDataViewItemArray
const& items
)
145 size_t const noOfItems
= items
.GetCount();
147 wxDataViewEvent
dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED
,m_DataViewCtrlPtr
->GetId());
150 dataViewEvent
.SetEventObject(m_DataViewCtrlPtr
);
151 for (size_t indexItem
=0; indexItem
<noOfItems
; ++indexItem
)
152 if (m_DataViewCtrlPtr
->GetDataViewPeer()->Update(GetOwner()->GetParent(items
[indexItem
]),items
[indexItem
]))
154 // send for all changed items a wxWidget event:
155 dataViewEvent
.SetItem(items
[indexItem
]);
156 m_DataViewCtrlPtr
->HandleWindowEvent(dataViewEvent
);
160 // if this location is reached all items have been updated:
161 AdjustRowHeights(items
);
162 AdjustAutosizedColumns();
167 bool wxOSXDataViewModelNotifier::ItemDeleted(wxDataViewItem
const& parent
, wxDataViewItem
const& item
)
172 wxCHECK_MSG(item
.IsOk(),false,"To be deleted item is invalid.");
173 // when this method is called and currently an item is being edited this item may have already been deleted in the model (the passed item and the being edited item have
174 // not to be identical because the being edited item might be below the passed item in the hierarchy);
175 // to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
176 // has been started and that variables can currently not be updated even when requested by the system:
177 m_DataViewCtrlPtr
->SetDeleting(true);
178 noFailureFlag
= m_DataViewCtrlPtr
->GetDataViewPeer()->Remove(parent
,item
);
179 // enable automatic updating again:
180 m_DataViewCtrlPtr
->SetDeleting(false);
182 AdjustAutosizedColumns();
184 return noFailureFlag
;
187 bool wxOSXDataViewModelNotifier::ItemsDeleted(wxDataViewItem
const& parent
, wxDataViewItemArray
const& items
)
192 // when this method is called and currently an item is being edited this item may have already been deleted in the model (the passed item and the being edited item have
193 // not to be identical because the being edited item might be below the passed item in the hierarchy);
194 // to prevent the control trying to ask the model to update an already deleted item the control is informed that currently a deleting process
195 // has been started and that variables can currently not be updated even when requested by the system:
196 m_DataViewCtrlPtr
->SetDeleting(true);
197 // delete all specified items:
198 noFailureFlag
= m_DataViewCtrlPtr
->GetDataViewPeer()->Remove(parent
,items
);
199 // enable automatic updating again:
200 m_DataViewCtrlPtr
->SetDeleting(false);
202 AdjustAutosizedColumns();
204 return noFailureFlag
;
207 bool wxOSXDataViewModelNotifier::ValueChanged(wxDataViewItem
const& item
, unsigned int col
)
209 wxCHECK_MSG(item
.IsOk(), false,"Passed item is invalid.");
210 wxCHECK_MSG(GetOwner() != NULL
,false,"Owner not initialized.");
211 if (m_DataViewCtrlPtr
->GetDataViewPeer()->Update(GetOwner()->GetParent(item
),item
))
213 wxDataViewEvent
dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED
,m_DataViewCtrlPtr
->GetId());
215 dataViewEvent
.SetEventObject(m_DataViewCtrlPtr
);
216 dataViewEvent
.SetColumn(col
);
217 dataViewEvent
.SetItem(item
);
218 // send the equivalent wxWidget event:
219 m_DataViewCtrlPtr
->HandleWindowEvent(dataViewEvent
);
221 AdjustAutosizedColumns();
229 bool wxOSXDataViewModelNotifier::Cleared()
231 return m_DataViewCtrlPtr
->GetDataViewPeer()->Reload();
234 void wxOSXDataViewModelNotifier::Resort()
236 m_DataViewCtrlPtr
->GetDataViewPeer()->Resort();
239 void wxOSXDataViewModelNotifier::AdjustRowHeight(wxDataViewItem
const& item
)
241 if ((m_DataViewCtrlPtr
->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT
) != 0)
243 wxDataViewModel
*model
= GetOwner();
245 int height
= 20; // TODO find out standard height
246 unsigned int num
= m_DataViewCtrlPtr
->GetColumnCount();
248 for (col
= 0; col
< num
; col
++)
250 wxDataViewColumn
* column(m_DataViewCtrlPtr
->GetColumnPtr(col
));
252 if (!(column
->IsHidden()))
254 wxDataViewCustomRenderer
*renderer
= dynamic_cast<wxDataViewCustomRenderer
*>(column
->GetRenderer());
258 model
->GetValue( value
, item
, column
->GetModelColumn() );
259 renderer
->SetValue( value
);
260 height
= wxMax( height
, renderer
->GetSize().y
);
265 m_DataViewCtrlPtr
->GetDataViewPeer()->SetRowHeight(item
,height
);
269 void wxOSXDataViewModelNotifier::AdjustRowHeights(wxDataViewItemArray
const& items
)
271 if ((m_DataViewCtrlPtr
->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT
) != 0)
273 size_t const noOfItems
= items
.GetCount();
275 wxDataViewModel
*model
= GetOwner();
277 for (size_t itemIndex
=0; itemIndex
<noOfItems
; ++itemIndex
)
279 int height
= 20; // TODO find out standard height
280 unsigned int num
= m_DataViewCtrlPtr
->GetColumnCount();
283 for (col
= 0; col
< num
; col
++)
285 wxDataViewColumn
* column(m_DataViewCtrlPtr
->GetColumnPtr(col
));
287 if (!(column
->IsHidden()))
289 wxDataViewCustomRenderer
*renderer
= dynamic_cast<wxDataViewCustomRenderer
*>(column
->GetRenderer());
293 model
->GetValue( value
, items
[itemIndex
], column
->GetModelColumn() );
294 renderer
->SetValue( value
);
295 height
= wxMax( height
, renderer
->GetSize().y
);
300 m_DataViewCtrlPtr
->GetDataViewPeer()->SetRowHeight(items
[itemIndex
],height
);
305 void wxOSXDataViewModelNotifier::AdjustAutosizedColumns()
307 unsigned count
= m_DataViewCtrlPtr
->GetColumnCount();
308 for ( unsigned col
= 0; col
< count
; col
++ )
310 wxDataViewColumn
*column
= m_DataViewCtrlPtr
->GetColumnPtr(col
);
312 if ( column
->GetWidthVariable() == wxCOL_WIDTH_AUTOSIZE
)
313 m_DataViewCtrlPtr
->GetDataViewPeer()->FitColumnWidthToContent(col
);
317 // ---------------------------------------------------------
318 // wxDataViewCustomRenderer
319 // The constructor, the implementation macro and environment
320 // dependent methods can be found in the environment's
322 // ---------------------------------------------------------
323 wxDataViewCustomRenderer::~wxDataViewCustomRenderer()
328 wxDC
* wxDataViewCustomRenderer::GetDC()
330 if ((m_DCPtr
== NULL
) && (GetOwner() != NULL
) && (GetOwner()->GetOwner() != NULL
))
331 m_DCPtr
= new wxClientDC(GetOwner()->GetOwner());
335 void wxDataViewCustomRenderer::SetDC(wxDC
* newDCPtr
)
341 //-----------------------------------------------------------------------------
343 //-----------------------------------------------------------------------------
345 wxDataViewCtrl::~wxDataViewCtrl()
350 void wxDataViewCtrl::Init()
352 m_CustomRendererPtr
= NULL
;
354 m_macIsUserPane
= false;
358 bool wxDataViewCtrl::Create(wxWindow
*parent
,
363 const wxValidator
& validator
,
364 const wxString
& name
)
366 if (!(wxControl::Create(parent
,id
,pos
,size
,style
,validator
,name
)))
368 m_peer
= ::CreateDataView(this,parent
,id
,pos
,size
,style
,GetExtraStyle());
370 MacPostControlCreate(pos
,size
);
375 bool wxDataViewCtrl::AssociateModel(wxDataViewModel
* model
)
377 wxDataViewWidgetImpl
* dataViewWidgetPtr(GetDataViewPeer());
380 wxCHECK_MSG(dataViewWidgetPtr
!= NULL
,false,"Pointer to native control must not be NULL.");
381 if (wxDataViewCtrlBase::AssociateModel(model
) && dataViewWidgetPtr
->AssociateModel(model
))
384 model
->AddNotifier(new wxOSXDataViewModelNotifier(this));
391 bool wxDataViewCtrl::AppendColumn(wxDataViewColumn
* columnPtr
)
393 return wxDataViewCtrl::InsertColumn( GetColumnCount(), columnPtr
);
396 bool wxDataViewCtrl::PrependColumn(wxDataViewColumn
* columnPtr
)
398 return wxDataViewCtrl::InsertColumn( 0, columnPtr
);
401 bool wxDataViewCtrl::InsertColumn(unsigned int pos
, wxDataViewColumn
* columnPtr
)
403 wxDataViewWidgetImpl
* dataViewWidgetPtr(GetDataViewPeer());
405 // first, some error checking:
406 wxCHECK_MSG(dataViewWidgetPtr
!= NULL
, false,"Pointer to native control must not be NULL.");
407 wxCHECK_MSG(columnPtr
!= NULL
, false,"Column pointer must not be NULL.");
408 wxCHECK_MSG(columnPtr
->GetRenderer() != NULL
, false,"Column does not have a renderer.");
409 wxCHECK_MSG(GetModel() != NULL
, false,"No model associated with control.");
410 wxCHECK_MSG((columnPtr
->GetModelColumn() >= 0) &&
411 (columnPtr
->GetModelColumn() < GetModel()->GetColumnCount()),false,"Column's model column has no equivalent in the associated model.");
413 // add column to wxWidget's internal structure:
414 if (wxDataViewCtrlBase::InsertColumn(pos
,columnPtr
))
416 m_ColumnPtrs
.Add(columnPtr
);
417 // if the insertion in the native control is successful the rest can also be initialized:
418 if (dataViewWidgetPtr
->InsertColumn(pos
,columnPtr
))
420 // make sure that the data is up-to-date...
421 // if the newly appended column is the first column add the initial data to the control and mark the column as an expander column,
422 // otherwise ask the control to 'update' the data in the newly appended column:
423 if (GetColumnCount() == 1)
424 SetExpanderColumn(columnPtr
);
431 m_ColumnPtrs
.Remove(columnPtr
);
433 // and send a message in debug mode:
434 wxFAIL_MSG("Column could not be added to native control.");
443 wxFAIL_MSG("Could not add column to internal structures.");
449 bool wxDataViewCtrl::ClearColumns()
451 if (GetDataViewPeer()->ClearColumns())
453 WX_CLEAR_ARRAY(m_ColumnPtrs
);
460 bool wxDataViewCtrl::DeleteColumn(wxDataViewColumn
* columnPtr
)
462 if (GetDataViewPeer()->DeleteColumn(columnPtr
))
464 m_ColumnPtrs
.Remove(columnPtr
);
472 wxDataViewColumn
* wxDataViewCtrl::GetColumn(unsigned int pos
) const
474 return GetDataViewPeer()->GetColumn(pos
);
477 unsigned int wxDataViewCtrl::GetColumnCount() const
479 return m_ColumnPtrs
.GetCount();
482 int wxDataViewCtrl::GetColumnPosition(wxDataViewColumn
const* columnPtr
) const
484 return GetDataViewPeer()->GetColumnPosition(columnPtr
);
487 void wxDataViewCtrl::Collapse(wxDataViewItem
const& item
)
489 GetDataViewPeer()->Collapse(item
);
492 void wxDataViewCtrl::EnsureVisible(wxDataViewItem
const& item
, wxDataViewColumn
const* columnPtr
)
496 ExpandAncestors(item
); // make sure that the item exists in the control
497 GetDataViewPeer()->EnsureVisible(item
,columnPtr
);
501 void wxDataViewCtrl::Expand(wxDataViewItem
const& item
)
503 return GetDataViewPeer()->Expand(item
);
506 bool wxDataViewCtrl::IsExpanded( const wxDataViewItem
& item
) const
508 return (item
.IsOk() && GetDataViewPeer()->IsExpanded(item
));
511 wxDataViewColumn
* wxDataViewCtrl::GetSortingColumn() const
513 return GetDataViewPeer()->GetSortingColumn();
516 unsigned int wxDataViewCtrl::GetCount() const
518 return GetDataViewPeer()->GetCount();
521 wxDataViewItem
wxDataViewCtrl::DoGetCurrentItem() const
523 return GetDataViewPeer()->GetCurrentItem();
526 void wxDataViewCtrl::DoSetCurrentItem(const wxDataViewItem
& item
)
528 GetDataViewPeer()->SetCurrentItem(item
);
531 wxRect
wxDataViewCtrl::GetItemRect(wxDataViewItem
const& item
, wxDataViewColumn
const* columnPtr
) const
533 if (item
.IsOk() && (columnPtr
!= NULL
))
534 return GetDataViewPeer()->GetRectangle(item
,columnPtr
);
539 wxDataViewItem
wxDataViewCtrl::GetSelection() const
541 wxDataViewItemArray itemIDs
;
544 if (GetDataViewPeer()->GetSelections(itemIDs
) > 0)
547 return wxDataViewItem();
550 int wxDataViewCtrl::GetSelections(wxDataViewItemArray
& sel
) const
552 return GetDataViewPeer()->GetSelections(sel
);
555 void wxDataViewCtrl::HitTest(wxPoint
const& point
, wxDataViewItem
& item
, wxDataViewColumn
*& columnPtr
) const
557 return GetDataViewPeer()->HitTest(point
,item
,columnPtr
);
560 bool wxDataViewCtrl::IsSelected(wxDataViewItem
const& item
) const
562 return GetDataViewPeer()->IsSelected(item
);
565 void wxDataViewCtrl::Select(wxDataViewItem
const& item
)
569 ExpandAncestors(item
); // make sure that the item exists in the control
570 GetDataViewPeer()->Select(item
);
574 void wxDataViewCtrl::SelectAll()
576 GetDataViewPeer()->SelectAll();
579 void wxDataViewCtrl::SetSelections(wxDataViewItemArray
const& sel
)
581 size_t const noOfSelections
= sel
.GetCount();
585 wxDataViewItem last_parent
;
588 // make sure that all to be selected items are visible in the control:
589 for (i
= 0; i
< noOfSelections
; i
++)
591 wxDataViewItem item
= sel
[i
];
592 wxDataViewItem parent
= GetModel()->GetParent( item
);
594 if (parent
.IsOk() && (parent
!= last_parent
))
595 ExpandAncestors(item
);
596 last_parent
= parent
;
599 // finally select the items:
600 wxDataViewWidgetImpl
* dataViewWidgetPtr(GetDataViewPeer()); // variable definition for abbreviational purposes
602 for (i
=0; i
<noOfSelections
; ++i
)
603 dataViewWidgetPtr
->Select(sel
[i
]);
606 void wxDataViewCtrl::Unselect(wxDataViewItem
const& item
)
609 GetDataViewPeer()->Unselect(item
);
612 void wxDataViewCtrl::UnselectAll()
614 GetDataViewPeer()->UnselectAll();
620 wxDataViewWidgetImpl
* wxDataViewCtrl::GetDataViewPeer() const
622 return dynamic_cast<wxDataViewWidgetImpl
*>(GetPeer());
625 void wxDataViewCtrl::AddChildren(wxDataViewItem
const& parentItem
)
629 wxDataViewItemArray items
;
632 wxCHECK_RET(GetModel() != NULL
,"Model pointer not initialized.");
633 noOfChildren
= GetModel()->GetChildren(parentItem
,items
);
634 (void) GetModel()->ItemsAdded(parentItem
,items
);
637 void wxDataViewCtrl::FinishCustomItemEditing()
639 if (GetCustomRendererItem().IsOk())
641 GetCustomRendererPtr()->FinishEditing();
642 SetCustomRendererItem(wxDataViewItem());
643 SetCustomRendererPtr (NULL
);
649 wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant
WXUNUSED(variant
))
651 wxVisualAttributes attr
;
653 attr
.colFg
= wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT
);
654 attr
.colBg
= wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX
);
655 static wxFont font
= wxFont(wxOSX_SYSTEM_FONT_VIEWS
);
661 // inherited methods from wxDataViewCtrlBase
662 void wxDataViewCtrl::DoSetExpanderColumn()
664 if (GetExpanderColumn() != NULL
)
665 GetDataViewPeer()->DoSetExpanderColumn(GetExpanderColumn());
668 void wxDataViewCtrl::DoSetIndent()
670 GetDataViewPeer()->DoSetIndent(GetIndent());
674 void wxDataViewCtrl::OnSize(wxSizeEvent
& event
)
676 unsigned int const noOfColumns
= GetColumnCount();
679 // reset DC of all custom renderers because DC has changed:
680 for (unsigned int i
=0; i
<noOfColumns
; ++i
)
682 wxDataViewColumn
* dataViewColumnPtr(GetColumn(i
));
684 if (dataViewColumnPtr
!= NULL
)
686 wxDataViewCustomRenderer
* dataViewCustomRendererPtr(dynamic_cast<wxDataViewCustomRenderer
*>(dataViewColumnPtr
->GetRenderer()));
688 if (dataViewCustomRendererPtr
!= NULL
)
689 dataViewCustomRendererPtr
->SetDC(NULL
);
693 // update the layout of the native control after a size event:
694 GetDataViewPeer()->OnSize();
699 wxSize
wxDataViewCtrl::DoGetBestSize() const
701 wxSize best
= wxControl::DoGetBestSize();
707 void wxDataViewCtrl::OnMouse(wxMouseEvent
& event
)
711 if (GetModel() == NULL
)
715 // Doesn't compile anymore
716 wxMacDataViewDataBrowserListViewControlPointer
MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer
>(m_peer
));
719 wxDataViewItemArray items
;
720 NoOfChildren
= GetModel()->GetChildren( wxDataViewItem(), items
);
721 if (NoOfChildren
== 0)
723 wxDataViewItem firstChild
= items
[0];
725 UInt16 headerHeight
= 0;
726 MacDataViewListCtrlPtr
->GetHeaderButtonHeight(&headerHeight
);
729 if (event
.GetY() < headerHeight
)
731 unsigned int col_count
= GetColumnCount();
733 for (col
= 0; col
< col_count
; col
++)
735 wxDataViewColumn
*column
= GetColumn( col
);
736 if (column
->IsHidden())
740 ::GetDataBrowserItemPartBounds( MacDataViewListCtrlPtr
->GetControlRef(),
741 reinterpret_cast<DataBrowserItemID
>(firstChild
.GetID()), column
->GetPropertyID(),
742 kDataBrowserPropertyEnclosingPart
, &itemrect
);
744 if (abs( event
.GetX() - itemrect
.right
) < 3)
746 if (column
->GetFlags() & wxDATAVIEW_COL_RESIZABLE
)
747 SetCursor( wxCursor( wxCURSOR_SIZEWE
) );
749 SetCursor( *wxSTANDARD_CURSOR
);
756 SetCursor( *wxSTANDARD_CURSOR
);
760 IMPLEMENT_DYNAMIC_CLASS(wxDataViewCtrl
,wxDataViewCtrlBase
)
762 BEGIN_EVENT_TABLE(wxDataViewCtrl
,wxDataViewCtrlBase
)
763 EVT_SIZE(wxDataViewCtrl::OnSize
)
764 EVT_MOTION(wxDataViewCtrl::OnMouse
)
767 #endif // (wxUSE_DATAVIEWCTRL != 0) && (!defined(wxUSE_GENERICDATAVIEWCTRL) || (wxUSE_GENERICDATAVIEWCTRL == 0))