deft.events

Delegate-based event system.

Event!(T...) is a lightweight multicast delegate: handlers are added with event ~= &handler and invoked together with event.fire(args). This is the spine of Deft's UI notifications — buttons, windows, list selections and so on expose Event!(...) fields that user code subscribes to.

Members

Aliases

Action
alias Action = void delegate()

A handler taking no arguments — e.g. a button click.

KeyEvent
alias KeyEvent = void delegate(KeyEventArgs args)

A handler receiving keyboard event details.

MouseEvent
alias MouseEvent = void delegate(MouseEventArgs args)

A handler receiving mouse event details.

SelectionEvent
alias SelectionEvent = void delegate(int index)

A handler receiving a selected item index.

TextEvent
alias TextEvent = void delegate(string text)

A handler receiving a text payload.

Enums

MouseButton
enum MouseButton

Mouse buttons reported by MouseEventArgs.

Structs

Event
struct Event(T...)

A multicast list of void delegate(T...) handlers.

KeyEventArgs
struct KeyEventArgs

Details of a keyboard event.

MouseEventArgs
struct MouseEventArgs

Details of a mouse event, in client coordinates.

Meta