Wt examples  3.3.1
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
 
- Public Member Functions inherited from Wt::WWidget
virtual void setPositionScheme (PositionScheme scheme)=0
 
virtual PositionScheme positionScheme () const =0
 
virtual void setOffsets (const WLength &offset, WFlags< Side > sides=All)=0
 
virtual WLength offset (Side side) const =0
 
virtual void resize (const WLength &width, const WLength &height)
 
virtual WLength width () const =0
 
virtual WLength height () const =0
 
virtual void setMinimumSize (const WLength &width, const WLength &height)=0
 
virtual WLength minimumWidth () const =0
 
virtual WLength minimumHeight () const =0
 
virtual void setMaximumSize (const WLength &width, const WLength &height)=0
 
virtual WLength maximumWidth () const =0
 
virtual WLength maximumHeight () const =0
 
virtual void setLineHeight (const WLength &height)=0
 
virtual WLength lineHeight () const =0
 
virtual void setFloatSide (Side s)=0
 
virtual Side floatSide () const =0
 
virtual void setClearSides (WFlags< Side > sides)=0
 
virtual WFlags< SideclearSides () const =0
 
virtual void setMargin (const WLength &margin, WFlags< Side > sides=All)=0
 
virtual WLength margin (Side side) const =0
 
virtual void setHiddenKeepsGeometry (bool enabled)=0
 
virtual bool hiddenKeepsGeometry () const =0
 
virtual void setHidden (bool hidden, const WAnimation &animation=WAnimation())=0
 
virtual bool isHidden () const =0
 
virtual bool isVisible () const =0
 
virtual void setDisabled (bool disabled)=0
 
virtual bool isDisabled () const =0
 
virtual bool isEnabled () const =0
 
virtual void setPopup (bool popup)=0
 
virtual bool isPopup () const =0
 
virtual void setInline (bool inlined)=0
 
virtual bool isInline () const =0
 
virtual void setDecorationStyle (const WCssDecorationStyle &style)=0
 
virtual WCssDecorationStyledecorationStyle ()=0
 
virtual void setStyleClass (const WString &styleClass)=0
 
virtual WString styleClass () const =0
 
virtual void addStyleClass (const WString &styleClass, bool force=false)=0
 
virtual void removeStyleClass (const WString &styleClass, bool force=false)=0
 
virtual bool hasStyleClass (const WString &styleClass) const =0
 
virtual void setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength::Auto)=0
 
virtual AlignmentFlag verticalAlignment () const =0
 
virtual WLength verticalAlignmentLength () const =0
 
virtual void setToolTip (const WString &text, TextFormat textFormat=PlainText)=0
 
virtual const WStringtoolTip () const =0
 
virtual void refresh ()
 
virtual void setAttributeValue (const std::string &name, const WString &value)=0
 
virtual WString attributeValue (const std::string &name) const =0
 
virtual void setJavaScriptMember (const std::string &name, const std::string &value)=0
 
virtual std::string javaScriptMember (const std::string &name) const =0
 
virtual void callJavaScriptMember (const std::string &name, const std::string &args)=0
 
virtual void load ()=0
 
virtual bool loaded () const =0
 
virtual void setTabIndex (int index)=0
 
virtual int tabIndex () const =0
 
virtual void setId (const std::string &id)=0
 
virtual WWidgetfind (const std::string &name)=0
 
virtual void setSelectable (bool selectable)=0
 
virtual void doJavaScript (const std::string &js)=0
 

Additional Inherited Members

- Protected Member Functions inherited from Wt::WTreeTable
virtual void render (WFlags< RenderFlag > flags)
 
- Protected Member Functions inherited from Wt::WWidget
virtual void enableAjax ()=0
 
virtual void propagateSetEnabled (bool enabled)=0
 

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 }
void addColumn(const WString &header, const WLength &width)
WTreeTable(WContainerWidget *parent=0)
void setTreeRoot(WTreeTableNode *root, const WString &header)
WTreeTableNode * treeRoot()
WText * header(int column) const
void setImagePack(const std::string &url)
virtual void setStyleClass(const WString &styleClass)=0
A single node in a file tree table.

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

Generated on Wed Jun 11 2014 for the C++ Web Toolkit (Wt) by doxygen 1.8.7