Wt examples: treelist/DemoTreeList.h Source File

Wt examples 4.10.4

Loading...
Searching...
No Matches
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
12using namespace Wt;
13
14namespace Wt {
15 class WPushButton;
16}
17
18class TreeNode;
19
24
29 class DemoTreeList : public WContainerWidget
30{
31public:
34 DemoTreeList();
35
36private:
37 TreeNode *tree_;
38 TreeNode *testFolder_;
39 int testCount_;
40
41 WPushButton *addFolderButton_;
42 WPushButton *removeFolderButton_;
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
DemoTreeList
A demonstration of the treelist.
Definition DemoTreeList.h:30
DemoTreeList::testCount_
int testCount_
Definition DemoTreeList.h:39
DemoTreeList::testFolder_
TreeNode * testFolder_
Definition DemoTreeList.h:38
DemoTreeList::tree_
TreeNode * tree_
Definition DemoTreeList.h:37
DemoTreeList::removeFolder
void removeFolder()
Remove a folder.
Definition DemoTreeList.C:110
DemoTreeList::addFolder
void addFolder()
Add a folder.
Definition DemoTreeList.C:101
DemoTreeList::DemoTreeList
DemoTreeList()
Create a DemoTreeList.
Definition DemoTreeList.C:19
DemoTreeList::makeTreeFolder
TreeNode * makeTreeFolder(const std::string name, TreeNode *parent)
Create a "folder" node, and insert in the given parent.
Definition DemoTreeList.C:125
DemoTreeList::removeFolderButton_
WPushButton * removeFolderButton_
Definition DemoTreeList.h:42
DemoTreeList::makeTreeFile
TreeNode * makeTreeFile(const std::string name, TreeNode *parent)
Create a "file" node, and insert in the given parent.
Definition DemoTreeList.C:152
DemoTreeList::addFolderButton_
WPushButton * addFolderButton_
Definition DemoTreeList.h:41
TreeNode
Example implementation of a single tree list node.
Definition TreeNode.h:58
Wt
Definition AddresseeEdit.h:16