UIElement.onMouseClick

onMouseClick is called for every new click, whether or not you are in a dragging operation. This function is meant to be overriden.

class UIElement
nothrow @nogc
onMouseClick
(
int x
,
int y
,
int button
,,
MouseState mstate
)

Return Value

Type: Click

If you return Click.handled, the click is considered processed and will not pass to parent window.

If you return Click.startDrag, the click is considered processed. Any existing dragging is stopped with onStopDrag, and a new drag operation is started. onBeginDrag/onStopDrag are also called. (was formerly: returning true)

If you return Click.unhandled, the click is unprocessed. If may be passed down to the underlying parent window. (was formerly: returning false)

Warning: For this reason, check your widgets with several mouse buttons pressed at once.

Meta