// // MARK: - RootNode // void RootNode::connect( ci::app::WindowRef window ) { storeConnection( window->getSignalTouchesBegan().connect( [this]( app::TouchEvent &event ) { deepTouchesBegan( event ); } ) ); storeConnection( window->getSignalTouchesMoved().connect( [this]( app::TouchEvent &event ) { deepTouchesMoved( event ); } ) ); storeConnection( window->getSignalTouchesEnded().connect( [this]( app::TouchEvent &event ) { deepTouchesEnded( event ); } ) ); storeConnection( window->getSignalMouseDown().connect( [this]( app::MouseEvent &event ) { deepMouseDown( event ); } ) ); storeConnection( window->getSignalMouseDrag().connect( [this]( app::MouseEvent &event ) { deepMouseDrag( event ); } ) ); storeConnection( window->getSignalMouseUp().connect( [this]( app::MouseEvent &event ) { deepMouseUp( event ); } ) ); }
GestureManager::GestureManager( const ci::app::WindowRef &window ) : mIsPanning( false ) { App::get()->getSignalUpdate().connect( bind( &GestureManager::update, this ) ); window->getSignalTouchesBegan().connect( -5, bind( &GestureManager::touchesBegan, this, placeholders::_1 ) ); window->getSignalTouchesMoved().connect( -5, bind( &GestureManager::touchesMoved, this, placeholders::_1 ) ); window->getSignalTouchesEnded().connect( -5, bind( &GestureManager::touchesEnded, this, placeholders::_1 ) ); }