Wt examples
4.3.0
builddir
build
BUILD
wt-4.3.0
examples
filetreetable
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.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
}
Wt::WTreeTable::treeRoot
WTreeTableNode * treeRoot()
Wt
FileTreeTable::FileTreeTable
FileTreeTable(const boost::filesystem::path &path)
Construct a new FileTreeTable.
Definition:
FileTreeTable.C:15
Wt::WTreeTable::addColumn
void addColumn(const WString &header, const WLength &width)
Wt::WTreeTable
Wt::WWebWidget::setStyleClass
virtual void setStyleClass(const WString &styleClass) override
Wt::WTreeTable::header
WText * header(int column) const
FileTreeTableNode.h
Wt::WTreeTable::setTreeRoot
void setTreeRoot(std::unique_ptr< WTreeTableNode > root, const WString &header)
Wt::WTreeNode::expand
void expand()
FileTreeTable.h
Generated on Thu Mar 26 2020 for
the C++ Web Toolkit (Wt)
by
1.8.17