+bool wxDataViewCtrl::IsSelected(wxDataViewItem const& item) const
+{
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ return MacDataViewListCtrlPtr->IsItemSelected(reinterpret_cast<DataBrowserItemID>(item.GetID()));
+} /* wxDataViewCtrl::IsSelected(wxDataViewItem const&) const */
+
+void wxDataViewCtrl::SelectAll(void)
+{
+ DataBrowserItemID* itemIDPtr;
+
+ Handle handle(::NewHandle(0));
+
+ size_t NoOfItems;
+
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ wxCHECK_RET(MacDataViewListCtrlPtr->GetItems(kDataBrowserNoItem,true,kDataBrowserItemAnyState,handle) == noErr,_("Could not get items."));
+ NoOfItems = static_cast<size_t>(::GetHandleSize(handle)/sizeof(DataBrowserItemID));
+ HLock(handle);
+ itemIDPtr = (DataBrowserItemID*) (*handle);
+ MacDataViewListCtrlPtr->SetSelectedItems(NoOfItems,itemIDPtr,kDataBrowserItemsAssign);
+ HUnlock(handle);
+ DisposeHandle(handle);
+} /* wxDataViewCtrl::SelectAll(void) */
+
+void wxDataViewCtrl::Select(wxDataViewItem const& item)
+{
+ if (item.IsOk())
+ {
+ // variable definition and initialization:
+ DataBrowserItemID itemID(reinterpret_cast<DataBrowserItemID>(item.GetID()));
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+ MacDataViewListCtrlPtr->SetSelectedItems(1,&itemID,kDataBrowserItemsAdd);
+ } /* if */
+} /* wxDataViewCtrl::Select(wxDataViewItem const&) */
+
+void wxDataViewCtrl::SetSelections(wxDataViewItemArray const& sel)
+{
+ size_t const NoOfSelections = sel.GetCount();
+
+ DataBrowserItemID* itemIDs;
+
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ itemIDs = new DataBrowserItemID[NoOfSelections];
+ for (size_t i=0; i<NoOfSelections; ++i)
+ itemIDs[i] = reinterpret_cast<DataBrowserItemID>(sel[i].GetID());
+ MacDataViewListCtrlPtr->SetSelectedItems(NoOfSelections,itemIDs,kDataBrowserItemsAssign);
+ delete[] itemIDs;
+} /* wxDataViewCtrl::SetSelections(wxDataViewItemArray const&) */
+
+void wxDataViewCtrl::Unselect(wxDataViewItem const& item)
+{
+ if (item.IsOk())
+ {
+ // variable definition and initialization:
+ DataBrowserItemID itemID(reinterpret_cast<DataBrowserItemID>(item.GetID()));
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+ MacDataViewListCtrlPtr->SetSelectedItems(1,&itemID,kDataBrowserItemsRemove);
+ } /* if */
+} /* wxDataViewCtrl::Unselect(wxDataViewItem const&) */
+
+void wxDataViewCtrl::UnselectAll(void)
+{
+ DataBrowserItemID* itemIDPtr;
+
+ Handle handle(::NewHandle(0));
+
+ size_t NoOfItems;
+
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ wxCHECK_RET(MacDataViewListCtrlPtr->GetItems(kDataBrowserNoItem,true,kDataBrowserItemAnyState,handle) == noErr,_("Could not get items."));
+ NoOfItems = static_cast<size_t>(::GetHandleSize(handle)/sizeof(DataBrowserItemID));
+ HLock(handle);
+ itemIDPtr = (DataBrowserItemID*) (*handle);
+ MacDataViewListCtrlPtr->SetSelectedItems(NoOfItems,itemIDPtr,kDataBrowserItemsRemove);
+ HUnlock(handle);
+ DisposeHandle(handle);
+} /* wxDataViewCtrl::UnselectAll(void) */