Poison-ui

A cross-platform desktop/mobile UI engine written in D using dsfml

View project on GitHub

Dub version

poison.core.eventobserver

Source

Module for event observation.

Authors:

  Jacob Jensen

License:

  https://github.com/PoisonEngine/poison-ui/blob/master/LICENSE

public:




public void subscribe(TEventArgs : EventArgs)(string eventName, EventHandler!TEventArgs handler);


Subscribes an event handler to an event.

Parameters:

eventNameThe event to subscribe to.
handlerThe event handler.

public void unsubscribe(string eventName);


Unsubscribes an event.

Parameters:

eventNameThe name of the event to unsubscribe.

public void fireEvent(TEventArgs : EventArgs)(string eventName, TEventArgs eventArgs);


Fires an event.

Parameters:

eventNameThe name of the event to fire.
eventArgsThe event args to pass.

public static void subscribeGlobal(TEventArgs : EventArgs)(string eventName, EventHandler!TEventArgs handler);


Subscribes a global event handler to an event.

Parameters:

eventNameThe event to subscribe to.
handlerThe event handler.

public static void unsubscribeGlobal(string eventName);


Unsubscribes a global event.

Parameters:

eventNameThe name of the event to unsubscribe.

public static void fireEventGlobal(TEventArgs : EventArgs)(string eventName, TEventArgs eventArgs);


Fires a global event.

Parameters:

eventNameThe name of the event to fire.
eventArgsThe event args to pass.

Generated by venom - Poison Engine's Documentation Generator