Wt examples  4.10.4
DemoTreeList.h
Go to the documentation of this file.
1 // This may look like C code, but it's really -*- C++ -*-
2 /*
3  * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 #ifndef DEMO_TREE_LIST
8 #define DEMO_TREE_LIST
9 
10 #include <Wt/WContainerWidget.h>
11 
12 using namespace Wt;
13 
14 namespace Wt {
15  class WPushButton;
16 }
17 
18 class TreeNode;
19 
24 
30 {
31 public:
34  DemoTreeList();
35 
36 private:
40 
43 
46  void addFolder();
47 
50  void removeFolder();
51 
54  TreeNode *makeTreeFolder(const std::string name, TreeNode *parent);
55 
58  std::unique_ptr<TreeNode> makeTreeFolder(const std::string name);
59 
62  TreeNode *makeTreeFile(const std::string name, TreeNode *parent);
63 
66  std::unique_ptr<TreeNode> makeTreeFile(const std::string name);
67 };
68 
71 #endif // DEMO_TREE_LIST
A demonstration of the treelist.
Definition: DemoTreeList.h:30
TreeNode * testFolder_
Definition: DemoTreeList.h:38
TreeNode * tree_
Definition: DemoTreeList.h:37
WPushButton * removeFolderButton_
Definition: DemoTreeList.h:42
WPushButton * addFolderButton_
Definition: DemoTreeList.h:41
Example implementation of a single tree list node.
Definition: TreeNode.h:58