void COrbitController::MyMouseMove(int dx, int dy, int rdx, int rdy, int button) { switch (button) { case SDL_BUTTON_LEFT: { rotation = cRotation - (dx * orbitSpeedFact); elevation = cElevation - (dy * orbitSpeedFact); } break; case SDL_BUTTON_RIGHT: { distance = cDistance - (dy * zoomSpeedFact); } break; } if (elevation > 89.0f) elevation = 89.0f; if (elevation < -89.0f) elevation = -89.0f; if (distance < 1.0f) distance = 1.0f; switch (button) { case SDL_BUTTON_LEFT: { Orbit(); } break; case SDL_BUTTON_MIDDLE: { Pan(rdx, rdy); } break; case SDL_BUTTON_RIGHT: { Zoom(); } break; } }
void Domain_new::MouseMove(QMouseEvent *event) { mouseMoved = true; newx = event->x(); newy = event->y(); dx = newx-oldx; dy = newy-oldy; CalculateMouseCoordinates(); if (currentMode == DisplayAction) { if (clicking) { Pan(dx, dy); emit updateGL(); } } else if (currentMode == SelectionAction && selectionLayer) { selectionLayer->MouseMove(event); emit updateGL(); } oldx = newx; oldy = newy; }
TEST_F(APZCBasicTester, FlingIntoOverscroll) { // Enable overscrolling. SCOPED_GFX_PREF(APZOverscrollEnabled, bool, true); SCOPED_GFX_PREF(APZFlingMinVelocityThreshold, float, 0.0f); // Scroll down by 25 px. Don't fling for simplicity. ApzcPanNoFling(apzc, 50, 25); // Now scroll back up by 20px, this time flinging after. // The fling should cover the remaining 5 px of room to scroll, then // go into overscroll, and finally snap-back to recover from overscroll. Pan(apzc, 25, 45); const TimeDuration increment = TimeDuration::FromMilliseconds(1); bool reachedOverscroll = false; bool recoveredFromOverscroll = false; while (apzc->AdvanceAnimations(mcc->Time())) { if (!reachedOverscroll && apzc->IsOverscrolled()) { reachedOverscroll = true; } if (reachedOverscroll && !apzc->IsOverscrolled()) { recoveredFromOverscroll = true; } mcc->AdvanceBy(increment); } EXPECT_TRUE(reachedOverscroll); EXPECT_TRUE(recoveredFromOverscroll); }
void APZCBasicTester::PanIntoOverscroll() { int touchStart = 500; int touchEnd = 10; Pan(apzc, touchStart, touchEnd); EXPECT_TRUE(apzc->IsOverscrolled()); }
void solve() { MOUSEMSG m; long i,j,k,r,w,x,y; long nowx=-1,nowy=-1; while(1) { m = GetMouseMsg(); x = ( m.x - (BL-SIDE/2) ) / SIDE; y = ( m.y - (BH-SIDE/2) ) / SIDE; if( ok(x,y) ) { switch(m.uMsg) { case WM_MOUSEMOVE: //移动 if( nowx != x || nowy != y ) MoveMouse(x,y); break; case WM_LBUTTONDOWN: //按下 PressMouse(x,y); Computer(); break; } nowx = x; nowy = y; if( Pan() ) break; } } End(); }
void CineCameraClass::CameraAim(int& dx, int& dy) { XMFLOAT2 d; d.x = (float)dx; d.y = (float)dy; Pan(d.x / 8.0f); Tilt(d.y / 8.0f); }
void Camera::PanOrRotate(float x, float y, float dx, float dy) { if(mPanCamera) { Pan(x, y, dx, dy); } else { RotateAxis(dx, dy); } }
Camera::Camera(int pinServoPan, int pinServoTilt,int camID) { Camera::numCam++; cameraID = camID; _pinServoPan = pinServoPan; _pinServoTilt = pinServoTilt; _servoPan.attach(_pinServoPan); _servoTilt.attach(_pinServoTilt); Pan(100); // Stopping Pan Tilt(45); // Centering Tilt }
// make x,y appear in the center of the screen; scaling unchanged virtual void Center(int x, int y) { if (dc) { wxAffineMatrix2D m = dc->GetTransformMatrix(); wxPoint2DDouble src(x, y); src = m.TransformPoint(src); wxSize sz = dc->GetSize(); wxPoint2DDouble dest(sz.GetWidth() / 2, sz.GetHeight() / 2); Pan((int)(dest.m_x - src.m_x), (int)(dest.m_y - src.m_y)); } }
void solve() { MOUSEMSG m; long i,j,k,r,w,x,y,ox=-1,oy=-1; long nowx=-1,nowy=-1; while(1) { m = GetMouseMsg(); x = ( m.x - (BL-SIDE/2) ) / SIDE; y = ( m.y - (BH-SIDE/2) ) / SIDE; if( ok(x,y) ) { switch(m.uMsg) { case WM_MOUSEMOVE: //移动 if( nowx != x || nowy != y ) MoveMouse(x,y,nowx,nowy); break; case WM_LBUTTONDOWN: //按下 if(map[y][x] != 0) break; PressMouse(x,y); over = 0; if(Pan())break; k = Max(1,-MAXN-3,MAXN+3); if(k >= MAXN ) over =2; if(k <= -MAXN ) { /*over =1; */ Xia(); } ComXia(xx,yy); break; } nowx = x; nowy = y; if( Pan() ) break; } } End(); }
// Tests that the page doesn't get stuck in an // overscroll animation after a low-velocity pan. TEST_F(APZCBasicTester, OverScrollAfterLowVelocityPan_Bug1343775) { SCOPED_GFX_PREF(APZOverscrollEnabled, bool, true); // Pan into overscroll with a velocity less than the // apz.fling_min_velocity_threshold preference. Pan(apzc, 10, 30); EXPECT_TRUE(apzc->IsOverscrolled()); apzc->AdvanceAnimationsUntilEnd(); // Check that we recovered from overscroll. EXPECT_FALSE(apzc->IsOverscrolled()); }
TEST_F(APZCBasicTester, Fling) { SCOPED_GFX_PREF(APZFlingMinVelocityThreshold, float, 0.0f); int touchStart = 50; int touchEnd = 10; ParentLayerPoint pointOut; AsyncTransform viewTransformOut; // Fling down. Each step scroll further down Pan(apzc, touchStart, touchEnd); ParentLayerPoint lastPoint; for (int i = 1; i < 50; i+=1) { apzc->SampleContentTransformForFrame(&viewTransformOut, pointOut, TimeDuration::FromMilliseconds(1)); EXPECT_GT(pointOut.y, lastPoint.y); lastPoint = pointOut; } }
TEST_F(APZCBasicTester, OverScrollPanningAbort) { SCOPED_GFX_PREF(APZOverscrollEnabled, bool, true); // Pan sufficiently to hit overscroll behaviour. Keep the finger down so // the pan does not end. int touchStart = 500; int touchEnd = 10; Pan(apzc, touchStart, touchEnd, PanOptions::KeepFingerDown); EXPECT_TRUE(apzc->IsOverscrolled()); // Check that calling CancelAnimation() while the user is still panning // (and thus no fling or snap-back animation has had a chance to start) // clears the overscroll. apzc->CancelAnimation(); EXPECT_FALSE(apzc->IsOverscrolled()); apzc->AssertStateIsReset(); }
TEST_F(APZEventRegionsTester, Obscuration) { SCOPED_GFX_VAR(UseWebRender, bool, false); CreateObscuringLayerTree(); ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc); manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0); RefPtr<TestAsyncPanZoomController> parent = ApzcOf(layers[1]); TestAsyncPanZoomController* child = ApzcOf(layers[2]); Pan(parent, 75, 25, PanOptions::NoFling); gfx::CompositorHitTestInfo result; RefPtr<AsyncPanZoomController> hit = manager->GetTargetAPZC(ScreenPoint(50, 75), &result, nullptr); EXPECT_EQ(child, hit.get()); EXPECT_EQ(result, CompositorHitTestFlags::eVisibleToHitTest); }
void DoFlingStopWithSlowListener(bool aPreventDefault) { MakeApzcWaitForMainThread(); int touchStart = 50; int touchEnd = 10; uint64_t blockId = 0; // Start the fling down. Pan(apzc, touchStart, touchEnd, false, nullptr, nullptr, &blockId); apzc->ConfirmTarget(blockId); apzc->ContentReceivedInputBlock(blockId, false); // Sample the fling a couple of times to ensure it's going. ParentLayerPoint point, finalPoint; AsyncTransform viewTransform; apzc->SampleContentTransformForFrame(&viewTransform, point, TimeDuration::FromMilliseconds(10)); apzc->SampleContentTransformForFrame(&viewTransform, finalPoint, TimeDuration::FromMilliseconds(10)); EXPECT_GT(finalPoint.y, point.y); // Now we put our finger down to stop the fling TouchDown(apzc, ScreenIntPoint(10, 10), mcc->Time(), &blockId); // Re-sample to make sure it hasn't moved apzc->SampleContentTransformForFrame(&viewTransform, point, TimeDuration::FromMilliseconds(10)); EXPECT_EQ(finalPoint.x, point.x); EXPECT_EQ(finalPoint.y, point.y); // respond to the touchdown that stopped the fling. // even if we do a prevent-default on it, the animation should remain stopped. apzc->ContentReceivedInputBlock(blockId, aPreventDefault); // Verify the page hasn't moved apzc->SampleContentTransformForFrame(&viewTransform, point, TimeDuration::FromMilliseconds(70)); EXPECT_EQ(finalPoint.x, point.x); EXPECT_EQ(finalPoint.y, point.y); // clean up TouchUp(apzc, ScreenIntPoint(10, 10), mcc->Time()); apzc->AssertStateIsReset(); }
TEST_F(APZHitTestingTester, HitTestingRespectsScrollClip_Bug1257288) { // Create the layer tree. const char* layerTreeSyntax = "c(tt)"; // LayerID 0 12 nsIntRegion layerVisibleRegion[] = { nsIntRegion(IntRect(0,0,200,200)), nsIntRegion(IntRect(0,0,200,200)), nsIntRegion(IntRect(0,0,200,100)) }; root = CreateLayerTree(layerTreeSyntax, layerVisibleRegion, nullptr, lm, layers); // Add root scroll metadata to the first painted layer. SetScrollableFrameMetrics(layers[1], FrameMetrics::START_SCROLL_ID, CSSRect(0,0,200,200)); // Add root and subframe scroll metadata to the second painted layer. // Give the subframe metadata a scroll clip corresponding to the subframe's // composition bounds. // Importantly, give the layer a layer clip which leaks outside of the // subframe's composition bounds. ScrollMetadata rootMetadata = BuildScrollMetadata( FrameMetrics::START_SCROLL_ID, CSSRect(0,0,200,200), ParentLayerRect(0,0,200,200)); ScrollMetadata subframeMetadata = BuildScrollMetadata( FrameMetrics::START_SCROLL_ID + 1, CSSRect(0,0,200,200), ParentLayerRect(0,0,200,100)); subframeMetadata.SetScrollClip(Some(LayerClip(ParentLayerIntRect(0,0,200,100)))); layers[2]->SetScrollMetadata({subframeMetadata, rootMetadata}); layers[2]->SetClipRect(Some(ParentLayerIntRect(0,0,200,200))); SetEventRegionsBasedOnBottommostMetrics(layers[2]); // Build the hit testing tree. ScopedLayerTreeRegistration registration(manager, 0, root, mcc); manager->UpdateHitTestingTree(nullptr, root, false, 0, 0); // Pan on a region that's inside layers[2]'s layer clip, but outside // its subframe metadata's scroll clip. Pan(manager, 120, 110); // Test that the subframe hasn't scrolled. EXPECT_EQ(CSSPoint(0,0), ApzcOf(layers[2], 0)->GetFrameMetrics().GetScrollOffset()); }
// Start a fling, and then tap while the fling is ongoing. When // aSlow is false, the tap will happen while the fling is at a // high velocity, and we check that the tap doesn't trigger sending a tap // to content. If aSlow is true, the tap will happen while the fling // is at a slow velocity, and we check that the tap does trigger sending // a tap to content. See bug 1022956. void DoFlingStopTest(bool aSlow) { int touchStart = 50; int touchEnd = 10; // Start the fling down. Pan(apzc, touchStart, touchEnd); // The touchstart from the pan will leave some cancelled tasks in the queue, clear them out // If we want to tap while the fling is fast, let the fling advance for 10ms only. If we want // the fling to slow down more, advance to 2000ms. These numbers may need adjusting if our // friction and threshold values change, but they should be deterministic at least. int timeDelta = aSlow ? 2000 : 10; int tapCallsExpected = aSlow ? 2 : 1; // Advance the fling animation by timeDelta milliseconds. ParentLayerPoint pointOut; AsyncTransform viewTransformOut; apzc->SampleContentTransformForFrame(&viewTransformOut, pointOut, TimeDuration::FromMilliseconds(timeDelta)); // Deliver a tap to abort the fling. Ensure that we get a HandleSingleTap // call out of it if and only if the fling is slow. EXPECT_CALL(*mcc, HandleSingleTap(_, 0, apzc->GetGuid())).Times(tapCallsExpected); Tap(apzc, ScreenIntPoint(10, 10), 0); while (mcc->RunThroughDelayedTasks()); // Deliver another tap, to make sure that taps are flowing properly once // the fling is aborted. Tap(apzc, ScreenIntPoint(100, 100), 0); while (mcc->RunThroughDelayedTasks()); // Verify that we didn't advance any further after the fling was aborted, in either case. ParentLayerPoint finalPointOut; apzc->SampleContentTransformForFrame(&viewTransformOut, finalPointOut); EXPECT_EQ(pointOut.x, finalPointOut.x); EXPECT_EQ(pointOut.y, finalPointOut.y); apzc->AssertStateIsReset(); }
TEST_F(APZCBasicTester, OverScrollAbort) { SCOPED_GFX_PREF(APZOverscrollEnabled, bool, true); // Pan sufficiently to hit overscroll behavior int touchStart = 500; int touchEnd = 10; Pan(apzc, touchStart, touchEnd); EXPECT_TRUE(apzc->IsOverscrolled()); ParentLayerPoint pointOut; AsyncTransform viewTransformOut; // This sample call will run to the end of the fling animation // and will schedule the overscroll animation. apzc->SampleContentTransformForFrame(&viewTransformOut, pointOut, TimeDuration::FromMilliseconds(10000)); EXPECT_TRUE(apzc->IsOverscrolled()); // At this point, we have an active overscroll animation. // Check that cancelling the animation clears the overscroll. apzc->CancelAnimation(); EXPECT_FALSE(apzc->IsOverscrolled()); apzc->AssertStateIsReset(); }
TEST_F(APZCBasicTester, PanningTransformNotifications) { SCOPED_GFX_PREF(APZOverscrollEnabled, bool, true); // Scroll down by 25 px. Ensure we only get one set of // state change notifications. // // Then, scroll back up by 20px, this time flinging after. // The fling should cover the remaining 5 px of room to scroll, then // go into overscroll, and finally snap-back to recover from overscroll. // Again, ensure we only get one set of state change notifications for // this entire procedure. MockFunction<void(std::string checkPointName)> check; { InSequence s; EXPECT_CALL(check, Call("Simple pan")); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eStartTouch,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eTransformBegin,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eStartPanning,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eEndTouch,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eTransformEnd,_)).Times(1); EXPECT_CALL(check, Call("Complex pan")); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eStartTouch,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eTransformBegin,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eStartPanning,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eEndTouch,_)).Times(1); EXPECT_CALL(*mcc, NotifyAPZStateChange(_,GeckoContentController::APZStateChange::eTransformEnd,_)).Times(1); EXPECT_CALL(check, Call("Done")); } check.Call("Simple pan"); ApzcPanNoFling(apzc, 50, 25); check.Call("Complex pan"); Pan(apzc, 25, 45); apzc->AdvanceAnimationsUntilEnd(); check.Call("Done"); }
/** * \brief Handle keypresses * \param event The pressed key * \return True if key was used, otherwise false */ bool GallerySlideView::keyPressEvent(QKeyEvent *event) { if (GetFocusWidget()->keyPressEvent(event)) return true; QStringList actions; bool handled = GetMythMainWindow()->TranslateKeyPress("Images", event, actions); for (int i = 0; i < actions.size() && !handled; i++) { QString action = actions[i]; handled = true; if (action == "LEFT") ShowPrevSlide(); else if (action == "RIGHT") ShowNextSlide(); else if (action == "INFO") ShowInfo(); else if (action == "MENU") MenuMain(); else if (action == "PLAY") { if (m_playing) Stop(); else Play(); } else if (action == "SELECT") PlayVideo(); else if (action == "STOP") Stop(); else if (action == "ROTRIGHT") Transform(kRotateCW); else if (action == "ROTLEFT") Transform(kRotateCCW); else if (action == "FLIPHORIZONTAL") Transform(kFlipHorizontal); else if (action == "FLIPVERTICAL") Transform(kFlipVertical); else if (action == "ZOOMIN") Zoom(10); else if (action == "ZOOMOUT") Zoom(-10); else if (action == "FULLSIZE") Zoom(); else if (action == "SCROLLUP") Pan(QPoint(0, 100)); else if (action == "SCROLLDOWN") Pan(QPoint(0, -100)); else if (action == "SCROLLLEFT") Pan(QPoint(-120, 0)); else if (action == "SCROLLRIGHT") Pan(QPoint(120, 0)); else if (action == "RECENTER") Pan(); else if (action == "ESCAPE" && !GetMythMainWindow()->IsExitingToMain()) // Exit info details, if shown handled = m_infoList.Hide(); else handled = false; } if (!handled) handled = MythScreenType::keyPressEvent(event); return handled; }
void COrbitController::ScreenEdgeMove(float3 move) { Pan(int(move.x * -1000), int(move.y * 1000)); }
void vtkInteractorStyleQuench::OnMouseMove() { _mouse_moved = true; vtkRenderWindowInteractor *rwi = this->Interactor; int x = rwi->GetEventPosition()[0]; int y = rwi->GetEventPosition()[1]; int dx = rwi->GetEventPosition()[0] - rwi->GetLastEventPosition()[0]; int dy = rwi->GetEventPosition()[1] - rwi->GetLastEventPosition()[1]; this->FindPokedRenderer(x,y); //If we are still drawing a gesture, continue doing so if(_interaction_mode == INTERACTION_DRAW_GESTURE) { _GestureInteractor->AddPoint(x,y); //NotifyAllListeners(PEvent ( new EventRefreshViz(true) ) ); //CurrentRenderer->GetRenderWindow()->Render(); return; } if (_interaction_mode == INTERACTION_PATHWAYS) { _pathwayViz->OnMouseMove(x, abs(y)); } /* if(_left_button_down && _pathwayViz->OnMouseMove(x,abs(y))) { cerr << "mode selector moved." << endl; return; //Mode selector panel moved }*/ if (_interaction_mode == INTERACTION_ROI_EDIT) { _voiEditor->OnMouseMove(x,abs(y)); } /* if(_editing_voi && (_left_button_down || _right_button_down) && _voiEditor->OnMouseMove(x,abs(y))) return; //ROI editing in process. */ else { switch (this->State) { case VTKIS_ROTATE: Rotate(); InvokeEvent(vtkCommand::InteractionEvent, NULL); break; case VTKIS_PAN: Pan(); InvokeEvent(vtkCommand::InteractionEvent, NULL); break; case VTKIS_DOLLY: { double *center = CurrentRenderer->GetCenter(); double dyf = MotionFactor * (double)(dy) / (double)(center[1]); double scale = pow((double)1.1, dyf); Dolly(scale); _voiViz->Dolly(scale); CurrentRenderer->GetRenderWindow()->Render(); } InvokeEvent(vtkCommand::InteractionEvent, NULL); break; case VTKIS_SPIN: Spin(); InvokeEvent(vtkCommand::InteractionEvent, NULL); //this->frame->RefreshViz (); break; //default: // if(_Scene->GetPathwayViz()->PickManipulationTools(x,y) != -1) // frame->RefreshViz(); // break; } } }
void CineCameraClass::PanLeft() { Pan(-2.0f); }
void CineCameraClass::PanRight() { Pan(2.0f); }
void CGrfDoc::FindTagComplete(LPSTR Tag, DXF_ENTITY pTagInsert, DXF_ENTITY pTagAttr, dword Options) { //if (!pGWnd->bDonePaint) // {//drawing has never been painted ie display list has not been built, force it... // pGWnd->Dsp.Open(NULL); // CRect ClpBox; // pGWnd->GetClientRect(&ClpBox); // pGWnd->Dsp.Paint(ClpBox); // pGWnd->Dsp.Close(); // pGWnd->bDonePaint = 1; // } //pDrw->SelectInsertsOnAttrCombo(NULL, a999, b999); //if (1)//(pDsp->Vp1)->FirstSelectedEntity()) // { //gs_pCmd->SetRetCode(1); //gs_pCmd->Print("Goto '%s' succeeded\n", b999[0]); //ActivateGWnd(); POSITION pos = GetFirstViewPosition(); CView* pFirstView = GetNextView( pos ); CGrfWnd* pGWnd = (CGrfWnd*)pFirstView; if (pGWnd->GetFocus()!=pGWnd) MDIActivateThis(pGWnd); //bring the window to the front if (pGWnd->GetParent()->IsIconic()) pGWnd->GetParent()->ShowWindow(SW_RESTORE); GCB.pDrw->pDsp->Open(); //if (Options & FTO_MoveCursor) // SetCursor(pTagInsert, pTagAttr); //if (0)//gs_pPrj && (gs_pPrj->m_bGrfPromptForZoom || gs_pPrj->m_bGrfMoveCursor)) // { // //PanAndSetCursor(); // } //else // { // //CString DocTitle = pGWnd->GetDocument()->GetTitle(); // LogNote("GrfCmds", 0, "%s has been found on %s.", Tag, (const char*)GetTitle());//DocTitle); // } char * TagTagList[] = { TagAttribStr, (pchar)NULL }; char * ValueTagList[] = { Tag, (pchar)NULL }; GCB.pDrw->pDsp->Vp1->ClearAllEntity(); GCB.pDrw->pDsp->Vp1->ClrSelectionAllList(); GCB.pDrw->pDsp->Vp1->AddSelectionEntityList(DXF_INSERT); GCB.pDrw->pDsp->Vp1->AddSelectionAttribList(TagAttribStr); IRegExpPtr *pRE=NULL;//(gs_pPrj->m_bGrfRegExpOn) ? new IRegExpPtr("VBScript.RegExp") : NULL; GCB.pDrw->SelectInsertsOnAttrCombo(NULL, TagTagList, ValueTagList, pRE); GCB.pDrw->EntityInvalidate(pTagAttr, NULL); //pDsp->Vp1->ClearAllEntity(); //GCB.pDrw->pDsp->Draw(e1, -1); CRect ClpBox; pGWnd->GetClientRect(&ClpBox); pGWnd->Dsp.Paint(ClpBox); //pGWnd->EnInvalidate(false); Pan(pTagInsert, pTagAttr, Options ); if (Options & (FTO_MoveCursor|FTO_HighliteSlow|FTO_HighliteKwik)) SetCursor(pTagInsert, pTagAttr, Options ); if (Options & FTO_DoAccess)// gs_pPrj->bDoGrfAutoAccess) { char* pTxt = new char[strlen(Tag)+1]; strcpy(pTxt, Tag); ScdMainWnd()->PostMessage(WMU_TAGACTION, SUB_TAG_ACCESS, (LPARAM)pTxt); } else if (Options & FTO_DoAccessNoUpd)// gs_pPrj->bDoGrfAutoAccess) { char* pTxt = new char[strlen(Tag)+1]; strcpy(pTxt, Tag); ScdMainWnd()->PostMessage(WMU_TAGACTION, SUB_TAG_ACCNOUPDHIST, (LPARAM)pTxt); } //else // { // gs_pCmd->Print("Goto '%s' failed\n", b999[0]); // //AfxMessageBox("Goto has not found the requested Tag.\nTry another drawing.");//, MB_ICONQUESTION); // if (GotoFromToolbar) // { // char* pTxt = new char[strlen(b999[0])+1]; // strcpy(pTxt, b999[0]); // ScdMainWnd()->PostMessage(WMU_TAGACTION, gs_pPrj->bDoGrfAutoAccess ? SUB_TAG_FINDANDACCESS : SUB_TAG_FIND, (LPARAM)pTxt); // } // } //gs_pPrj->bDoGrfAutoAccess = 0; //delete pRE; //...... GCB.pDrw->pDsp->Close(); };
void COrbitController::KeyMove(float3 move) { // higher framerate means we take smaller steps per frame // (x and y are lastFrameTime in secs., 200FPS ==> 0.005s) Pan(int(move.x * -1000), int(move.y * 1000)); }