Wt examples 3.3.12
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>
12
13using namespace Wt;
14
15FileTreeTable::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}
A single node in a file tree table.
FileTreeTable(const boost::filesystem::path &path, Wt::WContainerWidget *parent=0)
Construct a new FileTreeTable.
void setImagePack(const std::string &url)
void setTreeRoot(WTreeTableNode *root, const WString &header)
void addColumn(const WString &header, const WLength &width)
WTreeTableNode * treeRoot()
WText * header(int column) const
virtual void setStyleClass(const WString &styleClass)

Generated on Fri May 17 2024 for the C++ Web Toolkit (Wt) by doxygen 1.9.8