bool SelectRulerCtr::handleMousePress( MouseEvent& e ) { if( e.isLeft() && e.isShift() && !e.isAlt() && !e.isCtrl() ) { return installCommand( new _SelectRulerCmd( this, d_mdl ), &e ); }else return false; }
bool SelectZoomCtrl::handleMousePress( Viewport& v, const Allocation& a, const MouseEvent& e ) { if( e.isLeft() && e.isCtrl() && e.isShift() && !e.isAlt() ) { return installCommand( new _SelectZoomCmd( this, d_viewer->getViewArea(), d_do[ DimX ], d_do[ DimY ] ) ); }else return false; }
bool PeakSelectCtrl::handleMousePress( MouseEvent& e ) { if( d_eatDrag && e.isLeft() && e.isShift() && !e.isAlt() && !e.isCtrl() ) { return installCommand( new _SelectPeakCmd( this, d_view ), &e ); }else if( e.isLeft() && !e.isAlt() && !e.isCtrl() ) { assert( d_view->getBuf() ); ViewAreaMdl* mdl = d_view->getBuf()->getViewArea(); d_view->selectPeak( mdl->toPpm( e.getX(), mdl->getAllocation().getLeft(), DimX ), mdl->toPpm( e.getY(), mdl->getAllocation().getTop(), DimY ), !e.isShift() ); // Nicht immer true zurück, damit Cursor funktioniert. notifySelection( d_view ); return d_swallow; } // else return false; }
bool ScrollCtrl::handleMousePress(MouseEvent& e ) { if( e.isLeft() && e.isCtrl() && !e.isShift() && !e.isAlt() ) { getViewport()->grab( this ); d_lastX = e.getX(); d_lastY = e.getY(); Viewport::pushCursor( Viewport::CurHand ); return true; }else return false; }
bool PointSelectCtrl::handleMousePress( Viewport& v, const Allocation& a, const MouseEvent& e ) { if( e.isLeft() && e.isShift() && !e.isAlt() && !e.isCtrl() ) { return installCommand( new _SelectPointCmd( this, d_view ) ); // && d_swallow; }else if( e.isLeft() && e.isNoKey() ) { ViewAreaMdl* mdl = d_view->getViewArea(); d_view->selectPeak( mdl->toPpm( e.getX(), a.getLeft(), DimX ), mdl->toPpm( e.getY(), a.getTop(), DimY ) ); // Nicht immer true zurück, damit Cursor funktioniert. notifySelection( d_view, SpinPointView::PairIdLabelSysOrResi ); return d_swallow; } // else return false; }