summaryrefslogtreecommitdiff
path: root/prev/proposals/tree.md
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2016-05-30 00:14:46 -0400
committerPietro Gagliardi <[email protected]>2016-05-30 00:14:46 -0400
commit52f7d276a6bb04b8827ac019ad1e135b43819cea (patch)
tree5f0ebbfdf5885ef832e77e243b5916e59f46ba18 /prev/proposals/tree.md
parentc9b32c1333e4009b342eedc5f5b39127a724fb42 (diff)
Removed prev/.
Diffstat (limited to 'prev/proposals/tree.md')
-rw-r--r--prev/proposals/tree.md35
1 files changed, 0 insertions, 35 deletions
diff --git a/prev/proposals/tree.md b/prev/proposals/tree.md
deleted file mode 100644
index a4752f6..0000000
--- a/prev/proposals/tree.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Tree
-
-Unlike Table, Tree can only store a set of a single data type. (Blame Windows.)
-
-```go
-type TreeData struct {
- Checked bool
- Image ImageIndex
- Text string
- Children []TreeData // TODO does this need to be *[]TreeData?
-}
-```
-
-(the facilities for Images has yet to be designed)
-
-Tree itself will operate similarly to Table:
-
-```go
-type Tree struct {
- Control
- sync.Locker // with Unlock() refreshing the view
- Data() *[]TreeData
- SetHasCheckboxes(bool)
- SetHasImages(bool)
-}
-```
-
-By default, a Tree only shows the Text field.
-
-A Tree path is just an `[]int` with each element set to the consecutive index in Children. For example:
-
-```go
-i := []int{3, 4, 5}
-value := tree.Data()[i[0]].Children[i[1]].Children[i[2]].Text
-```