DTree_Node
Description
This is used internally - although you're able to use it you probably shouldn't.
This panel is created whenever you add a node to a DTree. The root node of a DTree is also a DTree_Node and controls much of its action. it can be accessed with DTree:Root.
Parent
Derives methods, etc not listed on this page from DPanel.
Events
DTree_Node:DoChildrenOrder()
This is used internally - although you're able to use it you probably shouldn't.
Called automatically to update the status of DTree_Node:GetLastChild on children of this node.
boolean DTree_Node:DoRightClick()
Called when the node is right clicked.
See also DTree_Node:DoClick.
DTree_Node:OnModified()
Called when sub-nodes of this DTree_Node were changed, such as being rearranged if that functionality is enabled.
DTree_Node:OnNodeAdded( DTree_Node newNode )
Called when a new sub-node is added this node.
DTree_Node:OnNodeSelected( Panel node )
This is used internally - although you're able to use it you probably shouldn't.
Called when this or a sub node is selected. Do not use this, it is not for override.
Use DTree:OnNodeSelected or DTree_Node:DoClick instead.
Methods
Panel DTree_Node:AddFolder( string name, string folder, string path, boolean showFiles = false, string wildcard = "*", boolean bDontForceExpandable = false )
A helper function that adds a new node and calls to DTree_Node:MakeFolder on it.
Add a child node to the DTree_Node
This is used internally - although you're able to use it you probably shouldn't.
Adds the given panel to the child nodes list, a DListLayout.
This is used internally - although you're able to use it you probably shouldn't.
Internal function that handles the expand/collapse animations.
DTree_Node:ChildExpanded( boolean expanded )
This is used internally - although you're able to use it you probably shouldn't.
Called when a child node is expanded or collapsed to propagate this event to parent nodes to update layout.
DTree_Node:CleanList()
Cleans up the internal table of items (sub-nodes) of this node from invalid panels or sub-nodes that were moved from this node to another.
Appears the be completely unused by the game on its own.
DTree_Node:CreateChildNodes()
This is used internally - although you're able to use it you probably shouldn't.
Creates the container DListLayout for the DTree_Nodes.
This is called automatically so you don't have to.
DTree_Node:ExpandRecurse( boolean expand )
Expands or collapses this node, as well as ALL child nodes of this node.
Works opposite of DTree_Node:ExpandTo.
Collapses or expands all nodes from the topmost-level node to this one.
Works opposite of DTree_Node:ExpandRecurse.
This is used internally - although you're able to use it you probably shouldn't.
Called automatically from DTree_Node:PopulateChildrenAndSelf and DTree_Node:PopulateChildren to populate this node with child nodes of files and folders.
DTree_Node:FilePopulateCallback( table files, table folders, string foldername, string path, boolean bAndChildren, string wildcard )
This is used internally - although you're able to use it you probably shouldn't.
Called automatically from DTree_Node:FilePopulate to actually fill the node with sub-nodes based on set preferences like should files be added, etc.
Returns n-th child node.
Basically an alias of Panel:GetChild.
number DTree_Node:GetChildNodeCount()
Returns the number of child nodes this node has. For use with DTree_Node:GetChildNode
table DTree_Node:GetChildNodes()
Returns a table containing all child nodes of this node.
We advise against using this. It may be changed or removed in a future update.
Returns value set by DTree_Node:SetDirty.
boolean DTree_Node:GetDoubleClickToOpen()
Returns whether the double clock to collapse/expand functionality is enabled on this node.
string DTree_Node:GetDraggableName()
This is used internally - although you're able to use it you probably shouldn't.
Returns what is set by DTree_Node:SetDraggableName.
boolean DTree_Node:GetDrawLines()
This is used internally - although you're able to use it you probably shouldn't.
Returns whether or not this node is drawing lines
boolean DTree_Node:GetExpanded()
Returns whether the node is expanded or not.
string DTree_Node:GetFileName()
Returns the filepath of the file attached to this node.
boolean DTree_Node:GetForceShowExpander()
Returns whether the expand/collapse button is shown on this node regardless of whether or not it has sub-nodes.
See also DTree_Node:SetForceShowExpander.
boolean DTree_Node:GetHideExpander()
Returns whether the expand button (little + button) should be shown or hidden.
number DTree_Node:GetIndentSize()
Returns the indentation level of the DTree this node belongs to.
Alias of DTree:GetIndentSize, see it for more info.
boolean DTree_Node:GetLastChild()
Returns whether this node is the last child on this level or not.
number DTree_Node:GetLineHeight()
The height of a single DTree_Node of the DTree this node belongs to.
Alias of DTree:GetLineHeight.
boolean DTree_Node:GetNeedsChildSearch()
This is used internally - although you're able to use it you probably shouldn't. We advise against using this. It may be changed or removed in a future update.
Seems to be unused entirely.
Returns whether the node still needs a filesystem search for sub-nodes.
boolean DTree_Node:GetNeedsPopulating()
This is used internally - although you're able to use it you probably shouldn't.
Returns whether or not the node is set to be populated from the filesystem.
Panel DTree_Node:GetParentNode()
Returns the parent DTree_Node. Note that Panel:GetParent will not be the same!
Returns the path ID (File Search Paths) used in populating the DTree from the filesystem.
See DTree_Node:SetPathID and DTree_Node:MakeFolder.
Returns the root node, the DTree this node is under.
See also DTree_Node:GetParentNode.
boolean DTree_Node:GetShowFiles()
Returns whether or not nodes for files should/will be added when populating the node from filesystem.
string DTree_Node:GetWildCard()
Returns the wildcard set by DTree_Node:MakeFolder.
Inserts a sub-node into this node before or after the given node.
DTree_Node:InsertNode( Panel node )
This is used internally - although you're able to use it you probably shouldn't.
Inserts an existing node as a "child" or a sub-node of this node.
Used internally by the drag'n'drop functionality.
DTree_Node:InstallDraggable( Panel node )
This is used internally - although you're able to use it you probably shouldn't.
Called automatically internally.
Makes the target node compatible with this node's drag'n'drop.
DTree_Node:InternalDoClick()
This is used internally - although you're able to use it you probably shouldn't.
See DTree_Node:DoClick
DTree_Node:InternalDoRightClick()
This is used internally - although you're able to use it you probably shouldn't.
See DTree_Node:DoRightClick.
boolean DTree_Node:IsRootNode()
Returns true if DTree_Node:GetRoot is the same as DTree_Node:GetParentNode of this node.
Removes given node as a sub-node of this node.
It doesn't actually remove or unparent the panel, just removes it from the internal DListView.
DTree_Node:MakeFolder( string folder, string path, boolean showFiles = false, string wildcard = "*", boolean dontForceExpandable = false )
Makes this node a folder in the filesystem. This will make it automatically populated.
See also DTree_Node:AddFolder.
DTree_Node:MoveChildTo( Panel node )
Moves given panel to the top of the children of this node.
Despite name of this function, it cannot move the children to any position but the topmost.
DTree_Node:MoveToTop()
Moves this node to the top of the level.
DTree_Node:PerformRootNodeLayout()
This is used internally - although you're able to use it you probably shouldn't.
Called automatically to perform layout on this node if this node DTree_Node:IsRootNode.
DTree_Node:PopulateChildren()
This is used internally - although you're able to use it you probably shouldn't.
Called automatically from DTree_Node:PopulateChildrenAndSelf.
DTree_Node:PopulateChildrenAndSelf( boolean expand )
This is used internally - although you're able to use it you probably shouldn't.
Called automatically from DTree_Node:SetExpanded (or when user manually expands the node) to populate the node with sub-nodes from the filesystem if this was enabled via DTree_Node:MakeFolder.
We advise against using this. It may be changed or removed in a future update.
Appears to have no effect on the DTree_Node.
DTree_Node:SetDoubleClickToOpen( boolean enable )
Sets whether double clicking the node should expand/collapse it or not.
DTree_Node:SetDraggableName( string name )
This is used internally - although you're able to use it you probably shouldn't.
Used to store name for sub elements for a Panel:Droppable call.
DTree_Node:SetDrawLines( boolean draw )
This is used internally - although you're able to use it you probably shouldn't.
Sets whether or not this node should draw visual lines.
Expands or collapses this node.
DTree_Node:SetFileName( string filename )
This is used internally - although you're able to use it you probably shouldn't.
Sets the file full filepath to the file attached to this node
This is used internally - although you're able to use it you probably shouldn't.
Sets the folder to search files and folders in.
Use DTree_Node:MakeFolder instead.
DTree_Node:SetForceShowExpander( boolean forceShow )
Sets whether or not the expand/collapse button (+/- button) should be shown on this node regardless of whether it has sub-elements or not.
DTree_Node:SetHideExpander( boolean hide )
This is used internally - although you're able to use it you probably shouldn't.
Sets whether the expand button (little + button) should be shown or hidden.
DTree_Node:SetLastChild( boolean last )
This is used internally - although you're able to use it you probably shouldn't.
Called automatically to set whether this node is the last child on this level or not.
DTree_Node:SetNeedsChildSearch( boolean newState )
This is used internally - although you're able to use it you probably shouldn't. We advise against using this. It may be changed or removed in a future update.
Seems to be unused entirely.
Sets whether the node still needs a filesystem search for sub-nodes.
DTree_Node:SetNeedsPopulating( boolean needs )
This is used internally - although you're able to use it you probably shouldn't.
Sets whether or not the node needs populating from the filesystem.
DTree_Node:SetParentNode( Panel parent )
This is used internally - although you're able to use it you probably shouldn't.
Sets the parent node of this node. Not the same as Panel:SetParent.
This is set automatically, you shouldn't use this.
This is used internally - although you're able to use it you probably shouldn't.
Sets the path ID (File Search Paths) for populating the tree from the filesystem.
Use DTree_Node:MakeFolder instead.
This is used internally - although you're able to use it you probably shouldn't.
Sets the root node (the DTree) of this node.
This is set automatically, you shouldn't use this.
DTree_Node:SetSelected( boolean selected )
This is used internally - although you're able to use it you probably shouldn't.
Called automatically to update the "selected" status of this node.
DTree_Node:SetShowFiles( boolean showFiles )
This is used internally - although you're able to use it you probably shouldn't.
Sets whether or not nodes for files should be added when populating the node from filesystem.
DTree_Node:SetupCopy()
We advise against using this. It may be changed or removed in a future update.
Currently does nothing, not implemented.
DTree_Node:SetWildCard( string wildcard )
This is used internally - although you're able to use it you probably shouldn't.
Sets the search wildcard.
Use DTree_Node:MakeFolder instead