view doodle/tk/palette.d @ 105:7abaf5c3959f

Merge
author David Bryant <bagnose@gmail.com>
date Sun, 20 Feb 2011 22:27:06 +1030
parents 08ffc44fc21a
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);
}