This consists of 2 items, a TreeView and a TreeNode.
A tree node has a name, and an optional lv_obj_t * associated with it.
A tree node can also have protection set. When it is protected, it cant be moved, copied or deleted. I use this in my gui designer for the “Screen” object (The parent of all of the items you put on the screen)
A tree view can be drawn in a window (For standalone usage in the GUI, dragging, etc) or not.
In these examples it is NOT in a window, as it is part of the gui designer property window.
SO, here is the URL:
I need to finish move, copy and paste. That should be done today or tomorrow.
Here are some shots of it in action
TreeView as drawn at first, all top level nodes drawn and collapsed
The top level node expanded (I only have 2 nodes here, but you get the idea)
Here “Button” which has no children and is NOT protected is selected. As you can see all the buttons for modifying it show.
From left to right:
- Move the selected node up (This doesnt work yet, and in this example should not be shown, as there is no place for it to move up)
- Paste the node (Again, this shouldnt show as there hasnt been a copy)
- Copy the node
- Move down
- Delete the node
I still have some work to do to get it feature complete, and then I will likely refactor because it is a bit of spaghetti