Click

Result of onMouseClick.

Values

ValueMeaning
handled

Click was handled, consume the click event. No dragging was started. Widget gets keyboard focus (isFocused).

handledNoFocus

Click was handled, consume the click event. No dragging was started. Do NOT get keyboard focus. Useful to select another widget on click, or exit a widget.

startDrag

Click handled, consume the click event. Widget gets keyboard focus (isFocused).

A drag operation was started which means several things: - This widget keeps the keyboard and mouse focus as long as the drag operation is active. Even if the mouse is not inside the widget anymore. - The plugin window keeps the active focus as long as the drag operation is active. Mouse events keep being received even if mouse gets outside the plugin window. - onStartDrag and onStopDrag get called. - onMouseDrag is called instead of onMouseMove.

It is a good practice to NOT start another drag operation if one is already active (see Issue #822), typically it currently happens with another mouse button in the wild.

Note: there is no onMouseRelease in Dplug. The way to catch the releasesi to start a drag, then catch onStopDrag.

unhandled

Click was not handled, pass the event around.

Meta