Wt examples  3.3.8
FileTreeExample.C
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
3  *
4  * See the LICENSE file for terms of use.
5  */
6 
7 #include <Wt/WApplication>
8 #include <Wt/WContainerWidget>
9 #include <Wt/WTree>
10 #include <Wt/WTreeTableNode>
11 
12 #include "FileTreeTable.h"
13 
14 using namespace Wt;
15 
17 {
18  WApplication *app = new WApplication(env);
19  app->setTitle("File explorer example");
20  app->useStyleSheet("filetree.css");
21 
22  FileTreeTable *treeTable = new FileTreeTable(".");
23  treeTable->resize(500, 300);
25  treeTable->treeRoot()->setNodeVisible(false);
27 
28  app->root()->addWidget(treeTable);
29 
30  return app;
31 }
32 
33 int main(int argc, char **argv)
34 {
35  return WRun(argc, argv, &createApplication);
36 }
37 
void setNodeVisible(bool visible)
WApplication * createApplication(const WEnvironment &env)
void setTitle(const WString &title)
ExtendedSelection
virtual void resize(const WLength &width, const WLength &height)
WTreeTableNode * treeRoot()
void setSelectionMode(SelectionMode mode)
void useStyleSheet(const WLink &link, const std::string &media="all")
virtual void addWidget(WWidget *widget)
WContainerWidget * root() const
WTree * tree() const
int main(int argc, char **argv)
void setChildCountPolicy(ChildCountPolicy policy)
A tree table that displays a file tree.
Definition: FileTreeTable.h:33

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11