cwDirectory panelclient
Panel defined in core/derma/cl_directory.lua
Defines the cwDirectory menu tab, which shows the categories of cw.directory in a tree on the left and the
selected category's page in a DHTML view.
The tab stores itself as cw.directory.panel and rebuilds its tree from cw.directory.stored.
Summary
Methods
cw.directory.panel and builds the tree.cw.directory.stored and shows the current category again.Methods
Removes every node from the category tree.
Returns the width the menu should give the directory tab.
Returns
- Number Half of the screen width
Sizes the directory menu tab to the menu, creates the category tree and page view, registers itself
as cw.directory.panel and builds the tree.
Draws the light grey panel background.
Parameters
- w
- h
Places the category tree on the left quarter and the page view on the rest.
Parameters
- w
- h
Rebuilds the category tree from cw.directory.stored and shows the current category again.
Runs the ClockworkDirectoryRebuilt hook first, so plugins can add categories. Nested categories go
under their parent. Does nothing when called again from inside that hook.
Shows a directory category in the page view.
Plain categories join their pages (sorted with the category's sorting function, each page's
Callback applied) and wrap them in the category and master formatting. HTML categories are wrapped
the same way, and website categories open their URL. [category] and {category} in the result are
replaced with the category name. Without a category, a page asking to pick one is shown. Unknown
categories are ignored.
Parameters
- category String optional, defaults to
nilName of the category to show
Lays the panel out again when the screen height changes.