NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
DirTraverser.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19
20#include "controls/treedata.hpp"
21#include "wx/dir.h"
22#include <string>
23#include <vector>
24#include "IconManager.h"
25#include "../common/datastructures.h"
26
27
28class DirTraverser : public wxDirTraverser
29{
30 private:
31 wxTreeCtrl* rootNode;
33 wxTreeItemId id;
35 wxString path;
36 std::vector<wxTreeItemId> vcurrentnodes;
37 unsigned int ncurrentdepth;
38 public:
39 DirTraverser(wxTreeCtrl* therootNode, IconManager* theiconmanager, wxTreeItemId theid, const wxString& thepath, FileFilterType thefilespec);
40
41 virtual wxDirTraverseResult OnFile(const wxString& filename);
42 virtual wxDirTraverseResult OnDir(const wxString& dirname);
43};
44
wxTreeCtrl * rootNode
wxTreeItemId id
IconManager * iconManager
DirTraverser(wxTreeCtrl *therootNode, IconManager *theiconmanager, wxTreeItemId theid, const wxString &thepath, FileFilterType thefilespec)
Constuctor.
virtual wxDirTraverseResult OnDir(const wxString &dirname)
This method appends the folders found during traversing the directory to the file tree.
wxString path
unsigned int ncurrentdepth
std::vector< wxTreeItemId > vcurrentnodes
FileFilterType fileSpec
virtual wxDirTraverseResult OnFile(const wxString &filename)
This method classifies the files found during traversing the directory and appends them to the tree,...
FileFilterType