Wt examples  3.2.1
/home/koen/project/wt/public-git/wt/examples/filetreetable/FileTreeTable.C
Go to the documentation of this file.
00001 // This may look like C code, but it's really -*- C++ -*-
00002 /*
00003  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
00004  *
00005  * See the LICENSE file for terms of use.
00006  */
00007 
00008 #include "FileTreeTable.h"
00009 #include "FileTreeTableNode.h"
00010 
00011 #include <Wt/WText>
00012 
00013 using namespace Wt;
00014 
00015 FileTreeTable::FileTreeTable(const boost::filesystem::path& path,
00016                              WContainerWidget *parent)
00017   : WTreeTable(parent)
00018 {
00019   addColumn("Size", 80);
00020   addColumn("Modified", 110);
00021 
00022   header(1)->setStyleClass("fsize");
00023   header(2)->setStyleClass("date");
00024 
00025   setTreeRoot(new FileTreeTableNode(path), "File");
00026 
00027   treeRoot()->setImagePack("icons/");
00028   treeRoot()->expand();
00029 }

Generated on Fri Mar 30 2012 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1