Exemple #1
0
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;
}
Exemple #2
0
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;
}
Exemple #3
0
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;
}
Exemple #4
0
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;
}