view doodle/tk/palette.d @ 61:08ffc44fc21a

More palette work.
author daveb
date Wed, 11 Aug 2010 15:07:58 +0930
parents b190a9d9352e
children
line wrap: on
line source

module doodle.tk.palette;

// XXX Not sure whether to use delegates or observer pattern...

interface IPalette(T) {
    struct Item {
        string iconPath;
        string labelText;
        string tooltipText;
        T t;
    };

    alias void delegate(T) Callback;

    void configure(Item[] items, Callback callback);
    void activate(T t);
}