Event
class in package klyn.gui.windows.events

    public class Event:

Event

Multicast GUI event.

Handlers are regular Klyn callback objects or method references. The `+=` and `-=` operators subscribe and unsubscribe handlers without replacing the event itself.

@example ```klyn button = Button("Save") button.clicked += lambda(event: ActionEvent): print("clicked") button.clicked += controller::onSave

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | size `size as ULong:` | Number of registered handlers.

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | Event `Event():` | Creates an empty event dispatcher.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | connect `connect(handler as Object) as Event:` | Registers a handler.
public | disconnect `disconnect(handler as Object) as Event:` | Unregisters a handler.
public | emit `emit(event as GuiEvent) as Void:` | Emits the event to all registered handlers.