Mercurial > projects > doodle
comparison doodle/tk/palette.d @ 61:08ffc44fc21a
More palette work.
author | daveb |
---|---|
date | Wed, 11 Aug 2010 15:07:58 +0930 |
parents | b190a9d9352e |
children |
comparison
equal
deleted
inserted
replaced
60:e64baac3efb2 | 61:08ffc44fc21a |
---|---|
1 module doodle.tk.palette; | 1 module doodle.tk.palette; |
2 | 2 |
3 // XXX Not sure whether to use delegates or observer pattern... | 3 // XXX Not sure whether to use delegates or observer pattern... |
4 | 4 |
5 interface IPalette { | 5 interface IPalette(T) { |
6 struct Item { | 6 struct Item { |
7 string iconPath; | 7 string iconPath; |
8 string labelText; | 8 string labelText; |
9 string tooltipText; | 9 string tooltipText; |
10 void delegate(int) callback; | 10 T t; |
11 } | 11 }; |
12 | 12 |
13 void configure(in Item[] items); | 13 alias void delegate(T) Callback; |
14 void activate(in int index); | 14 |
15 void configure(Item[] items, Callback callback); | |
16 void activate(T t); | |
15 } | 17 } |