00001 /* 00002 * Copyright (C) 2007 Koen Deforche, Kessel-Lo, Belgium. 00003 * 00004 * See the LICENSE file for terms of use. 00005 */ 00006 00007 #include <WApplication> 00008 #include <WContainerWidget> 00009 00010 #include "FileTreeTable.h" 00011 00012 using namespace Wt; 00013 00014 WApplication *createApplication(const WEnvironment& env) 00015 { 00016 WApplication *app = new WApplication(env); 00017 app->setTitle("File explorer example"); 00018 app->useStyleSheet("filetree.css"); 00019 00020 #ifndef WIN32 00021 FileTreeTable *treeTable = new FileTreeTable("/home/kdf/project/wt"); 00022 #else 00023 FileTreeTable *treeTable = new FileTreeTable("/tmp"); 00024 #endif 00025 treeTable->resize(WLength(500), WLength()); 00026 00027 app->root()->addWidget(treeTable); 00028 00029 return app; 00030 } 00031 00032 int main(int argc, char **argv) 00033 { 00034 return WRun(argc, argv, &createApplication); 00035 } 00036
1.4.7