コード例 #1
0
void MouseEventController::_processEvents(){
    MouseEvent* curEvent;
    while( _eventQueue.size() > 0 ){
        curEvent = _eventQueue.front();
        _eventQueue.pop(); //seriously, you can't get the reference without handling it?        
        _handleEvent( curEvent );   
        
        delete curEvent;
    }
    if( !_mouseMovedThisFrame ){
        curEvent = new MouseEvent();
        curEvent->args = ofMouseEventArgs();
        curEvent->args.x = ofGetMouseX();
        curEvent->args.y = ofGetMouseY();
        curEvent->type = STILL;
        
        _handleEvent(curEvent);
        delete curEvent;
    }
    _mouseMovedThisFrame = false;
}
コード例 #2
0
ファイル: Controller.cpp プロジェクト: elliotwoods/ofxCvGui
	//----------
	Controller::Controller() {
		this->initialised = false;
		this->maximised = false;
		this->chromeVisible = true;
		this->mouseOwner = nullptr;
		this->lastClickOwner = nullptr;
		this->lastMouseClick = pair<long long, ofMouseEventArgs>(std::numeric_limits<long long>::min(), ofMouseEventArgs());
		this->cachedWidth = 0.0f;
		this->cachedHeight = 0.0f;
	}