ListenerServices
immutable
auto ListenerServices =
q{
/// Starts current containing events and @Signal events.
/// A @Signal event overrides a current containing event.
void startListening(T)(ref T element) {
import std.traits: hasUDA, getUDAs;
if (!element.canListen()) {
element.__canListen(true);
if (typeof(element).stringof == Button.stringof) {
mixin(ButtonListenerServices);
}
}
}
/// Clears all events. Restarts only @Signal events.
void restartListening(T)(ref T element) {
import std.traits: hasUDA, getUDAs;
element.stopListening();
element.__canListen(true);
if (typeof(element).stringof == Button.stringof) {
mixin(ButtonListenerServices);
}
}
};
liberty core scenegraph services
interfacesstructsvariables