summaryrefslogtreecommitdiff
path: root/prev/proposals/sidebar.md
blob: fa233924236651e4c8f749e82fe9675e5c82c744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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
????