]> Creatis software - crea.git/blob - lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.h
5b3d4a4d358cb126a3c4afb54ed5a77c180f2d56
[crea.git] / lib / creaDevManagerLib / wxCDMProjectsTreeCtrl.h
1 /*
2  * wxCreaDevManagerTreeCtrl.h
3  *
4  *  Created on: 19/10/2012
5  *      Author: daniel
6  */
7
8 #ifndef WXCDMPROJECTSTREECTRL_H_
9 #define WXCDMPROJECTSTREECTRL_H_
10
11 #include <creaWx.h>
12 #include <wx/treectrl.h>
13 #include "modelCDMProjectsTree.h"
14
15 #include <vector>
16
17 class wxCDMProjectsTreeCtrl: public wxTreeCtrl
18 {
19 public:
20   wxCDMProjectsTreeCtrl(
21       wxWindow *parent,
22       wxWindowID id=wxID_ANY,
23       const wxPoint &pos=wxDefaultPosition,
24       const wxSize &size=wxDefaultSize,
25       long style=wxTR_DEFAULT_STYLE,
26       const wxValidator &validator=wxDefaultValidator,
27       const wxString &name=_("Projects tree")
28   );
29   ~wxCDMProjectsTreeCtrl();
30   bool Create(
31     wxWindow *parent,
32     wxWindowID id=wxID_ANY,
33     const wxPoint &pos=wxDefaultPosition,
34     const wxSize &size=wxDefaultSize,
35     long style=wxTR_DEFAULT_STYLE,
36     const wxValidator &validator=wxDefaultValidator,
37     const wxString &name=_("Projects tree")
38   );
39
40   void BuildTree(const modelCDMProjectsTree& tree);
41 private:
42   void BuildTree(const std::vector<modelCDMProjectsTreeNode>& tree, wxTreeItemId parent);
43 };
44
45 #endif /* WXCDMPROJECTSTREECTRL_H_ */