Defined in file: hzDissemino.h
Navigation tree. Tree items must have a reference name (for internal reference), a title (as seen by the user), and usually have an associated article. Tree items appear in the navtree as a folder if they have one or more child tree items. Hosting an article is optional for parent tree items, as they can simply act as blank headers. Tree items that are childless, must host an article.
This class employes the private sub-class _navitem as follows:-
_navitem
Constructors/Detructors
| hdsNavtree* | hdsNavtree | (hdsNavtree&) | |
| hdsNavtree* | hdsNavtree | (void) | |
| void | ~hdsNavtree | (void) |
Public Methods:
| hzEcode | AddHead | (hzString& parent)hzString& refname, hzString& title, bool bSlct, | Add a blank heading to the tree. No article so the _navitem only has the article title |
| hzEcode | AddItem | (hzString& parent)hzString& refname, hzString& title, hdsArticle* pArt, bool bSlct, | Add an item. The first item should have a NULL parent |
| void | Clear | (void) | |
| uint32_t | Count | (void) | |
| bool | Exists | (hzString& refname) | |
| hzEcode | ExportArticleSet | (hzChain& Z) | Purpose: Export tree as an article set |
| hzEcode | ExportDataScript | (hzChain& J) | Purpose: Build a HTML/JavaScript hierarchical tree. Generate data script for the tree. A data script for trees is always an array of treeitems which in turn comprise four values. These are the level, a 0 or a 1 for either item/folder, the title and the URL (link to item). The data script is used in conjuction with the _dsmScript_navtree/makeTree script which uses the data script to effect the tree in HTML bu a series of document.write operations. |
| hdsArticle* | GetItem | (hzString& refname) | |
| hdsArticle* | GetItem | (uint32_t itemId) | |
| hzEcode | _procArticle | (hzChain& Z)hzString& parent, | Support function for ExportArticleSet (see below) Adds tree item to supplied chain |
| hzEcode | _procTreeitem | (hzChain& J)hzString& parent, | Support function for ExportDataScript (see below) Adds tree item to supplied chain |
Overloaded operators:
| hdsNavtree& | operator= | (hdsNavtree&) |
Member Variables:
| hzArray<hdsArticle*> | m_Articles | All articles | |
| hzString | m_Groupname | Tree reference name. This is needed to reference trees in pages and in form handler exec commands. | |
| hzString | m_Hostpage | Host page URL | |
| hzMapS<hzString,hdsNavtree::_navitem> | m_ItemsByName | Maps refnames to title and position (if any) in m_Articles | |
| hzMapM<hzString,hzString> | m_ItemsByParent | All item refnames by parent refname | |
| hzEcode(*)(hzHttpEvent*,hzString&) | m_pFunc | No description |