Wt examples  4.0.0
FileTreeTable.C
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 bvba, Kessel-Lo, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 
8 #include "FileTreeTable.h"
9 #include "FileTreeTableNode.h"
10 
11 #include <Wt/WText.h>
12 
13 using namespace Wt;
14 
15 FileTreeTable::FileTreeTable(const boost::filesystem::path& path)
16  : WTreeTable()
17 {
18  addColumn("Size", 80);
19  addColumn("Modified", 110);
20 
21  header(1)->setStyleClass("fsize");
22  header(2)->setStyleClass("date");
23 
24  auto tableNode
25  = cpp14::make_unique<FileTreeTableNode>(path);
26  setTreeRoot(std::move(tableNode), "File");
27 
28  //treeRoot()->setImagePack("icons/");
29  treeRoot()->expand();
30 }
virtual void setStyleClass(const WString &styleClass) override
void addColumn(const WString &header, const WLength &width)
void setTreeRoot(std::unique_ptr< WTreeTableNode > root, const WString &header)
FileTreeTable(const boost::filesystem::path &path)
Construct a new FileTreeTable.
Definition: FileTreeTable.C:15
WTreeTableNode * treeRoot()
WText * header(int column) const

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