- Allow specifying all wxFlexGridSizer parameters in XRC (Steffen Olszewski).
- Close wxLogWindow automatically if it's the last remaining top level window.
- Implement clipping for wxSVGFileDC (Steve Benbow).
+- Added wxDirCtrl::GetPath() (troelsk).
wxGTK:
// If the path string has been used (we're at the leaf), done is set to true
virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done);
+ wxString GetPath(wxTreeItemId itemId) const;
+
// Resize the components of the control
virtual void DoResize();
*/
virtual wxString GetPath() const;
+ /**
+ Gets the path corresponding to the given tree control item.
+
+ @since 2.9.5
+ */
+ wxString GetPath(wxTreeItemId itemId) const;
+
/**
Fills the array @a paths with the selected directories and filenames.
*/
return true;
}
+wxString wxGenericDirCtrl::GetPath(wxTreeItemId itemId) const
+{
+ const wxDirItemData*
+ data = static_cast<wxDirItemData*>(m_treeCtrl->GetItemData(itemId));
+
+ return data->m_path;
+}
wxString wxGenericDirCtrl::GetPath() const
{
{
// return first string only
wxTreeItemId treeid = items[0];
- wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(treeid);
- return data->m_path;
+ return GetPath(treeid);
}
return wxEmptyString;
wxTreeItemId treeid = m_treeCtrl->GetSelection();
if (treeid)
{
- wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(treeid);
- return data->m_path;
+ return GetPath(treeid);
}
else
return wxEmptyString;
for ( unsigned n = 0; n < items.size(); n++ )
{
wxTreeItemId treeid = items[n];
- wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(treeid);
- paths.Add(data->m_path);
+ paths.push_back(GetPath(treeid));
}
}