diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-16 14:02:00 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-16 14:02:00 -0400 |
| commit | 8702763137970e14f0c7eeb8004cf639c4e0e263 (patch) | |
| tree | b4be74623642825390a55418e4f35f5b672df92e /redo/imagelist.go | |
| parent | 3ac3a724717dd31a053106cf13ad1265630f4124 (diff) | |
Added the beginning of ImageList, including the Windows implementation.
Diffstat (limited to 'redo/imagelist.go')
| -rw-r--r-- | redo/imagelist.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/redo/imagelist.go b/redo/imagelist.go new file mode 100644 index 0000000..6b34b28 --- /dev/null +++ b/redo/imagelist.go @@ -0,0 +1,29 @@ +// 16 august 2014 + +package ui + +import ( + "image" +) + +// ImageList is a list of images that can be used in the rows of a Table or Tree. +// ImageList maintains a copy of each image added. +// Images in an ImageList will be automatically scaled to the needed size. +type ImageList interface { + // Append inserts an image into the ImageList. + Append(i *image.RGBA) + + // Len returns the number of images in the ImageList. + Len() ImageIndex + + imageListApply +} + +// NewImageList creates a new ImageList. +// The ImageList is initially empty. +func NewImageList() ImageList { + return newImageList() +} + +// ImageIndex is a special type used to denote an entry in a Table or Tree's ImageList. +type ImageIndex int |
