Wt examples  3.3.0
Public Member Functions | List of all members
FileTreeTable Class Reference

A tree table that displays a file tree. More...

#include <FileTreeTable.h>

Inheritance diagram for FileTreeTable:
Inheritance graph
[legend]

Public Member Functions

 FileTreeTable (const boost::filesystem::path &path, Wt::WContainerWidget *parent=0)
 Construct a new FileTreeTable. More...
 
- Public Member Functions inherited from Wt::WTreeTable
 WTreeTable (WContainerWidget *parent=0)
 
void addColumn (const WString &header, const WLength &width)
 
int columnCount () const
 
void setTreeRoot (WTreeTableNode *root, const WString &header)
 
WTreeTableNodetreeRoot ()
 
void setTree (WTree *tree, const WString &header)
 
WTreetree () const
 
WLength columnWidth (int column) const
 
WTextheader (int column) const
 
WWidgetheaderWidget () const
 

Additional Inherited Members

- Protected Member Functions inherited from Wt::WTreeTable
virtual void render (WFlags< RenderFlag > flags)
 

Detailed Description

A tree table that displays a file tree.

The table allows one to browse a path, and all its subdirectories, using a tree table. In addition to the file name, it shows file size and modification date.

The table use FileTreeTableNode objects to display the actual content of the table.

The tree table uses the LazyLoading strategy of WTreeNode to dynamically load contents for the tree.

This widget is part of the Wt File Explorer example.

Definition at line 33 of file FileTreeTable.h.

Constructor & Destructor Documentation

FileTreeTable::FileTreeTable ( const boost::filesystem::path &  path,
Wt::WContainerWidget parent = 0 
)

Construct a new FileTreeTable.

Create a new FileTreeTable to browse the given path.

Definition at line 15 of file FileTreeTable.C.

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 }

The documentation for this class was generated from the following files:

Generated on Fri May 31 2013 for the C++ Web Toolkit (Wt) by doxygen 1.8.3.1