Exemplo n.º 1
0
void GLWidget::mouseMoveEvent ( QMouseEvent * event ) {
  event->setAccepted ( false );
  pixelloc loc=zoom.invZoom ( event->pos().x(),event->pos().y(),true );
  if ( stack!=0 ) stack->mouseMoveEvent ( event,loc );
  if ( event->isAccepted() ==true ) return;
  mouseAction ( event,loc );
}
Exemplo n.º 2
0
		//---------
		SharedViewServer::SharedViewServer() {
			this->onUpdate += [this](ofxCvGui::UpdateArguments &) {
				auto newFocus = this->focusThisFrame.lock();
				if (newFocus) {
					this->focus = newFocus;
					newFocus->getHostedView()->setBounds(this->getLocalBounds());
					this->focusThisFrame.reset();
				}

				auto focus = this->focus.lock();
				if (focus) {
					auto view = focus->getHostedView();
					if (view) {
						view->update();
					}
				}
			};

			this->onDraw += [this](ofxCvGui::DrawArguments & args) {
				auto focus = this->focus.lock();
				if (focus) {
					auto view = focus->getHostedView();
					if (view) {
						view->draw(args);
					}
				}
			};

			this->onMouse += [this](ofxCvGui::MouseArguments & args) {
				auto focus = this->focus.lock();
				if (focus) {
					auto view = focus->getHostedView();
					if (view) {
						view->mouseAction(args);
					}
				}
			};

			this->onKeyboard += [this](ofxCvGui::KeyboardArguments & args) {
				auto focus = this->focus.lock();
				if (focus) {
					auto view = focus->getHostedView();
					if (view) {
						view->keyboardAction(args);
					}
				}
			};

			this->onBoundsChange += [this](ofxCvGui::BoundsChangeArguments & args) {
				auto focus = this->focus.lock();
				if (focus) {
					auto view = focus->getHostedView();
					if (view) {
						view->setBounds(this->getLocalBounds());
					}
				}
			};
		}
Exemplo n.º 3
0
	//----------
	void Controller::mouseAction(MouseArguments & action) {
		if (this->activeDialog) {
			this->activeDialog->mouseAction(action);
		}
		else {
			auto currentPanel = this->currentPanel.lock();
			if (this->maximised) {
				currentPanel->mouseAction(action);
			}
			else {
				rootGroup->mouseAction(action);
			}
		}
	}
Exemplo n.º 4
0
JNIEXPORT void JNICALL
Java_sun_awt_X11_XRobotPeer_mouseReleaseImpl (JNIEnv *env,
                             jclass cls,
                             jint buttonMask) {
    mouseAction(env, cls, buttonMask, False);
}
Exemplo n.º 5
0
JNIEXPORT void JNICALL
Java_sun_awt_X11_XRobotPeer_mousePressImpl (JNIEnv *env,
                           jclass cls,
                           jint buttonMask) {
    mouseAction(env, cls, buttonMask, True);
}
Exemplo n.º 6
0
 void MenuBarItem::mouseOver(Coordinate position) {
     mouseAction(position, false);
 }
Exemplo n.º 7
0
 bool MenuBarItem::click(Coordinate position) {
     return mouseAction(position, true);
 }
Exemplo n.º 8
0
void Animation::motionFunc(int x, int y) {
	mouseAction(x, y);
}