On Monday, 1 February 2016 at 21:40:45 UTC, Enjoys Math wrote:
module signals_and_slots;
How do you implement this template called like:
void onColorChange(in Color) {
   // do something with color
}
auto slots = Slots!(void delegate(in Color), Color);
slots.connect(&onColorChange);
auto color = Color(0.0, 1.0, 1.0, 1.0);
slots.call(color);

Signals in DlangUI:

https://github.com/buggins/dlangui/blob/master/src/dlangui/core/signals.d


Reply via email to