I thought this was really weird, until I figured out that it was producing double-click events instead of left-down events.
Three questions, if you don't mind:
1. Are double-click events only produced if the mouse had not moved since last time?
2. Can the pressing down of the mouse ever produce both an event.LeftDown() and event.LeftDClick() immediately after each other? Or is it only one or the other?
3. Since just specifying if (event.LeftDown()) { } apparently isn't enough to capture every mouse click,
can it be assured that doing if (event.LeftDown() || event.LeftDClick()) { } will be? So far it seems to work.
i.e.
Code: Select all
void MyCanvas::OnMouse(wxMouseEvent& event)
{
if (event.LeftDown())
{
// would only happen every other click unless I was also moving
}
//
if (event.LeftDown() || event.LeftDClick())
{
//user definitely positively pressed the button mouse button down here?
}
}