diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-30 23:02:02 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-30 23:02:02 -0400 |
| commit | 77bf566ebbcb62acd4d08d905d9542d6ff9b6b80 (patch) | |
| tree | eeb8e72bc3bf57f5be7f0c0af4319189ac6de838 /redo/proposals | |
| parent | 155899c65ed32245e2ccad4197a10c77017d835b (diff) | |
...in with the new.
Diffstat (limited to 'redo/proposals')
| -rw-r--r-- | redo/proposals/sidebar.md | 32 | ||||
| -rw-r--r-- | redo/proposals/tree.md | 35 |
2 files changed, 0 insertions, 67 deletions
diff --git a/redo/proposals/sidebar.md b/redo/proposals/sidebar.md deleted file mode 100644 index fa23392..0000000 --- a/redo/proposals/sidebar.md +++ /dev/null @@ -1,32 +0,0 @@ -# Sidebar Control - -```go -type Sidebar interface { - Control - - AppendCategory(text string) - DeleteCategory(index int) - - AppendItem(category int, name string) - DeleteItem(category int, index int) - - Selection() (category int, index int) // or Selected()? - Select(category int, index int) - - OnSelected(func()) -} -``` - -Simple two-level sidebars. - -Could have images on each item in the future. - -## Mac OS X -Source List NSTableView (need to see how this will work) - -## GTK+ -GTK_STYLE_CLASS_SIDEBAR (available in 3.4); see how GtkPlacesSidebar implements this - - other programs that do: Rhythmbox - -## Windows -???? diff --git a/redo/proposals/tree.md b/redo/proposals/tree.md deleted file mode 100644 index a4752f6..0000000 --- a/redo/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 -``` |
