wxString title = m_music_model->GetTitle( event.GetItem() );
wxLogMessage(wxT("wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, Item: %s"), title );
+
+ if (m_musicCtrl->IsExpanded( event.GetItem() ))
+ wxLogMessage(wxT("Item: %s is expanded"), title );
}
void MyFrame::OnSelectionChanged( wxDataViewEvent &event )
GtkTreeIter iter;
iter.user_data = item.GetID();
GtkTreePath *path = m_internal->get_path( &iter );
- gtk_tree_view_row_expanded( GTK_TREE_VIEW(m_treeview), path );
+ bool res = gtk_tree_view_row_expanded( GTK_TREE_VIEW(m_treeview), path );
gtk_tree_path_free( path );
+
+ return res;
}
wxDataViewItem wxDataViewCtrl::GetSelection() const
{
wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(m_peer));
- // TODO ???
- // This doesn't seem to be supported
+ DataBrowserItemState state = 0;
+ OSStatus err = ::GetDataBrowserItemState(
+ MacDataViewListCtrlPtr->GetControlRef(),
+ reinterpret_cast<DataBrowserItemID>(item.GetID()),
+ &state );
+ if ((err == 0) && (state & kDataBrowserContainerIsOpen))
+ return true;
}
return false;
}