Auto-installation/Partition |
include/tree.ycp |
helper functions for dealing with tree widget | |
|
|
This module has an unstable interface. |
Includes
Local Functions |
local
setTree (list<term> newTree)
->
void
Set tree widget to tree represented by newTree
- Parameters:
-
newTree tree to display.
local
currentTreeItem ()
->
string
Get the currently selected tree item id string.
- Return value:
-
Item id string that is currently selected.
local
isContainedInTree (symbol s, list<term> tree)
->
boolean
Forward declaration as termContains() uses isContainedInTree()
- Parameters:
-
s tree
local
termContains (term t, symbol s)
->
boolean
Searches through term t recursively looking for an arg of type string which is equal to s. This function is neccessary due to the nature trees are stored/represented in the tree widget.
- Parameters:
-
t The term to inspect. s The symbol to look for.
local
isContainedInTree (symbol s, list<term> tree)
->
boolean
Helper function to determin if item with id 's' exists in tree.
- Parameters:
-
s The id symbol to look for. tree The tree to search through.
- Return value:
-
true if tree contains symbol, false otherwise.
local
selectTreeItem (string newItem)
->
boolean
Select item 'newItem' in tree.
- Parameters:
-
newItem
- Return value:
-
true if item exists in tree (and was selected), false otherwise
local
createTreeNode (string reference, string name, list<term> children)
->
term
Wrapper function to create a new tree node
- Parameters:
-
reference Tree item id string (e.g. "part_2_0") name Tree node name, displayed in widget children list of child nodes