+bool wxDataViewCtrl::ClearColumns(void)
+{
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ while (this->m_ColumnPointers.begin() != this->m_ColumnPointers.end())
+ {
+ wxCHECK_MSG(MacDataViewListCtrlPtr->RemoveColumnByProperty(this->m_ColumnPointers.begin()->first) == noErr,false,_("Could not remove column."));
+ delete this->m_ColumnPointers.begin()->second;
+ this->m_ColumnPointers.erase(this->m_ColumnPointers.begin());
+ } /* while */
+ return true;
+} /* wxDataViewCtrl::ClearColumns(void) */
+
+bool wxDataViewCtrl::DeleteColumn(wxDataViewColumn* columnPtr)
+{
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ if ((MacDataViewListCtrlPtr->RemoveColumnByProperty(columnPtr->GetPropertyID()) == noErr) && (this->m_ColumnPointers.erase(columnPtr->GetPropertyID()) > 0))
+ {
+ delete columnPtr;
+ return true;
+ } /* if */
+ else
+ return false;
+} /* wxDataViewCtrl::DeleteColumn(wxDataViewColumn*) */
+
+wxDataViewColumn* wxDataViewCtrl::GetColumn(unsigned int pos) const
+{
+ DataBrowserPropertyID propertyID;
+
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ if (MacDataViewListCtrlPtr->GetPropertyID(pos,&propertyID) == noErr)
+ {
+ // variable definition:
+ ColumnPointerHashMapType::const_iterator Result(this->m_ColumnPointers.find(propertyID));
+
+ if (Result != this->m_ColumnPointers.end())
+ return Result->second;
+ else
+ return NULL;
+ } /* if */
+ else
+ return NULL;
+} /* wxDataViewCtrl::GetColumn(unsigned int pos) const */
+
+unsigned int wxDataViewCtrl::GetColumnCount(void) const
+{
+ return this->m_ColumnPointers.size();
+} /* wxDataViewCtrl::GetColumnCount(void) const */
+
+int wxDataViewCtrl::GetColumnPosition(wxDataViewColumn const* columnPtr) const
+{
+ if (columnPtr != NULL)
+ {
+ // variable definition and initialization:
+ DataBrowserTableViewColumnIndex Position;
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+ wxCHECK_MSG(MacDataViewListCtrlPtr->GetColumnIndex(columnPtr->GetPropertyID(),&Position) == noErr,-1,_("Could not determine column's position"));
+ return static_cast<int>(Position);
+ } /* if */
+ else
+ return wxNOT_FOUND;
+} /* wxDataViewCtrl::GetColumnPosition(wxDataViewColumn const*) const */
+
+void wxDataViewCtrl::Collapse(wxDataViewItem const& item)
+{
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ MacDataViewListCtrlPtr->CloseContainer(reinterpret_cast<DataBrowserItemID>(item.GetID()));
+} /* wxDataViewCtrl::Collapse(wxDataViewItem const&) */
+
+void wxDataViewCtrl::EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr)
+{
+ if (item.IsOk())
+ {
+ // variable definition and initialization:
+ DataBrowserPropertyID propertyID;
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+ if (columnPtr != NULL)
+ propertyID = columnPtr->GetPropertyID();
+ else
+ propertyID = kDataBrowserNoItem;
+ MacDataViewListCtrlPtr->RevealItem(reinterpret_cast<DataBrowserItemID>(item.GetID()),propertyID,kDataBrowserRevealOnly);
+ } /* if */
+} /* wxDataViewCtrl::EnsureVisible(wxDataViewItem const&, wxDataViewColumn const*) */
+
+void wxDataViewCtrl::Expand(wxDataViewItem const& item)
+{
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ MacDataViewListCtrlPtr->OpenContainer(reinterpret_cast<DataBrowserItemID>(item.GetID()));
+} /* wxDataViewCtrl::Expand(wxDataViewItem const&) */
+
+wxDataViewColumn* wxDataViewCtrl::GetSortingColumn(void) const
+{
+ DataBrowserPropertyID propertyID;
+
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+
+ if (MacDataViewListCtrlPtr->GetSortProperty(&propertyID) == noErr)
+ return this->GetColumnPtr(propertyID);
+ else
+ return NULL;
+} /* wxDataViewCtrl::GetSortingColumn(void) const */
+
+unsigned int wxDataViewCtrl::GetCount(void) const
+{
+ ItemCount noOfItems;
+
+
+ wxCHECK_MSG(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer)->GetItemCount(&noOfItems) == noErr,0,_("Could not determine number of items"));
+ return noOfItems;
+} /* wxDataViewCtrl::GetCount(void) const */
+
+wxRect wxDataViewCtrl::GetItemRect(wxDataViewItem const& item, wxDataViewColumn const* columnPtr) const
+{
+ if (item.IsOk() && (columnPtr != NULL))
+ {
+ // variable definition:
+ Rect MacRectangle;
+ wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
+
+ if (MacDataViewListCtrlPtr->GetPartBounds(reinterpret_cast<DataBrowserItemID>(item.GetID()),columnPtr->GetPropertyID(),kDataBrowserPropertyContentPart,&MacRectangle) == noErr)
+ {
+ // variable definition:
+ wxRect rectangle;
+
+ ::wxMacNativeToRect(&MacRectangle,&rectangle);
+ return rectangle;
+ } /* if */
+ else
+ return wxRect();
+ } /* if */
+ else
+ return wxRect();
+} /* wxDataViewCtrl::GetItemRect(wxDataViewItem const&, unsigned int) const */
+
+wxDataViewItem wxDataViewCtrl::GetSelection(void) const