<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=dTree%2FAPI</id>
	<title>dTree/API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=dTree%2FAPI"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=dTree/API&amp;action=history"/>
	<updated>2026-09-27T08:54:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=dTree/API&amp;diff=14863&amp;oldid=prev</id>
		<title>Woozle: moved dtree/API to dTree/API: the T is capitalized in the code, so I think that must be the official name. This will help distinguish it from the Linux CLI utility &quot;dtree&quot;, too.</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=dTree/API&amp;diff=14863&amp;oldid=prev"/>
		<updated>2011-01-12T02:01:18Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/dtree/API&quot; class=&quot;mw-redirect&quot; title=&quot;dtree/API&quot;&gt;dtree/API&lt;/a&gt; to &lt;a href=&quot;/dTree/API&quot; title=&quot;dTree/API&quot;&gt;dTree/API&lt;/a&gt;: the T is capitalized in the code, so I think that must be the official name. This will help distinguish it from the Linux CLI utility &amp;quot;dtree&amp;quot;, too.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:01, 12 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=dTree/API&amp;diff=14858&amp;oldid=prev</id>
		<title>Woozle: Created page with &quot;==Functions== ===add()=== Adds a node to the tree.&lt;br /&gt;Can only be called before the tree is drawn. 	&lt;p&gt;id, pid and name are required.&lt;/p&gt; ====Parameters==== 	&lt;table class=&quot;file...&quot;</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=dTree/API&amp;diff=14858&amp;oldid=prev"/>
		<updated>2011-01-12T01:00:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Functions== ===add()=== Adds a node to the tree.&amp;lt;br /&amp;gt;Can only be called before the tree is drawn. 	&amp;lt;p&amp;gt;id, pid and name are required.&amp;lt;/p&amp;gt; ====Parameters==== 	&amp;lt;table class=&amp;quot;file...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Functions==&lt;br /&gt;
===add()===&lt;br /&gt;
Adds a node to the tree.&amp;lt;br /&amp;gt;Can only be called before the tree is drawn.&lt;br /&gt;
	&amp;lt;p&amp;gt;id, pid and name are required.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Parameters====&lt;br /&gt;
	&amp;lt;table class=&amp;quot;files&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;id&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Number&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Unique identity number.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;pid&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Number&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;Number refering to the parent node. The value for the root node has to be -1.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Text label for the node.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;url&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Url for the node.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;title&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Title for the node.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;target&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Target for the node.&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;icon&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Image file to use as the icon. Uses default if not specified.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;iconOpen&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Image file to use as the open icon. Uses default if not specified.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;open&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;Is the node open.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/table&amp;gt;&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;javascript&amp;gt;mytree.add(1, 0, &amp;#039;My node&amp;#039;, &amp;#039;node.html&amp;#039;, &amp;#039;node title&amp;#039;, &amp;#039;mainframe&amp;#039;, &amp;#039;img/musicfolder.gif&amp;#039;);&amp;lt;/javascript&amp;gt;&lt;br /&gt;
===openAll()===&lt;br /&gt;
&amp;lt;p&amp;gt;Opens all the nodes.&amp;lt;br /&amp;gt;Can be called before and after the tree is drawn.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;javascript&amp;gt;mytree.openAll();&amp;lt;/javascript&amp;gt;&lt;br /&gt;
===closeAll()===&lt;br /&gt;
&amp;lt;p&amp;gt;Closes all the nodes.&amp;lt;br /&amp;gt;Can be called before and after the tree is drawn.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;javascript&amp;gt;mytree.closeAll();&amp;lt;/javascript&amp;gt;&lt;br /&gt;
===openTo()===&lt;br /&gt;
&amp;lt;p&amp;gt;Opens the tree to a certain node and can also select the node.&amp;lt;br /&amp;gt;&lt;br /&gt;
Can only be called after the tree is drawn.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Parameters====&lt;br /&gt;
	&amp;lt;table class=&amp;quot;files&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;id&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Number&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Identity number for the node.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;select&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;Should the node be selected.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;javascript&amp;gt;mytree.openTo(4, true);&amp;lt;/javascript&amp;gt;&lt;br /&gt;
==Configuration==&lt;br /&gt;
	&amp;lt;table class=&amp;quot;files&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Variable&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Type&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;th&amp;gt;Default&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;target&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;String&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;true&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Target for all the nodes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;folderLinks&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;true&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Should folders be links.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;useSelection&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;true&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Nodes can be selected(highlighted).&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;useCookies&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;true&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;The tree uses cookies to rember it&amp;#039;s state.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;useLines&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;true&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Tree is drawn with lines.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;useIcons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;true&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Tree is drawn with icons.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;useStatusText&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;false&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;td&amp;gt;Displays node names in the statusbar instead of the url.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;closeSameLevel&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;false&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Only one node within a parent can be expanded at the same time.  openAll() and closeAll() functions do not work when this is enabled.&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;inOrder&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Boolean&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;false&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;If parent nodes are always added before children, setting this to true speeds up the tree.&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/table&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;javascript&amp;gt;mytree.config.target = &amp;quot;mytarget&amp;quot;;&amp;lt;/javascript&amp;gt;&lt;br /&gt;
==Copyright==&lt;br /&gt;
&amp;amp;copy;2002-2003 Geir Landr&amp;amp;ouml;&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>