Wt examples  3.2.3
/home/koen/project/wt/public-git/wt/examples/filetreetable/FileTreeExample.C
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
00003  *
00004  * See the LICENSE file for terms of use.
00005  */
00006 
00007 #include <Wt/WApplication>
00008 #include <Wt/WContainerWidget>
00009 #include <Wt/WTree>
00010 #include <Wt/WTreeTableNode>
00011 
00012 #include "FileTreeTable.h"
00013 
00014 using namespace Wt;
00015 
00016 WApplication *createApplication(const WEnvironment& env)
00017 {
00018   WApplication *app = new WApplication(env);
00019   app->setTitle("File explorer example");
00020   app->useStyleSheet("filetree.css");
00021 
00022   FileTreeTable *treeTable = new FileTreeTable(".");
00023   treeTable->resize(500, 300);
00024   treeTable->tree()->setSelectionMode(ExtendedSelection);
00025   treeTable->treeRoot()->setNodeVisible(false);
00026   treeTable->treeRoot()->setChildCountPolicy(WTreeNode::Enabled);
00027 
00028   app->root()->addWidget(treeTable);
00029 
00030   return app;
00031 }
00032 
00033 int main(int argc, char **argv)
00034 {
00035    return WRun(argc, argv, &createApplication);
00036 }
00037 

Generated on Thu Nov 1 2012 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1