summaryrefslogtreecommitdiff
path: root/redo
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-16 09:37:50 -0400
committerPietro Gagliardi <[email protected]>2014-08-16 09:37:50 -0400
commitdc281043e36d45fc874892340a470ad315b478c3 (patch)
tree6bd932a1f70cb432b88c93acb34f35befafdef88 /redo
parent444f14065724b07666e92ff83ce417b5aef75e02 (diff)
Added a proposal for image lists.
Diffstat (limited to 'redo')
-rw-r--r--redo/proposals/imagelist.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/redo/proposals/imagelist.md b/redo/proposals/imagelist.md
new file mode 100644
index 0000000..612c45b
--- /dev/null
+++ b/redo/proposals/imagelist.md
@@ -0,0 +1,27 @@
+# Images in Tables and Trees
+
+In yet another "blame Windows" moment:
+
+```go
+type ImageList interface {
+ Add(image *image.Image)
+ Remove(index int)
+ Len() int
+}
+func NewImageList() ImageList
+
+type Table/Tree interface {
+ // ...
+ LoadImageList(ImageList)
+}
+
+type ImageIndex int
+```
+
+For Table, a field of type ImageIndex represents an index into the ImageList.
+
+For Tree, there is a field ImageIndex which contains the index of the entry.
+
+Note the name of the methods on both being LoadImageList(): the image list is copied, and any future changes will **not** be reflected. (This is to accomodate check boxes in Table, which must be done manually.)
+
+TODO appropriate size of images in an ImageList