Module classes.vTree
Tree view, used for displaying hierarchical data
update () |
update table using current settings (rebuild if needed) |
update_tree (t, depth) |
recursive method, will iterate through table and update each row |
get_visible_row_count (t) |
get the number of rows in the data which can be shown
(used for determining range of the scrollbar) |
parse_data (t) |
+ add a unique id to all nodes, and cache this (.map)
+ initialize the "expanded" attribute |
autosize_to_contents () |
call this the computed height of the table has changed -
if resized, the external resize handler is invoked |
load_file (file_path) |
load data from an external source
note: each file format needs to implement the load_and_parse() method |
Functions
-
update ()
-
update table using current settings (rebuild if needed)
-
update_tree (t, depth)
-
recursive method, will iterate through table and update each row
Parameters:
-
get_visible_row_count (t)
-
get the number of rows in the data which can be shown
(used for determining range of the scrollbar)
Parameters:
-
parse_data (t)
-
+ add a unique id to all nodes, and cache this (.map)
+ initialize the "expanded" attribute
Parameters:
-
autosize_to_contents ()
-
call this the computed height of the table has changed -
if resized, the external resize handler is invoked
-
load_file (file_path)
-
load data from an external source
note: each file format needs to implement the load_and_parse() method
Parameters:
- file_path
(string) source file - if undefined, file browser is shown
Fields
-
self.data
-
(table>row>col:variant) the data
an extra property, item_id, is added runtime
-
self.autosize
-
(bool) automatically resize to fit number of rows
-
self.num_rows
-
(int) number of visible rows
-
self.row_height
-
(int) row height
-
self.row_offset
-
(int) offset, vertical "scroll" position
-
self.indent
-
(int) amount of identation in pixels
-
self.icon_width
-
(int) the horizontal size of node-icons