|
Wt examples
4.0.0
|
A single node in a file tree table. More...
#include <FileTreeTableNode.h>

Public Member Functions | |
| FileTreeTableNode (const boost::filesystem::path &path) | |
| Construct a new node for the given file. More... | |
Public Member Functions inherited from Wt::WTreeTableNode | |
| WTreeTableNode (const WString &labelText, std::unique_ptr< WIconPair > labelIcon=nullptr) | |
| void | setColumnWidget (int column, std::unique_ptr< WWidget > item) |
| WWidget * | columnWidget (int column) |
| WTreeTable * | table () const |
| virtual void | insertChildNode (int index, std::unique_ptr< WTreeNode > node) override |
Public Member Functions inherited from Wt::WTreeNode | |
| WTreeNode (const WString &labelText, std::unique_ptr< WIconPair > labelIcon=nullptr) | |
| ~WTreeNode () | |
| virtual WTree * | tree () const |
| WText * | label () const |
| WIconPair * | labelIcon () const |
| void | setLabelIcon (std::unique_ptr< WIconPair > labelIcon) |
| WTreeNode * | addChildNode (std::unique_ptr< WTreeNode > node) |
| std::unique_ptr< WTreeNode > | removeChildNode (WTreeNode *node) |
| std::vector< WTreeNode * > | childNodes () const |
| virtual int | displayedChildCount () const |
| void | setChildCountPolicy (ChildCountPolicy policy) |
| ChildCountPolicy | childCountPolicy () const |
| void | setLoadPolicy (ContentLoading loadPolicy) |
| bool | isExpanded () const |
| virtual void | setSelectable (bool selectable) override |
| virtual bool | isSelectable () const |
| WTreeNode * | parentNode () const |
| void | setNodeVisible (bool visible) |
| void | setChildrenDecorated (bool decorated) |
| void | setInteractive (bool interactive) |
| void | expand () |
| void | collapse () |
| EventSignal< WMouseEvent > & | expanded () |
| EventSignal< WMouseEvent > & | collapsed () |
| Signal< bool > & | selected () |
Public Member Functions inherited from Wt::WCompositeWidget | |
| WCompositeWidget () | |
| WCompositeWidget (std::unique_ptr< WWidget > implementation) | |
| virtual std::vector< WWidget * > | children () const override |
| virtual std::unique_ptr< WWidget > | removeWidget (WWidget *widget) override |
| virtual void | setObjectName (const std::string &name) override |
| virtual std::string | objectName () const override |
| virtual const std::string | id () const override |
| virtual void | setPositionScheme (PositionScheme scheme) override |
| virtual PositionScheme | positionScheme () const override |
| virtual void | setOffsets (const WLength &offset, WFlags< Side > sides=AllSides) override |
| virtual WLength | offset (Side s) const override |
| virtual void | resize (const WLength &width, const WLength &height) override |
| virtual WLength | width () const override |
| virtual WLength | height () const override |
| virtual void | setMinimumSize (const WLength &width, const WLength &height) override |
| virtual WLength | minimumWidth () const override |
| virtual WLength | minimumHeight () const override |
| virtual void | setMaximumSize (const WLength &width, const WLength &height) override |
| virtual WLength | maximumWidth () const override |
| virtual WLength | maximumHeight () const override |
| virtual void | setLineHeight (const WLength &height) override |
| virtual WLength | lineHeight () const override |
| virtual void | setFloatSide (Side s) override |
| virtual Side | floatSide () const override |
| virtual void | setClearSides (WFlags< Side > sides) override |
| virtual WFlags< Side > | clearSides () const override |
| virtual void | setMargin (const WLength &margin, WFlags< Side > sides=AllSides) override |
| virtual WLength | margin (Side side) const override |
| virtual void | setHiddenKeepsGeometry (bool enabled) override |
| virtual bool | hiddenKeepsGeometry () const override |
| virtual void | setHidden (bool hidden, const WAnimation &animation=WAnimation()) override |
| virtual bool | isHidden () const override |
| virtual bool | isVisible () const override |
| virtual void | setDisabled (bool disabled) override |
| virtual bool | isDisabled () const override |
| virtual bool | isEnabled () const override |
| virtual void | setPopup (bool popup) override |
| virtual bool | isPopup () const override |
| virtual void | setInline (bool isInline) override |
| virtual bool | isInline () const override |
| virtual void | setDecorationStyle (const WCssDecorationStyle &style) override |
| virtual WCssDecorationStyle & | decorationStyle () override |
| virtual void | setStyleClass (const WString &styleClass) override |
| virtual WString | styleClass () const override |
| virtual void | addStyleClass (const WString &styleClass, bool force=false) override |
| virtual void | removeStyleClass (const WString &styleClass, bool force=false) override |
| virtual bool | hasStyleClass (const WString &styleClass) const override |
| virtual void | setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength::Auto) override |
| virtual AlignmentFlag | verticalAlignment () const override |
| virtual WLength | verticalAlignmentLength () const override |
| virtual void | setToolTip (const WString &text, TextFormat textFormat=TextFormat::Plain) override |
| virtual WString | toolTip () const override |
| virtual void | setDeferredToolTip (bool enable, TextFormat textFormat=TextFormat::Plain) override |
| virtual void | refresh () override |
| virtual void | setAttributeValue (const std::string &name, const WString &value) override |
| virtual WString | attributeValue (const std::string &name) const override |
| virtual void | setJavaScriptMember (const std::string &name, const std::string &value) override |
| virtual std::string | javaScriptMember (const std::string &name) const override |
| virtual void | callJavaScriptMember (const std::string &name, const std::string &args) override |
| virtual void | load () override |
| virtual bool | loaded () const override |
| virtual void | setCanReceiveFocus (bool enabled) override |
| virtual bool | canReceiveFocus () const override |
| virtual void | setFocus (bool focus) override |
| virtual bool | setFirstFocus () override |
| virtual bool | hasFocus () const override |
| virtual void | setTabIndex (int index) override |
| virtual int | tabIndex () const override |
| virtual void | setId (const std::string &id) override |
| virtual WWidget * | find (const std::string &name) override |
| virtual WWidget * | findById (const std::string &name) override |
| virtual void | doJavaScript (const std::string &js) override |
| virtual void | propagateSetEnabled (bool enabled) override |
| virtual bool | scrollVisibilityEnabled () const finaloverride |
| virtual void | setScrollVisibilityEnabled (bool enabled) finaloverride |
| virtual int | scrollVisibilityMargin () const finaloverride |
| virtual void | setScrollVisibilityMargin (int margin) finaloverride |
| virtual Signal< bool > & | scrollVisibilityChanged () finaloverride |
| virtual bool | isScrollVisible () const finaloverride |
| virtual void | setThemeStyleEnabled (bool enabled) finaloverride |
| virtual bool | isThemeStyleEnabled () const finaloverride |
Public Member Functions inherited from Wt::WWidget | |
| virtual | ~WWidget () |
| WWidget * | parent () const |
| std::unique_ptr< WWidget > | removeFromParent () |
| void | setWidth (const WLength &width) |
| void | setHeight (const WLength &height) |
| virtual void | positionAt (const WWidget *widget, Orientation orientation=Orientation::Vertical) |
| virtual void | toggleStyleClass (const WString &styleClass, bool add, bool force=false) |
| std::string | jsRef () const |
| void | setFocus () |
| virtual void | acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString()) |
| virtual void | stopAcceptDrops (const std::string &mimeType) |
| virtual void | htmlText (std::ostream &out) |
| bool | isRendered () const |
| void | hide () |
| void | animateHide (const WAnimation &animation) |
| void | show () |
| void | animateShow (const WAnimation &animation) |
| void | enable () |
| void | disable () |
| bool | layoutSizeAware () const |
Public Member Functions inherited from Wt::WObject | |
| void | addChild (std::unique_ptr< WObject > child) |
| Child * | addChild (std::unique_ptr< Child > child) |
| std::unique_ptr< WObject > | removeChild (WObject *child) |
| void | resetLearnedSlots () |
| void | resetLearnedSlot (void(T::*method)()) |
| WStatelessSlot * | implementStateless (void(T::*method)()) |
| WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
| void | isNotStateless () |
| WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
Public Member Functions inherited from Wt::Core::observable | |
| observable () | |
| virtual | ~observable () |
| auto | bindSafe (void(C::*method)(Args...)) |
| auto | bindSafe (void(C::*method)(Args...) const) const |
| auto | bindSafe (const Function &function) |
Private Member Functions | |
| virtual void | populate () override |
| Reimplements WTreeNode::populate to read files within a directory. More... | |
| virtual bool | expandable () override |
| Reimplements WTreeNode::expandable. More... | |
Static Private Member Functions | |
| static std::unique_ptr< WIconPair > | createIcon (const boost::filesystem::path &path) |
| Create the iconpair for representing the path. More... | |
Private Attributes | |
| boost::filesystem::path | path_ |
| The path. More... | |
Additional Inherited Members | |
Public Types inherited from Wt::WObject | |
| typedef void(WObject::* | Method) () |
Static Public Member Functions inherited from Wt::WWidget | |
| static WString | tr (const char *key) |
Protected Member Functions inherited from Wt::WTreeTableNode | |
| virtual void | setTable (WTreeTable *table) |
Protected Member Functions inherited from Wt::WTreeNode | |
| WTreeNode () | |
| WContainerWidget * | labelArea () const |
| bool | populated () const |
| virtual void | renderSelected (bool selected) |
| virtual void | descendantRemoved (WTreeNode *node) |
| virtual void | descendantAdded (WTreeNode *node) |
| virtual void | doExpand () |
| virtual void | doCollapse () |
| virtual void | undoDoExpand () |
| virtual void | undoDoCollapse () |
| WIconPair * | expandIcon () const |
Protected Member Functions inherited from Wt::WCompositeWidget | |
| virtual void | enableAjax () override |
| void | setImplementation (std::unique_ptr< WWidget > widget) |
| WWidget * | implementation () |
| virtual int | boxPadding (Orientation orientation) const override |
| virtual int | boxBorder (Orientation orientation) const override |
| virtual void | render (WFlags< RenderFlag > flags) override |
Protected Member Functions inherited from Wt::WWidget | |
| void | setLayoutSizeAware (bool sizeAware) |
| virtual void | layoutSizeChanged (int width, int height) |
| WWidget () | |
| virtual void | dropEvent (WDropEvent dropEvent) |
| void | scheduleRender (WFlags< RepaintFlag > flags=None) |
| virtual WStatelessSlot * | getStateless (Method method) override |
A single node in a file tree table.
The node manages the details about one file, and if the file is a directory, populates a subtree with nodes for every directory item.
The tree node reimplements Wt::WTreeTableNode::populate() to populate a directory node only when the node is expanded. In this way, only directories that are actually browsed are loaded from disk.
Definition at line 30 of file FileTreeTableNode.h.
| FileTreeTableNode::FileTreeTableNode | ( | const boost::filesystem::path & | path | ) |
Construct a new node for the given file.
Definition at line 21 of file FileTreeTableNode.C.
|
staticprivate |
|
overrideprivatevirtual |
Reimplements WTreeNode::expandable.
Reimplemented from Wt::WTreeNode.
Definition at line 89 of file FileTreeTableNode.C.
|
overrideprivatevirtual |
Reimplements WTreeNode::populate to read files within a directory.
Reimplemented from Wt::WTreeNode.
Definition at line 66 of file FileTreeTableNode.C.
|
private |
The path.
Definition at line 39 of file FileTreeTableNode.h.
1.8.11