Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Howto work out files/directories within a directory item
(1/1)
dushara:
Hi all,
I need to work out all the files and directories within a directory item that's selected. That is, the current selected item in the project tree is of type FileTreeData::ftdkFolder and I need to find all the files and sub directories. Is there a method that allows me to do this or do I need to work it out myself?
I'm not even sure how to work out the index of the selected item so that I can iterate from that point onwards.
Thanks
Dushara
oBFusCATed:
Have you tried to get the project tree control wxTreeCtrl* ProjectManager::GetTree(){ return m_pTree; }
and then to iterate it?
dushara:
--- Quote from: oBFusCATed on November 28, 2010, 02:50:49 pm ---Have you tried to get the project tree control wxTreeCtrl* ProjectManager::GetTree(){ return m_pTree; }
and then to iterate it?
--- End quote ---
Thanks for the reply.
I just had a look at it and it looks like I need to use GetFirstChild and GetNextChild. I'm using Wx-2.8 which marks these functions as deprecated.
wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item,
long& cookie) const );
wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item,
long& cookie) const );
I guess in the absence of anything else, I have to use these am I right? Or have I missed something obvious?
Thanks.
D
Navigation
[0] Message Index
Go to full version