Wt examples  3.7.1
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 bv, Herent, 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>
12 
13 using namespace Wt;
14 
15 FileTreeTable::FileTreeTable(const boost::filesystem::path& path,
16  WContainerWidget *parent)
17  : WTreeTable(parent)
18 {
19  addColumn("Size", 80);
20  addColumn("Modified", 110);
21 
22  header(1)->setStyleClass("fsize");
23  header(2)->setStyleClass("date");
24 
25  setTreeRoot(new FileTreeTableNode(path), "File");
26 
27  treeRoot()->setImagePack("icons/");
28  treeRoot()->expand();
29 }
virtual void setStyleClass(const WString &styleClass) override
WText * header(int column) const
FileTreeTable(const boost::filesystem::path &path, Wt::WContainerWidget *parent=0)
Construct a new FileTreeTable.
Definition: FileTreeTable.C:15
void addColumn(const WString &header, const WLength &width)
void setTreeRoot(std::unique_ptr< WTreeTableNode > root, const WString &header)
WTreeTableNode * treeRoot()
A single node in a file tree table.

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13