Dplug
Dplug copied to clipboard
Possibility for onMouseClick to consume the click event, but not initiate dragging.
For now:
- returning
false
fromonMouseClick
does not consume the event - returning
true
fromonMouseClick
always initiate dragging
Need a third way that says "consume the event, but do not initiate dragging. Dragging effect is:
- lock mouse to the window
- transform onMouseMove into onMouseDrag
- delay calling onMouseExit until dragging is terminated (mouse is released)
I have this in a prototype:
enum ClickOutcome
{
ignored, // Widget did not process the click
drag, // Widget processed the click and started dragging
consumed // Widget consumed the click.
}
but I think returning bool + a startDragging
call is a bit better?
Perhaps separate "initiate/abandon mouse dragging" from "respond on a click"
Done in v13