boolean JDialog::mouseExit(JEvent& e, int _x, int _y) { if (theMainWindow) { e.arg = this; e.translate(x-theMainWindow->x, y-theMainWindow->y); theMainWindow->postJEvent(e); } return true; }
boolean JDialog::mouseDrag(JEvent& e, int _x, int _y) { if (mousePressed && theMainWindow) { JRect rect(0, 0, width, height); e.arg = rect.inside(_x, _y) ? this : null; e.translate(x-theMainWindow->x, y-theMainWindow->y); theMainWindow->postJEvent(e); } return true; }
boolean JDialog::mouseUp(JEvent& e, int _x, int _y) { if ((e.modifiers & JEvent::LBUTTON) && mousePressed && theMainWindow) { JRect rect(0, 0, width, height); e.arg = rect.inside(_x, _y) ? this : null; e.translate(x-theMainWindow->x, y-theMainWindow->y); theMainWindow->postJEvent(e); mousePressed = false; } return true; }
boolean JDialog::mouseDown(JEvent& e, int _x, int _y) { if ((e.id == JEvent::MOUSE_DOWN) && (e.modifiers & JEvent::LBUTTON) && theMainWindow) { mousePressed = true; e.arg = this; e.translate(x-theMainWindow->x, y-theMainWindow->y); theMainWindow->postJEvent(e); } return true; }