Widget.onClick

void onClick(Callback callback)

Sets the widget's callback delegate.

The callback is invoked when the widget is activated (e.g., button click). The callback is registered with FLTK via a trampoline function that bridges C callbacks to D delegates.

Parameters

callbackDelegate to call on activation
Callback onClick()

Gets the widget's callback delegate.

Returns

The currently set callback, or null if none