void QvisCMap2Display::mousePressEvent(QMouseEvent *e) { int doColor = (e->button() == Qt::MidButton) ? 1 : 0; for(size_t c = 0; c < cmap2.size(); ++c) { std::vector<SLIVR::CM2Widget*> &widgets = cmap2[c]->widgets(); for(size_t w = 0; w < widgets.size(); ++w) { int obj = widgets[w]->pick1(e->x(), height() - e->y(), width(), height()); if(obj <= 0) obj = widgets[w]->pick2(e->x(), height() - e->y(), width(), height(), doColor); if(obj > 0) { activeW = widgets[w]; activeW->select(obj); ren->set_colormap2(cmap2); updateGL(); // Change the cursor. ChangeCursor(QString(activeW->tk_cursorname(obj).c_str())); // Signal selection? emit selectWidget(LookupWidgetId(activeW)); return; } } } }
void OnStart() { if (HARDWARE_CURSOR == 0) { cursor = new cCursor(); } ChangeCursor(); gun->Enable((WINDOW_WIDTH / 2) - 10, WINDOW_HEIGHT - 30, 10, 20, (WINDOW_WIDTH / 2) - 5, WINDOW_HEIGHT - 20); for (int i = 0; i < R_COUNT; i++) { crosses[i] = new cCross(); rockets[i] = new cRocket(); } for (int i = 0; i < B_COUNT; i++) { bombs[i] = new cBomb(); } for (int i = 0; i < R_COUNT + B_COUNT; i++) { explodes[i] = new cExplode(); } rtlSrand(kos_GetTime()); DrawWindow(); kos_SetMaskForEvents(39); }
long CSaveIconView::OnLeftButtonUp(int nX, int nY) { m_nGrabbing = false; ReleaseCapture(); ChangeCursor(); return TRUE; }
void ChessBoard::mousePressEvent(QMouseEvent *e) { //QMessageBox::information(this, tr("JJJJ"), tr("OKKKK")); if(mRunning) { int x = e->x(); int y = e->y(); int r, c; c = (x-5)/38; r = (y-5)/38; // QMessageBox::information(this, tr("JJJ"), tr("%1...%2").arg(r).arg(c)); if(chess[r][c] == 2) { chess[r][c] = mTurn; if(Place(r, c)) { update(); mTurn = 1-mTurn; //change role emit ChangeNum(GetNum(0), GetNum(1)); ChangeCursor(); } else { chess[r][c] = 2; } } } }
static PF_Err HandleEvent( PF_InData *in_data, PF_OutData *out_data, PF_ParamDef *params[], PF_LayerDef *output, PF_EventExtra *extra) { PF_Err err = PF_Err_NONE; AEGP_SuiteHandler suites(in_data->pica_basicP); switch (extra->e_type) { case PF_Event_DO_CLICK: ERR(DoClick(in_data, out_data, params, output, extra)); // Premiere Pro/Elements does not support this suite if (in_data->appl_id != 'PrMr') { ERR(suites.AdvAppSuite2()->PF_InfoDrawText3("ColorGrid - Do Click Event","Adobe Systems, Inc.", NULL)); } break; case PF_Event_DRAG: // Premiere Pro/Elements does not support this suite if (in_data->appl_id != 'PrMr') { ERR(suites.AdvAppSuite2()->PF_InfoDrawText3("ColorGrid - Drag Event","Adobe Systems, Inc.", NULL)); } break; case PF_Event_DRAW: ERR(DrawEvent(in_data, out_data, params, output, extra, params[1]->u.cd.value)); // Premiere Pro/Elements does not support this suite if (in_data->appl_id != 'PrMr') { // don't draw info palette *during* a draw event, it will mess up // the drawing and cause schmutz // ERR(suites.AdvAppSuite2()->PF_InfoDrawText3("ColorGrid - Draw Event","Adobe Systems, Inc.", NULL)); } break; case PF_Event_ADJUST_CURSOR: ERR(ChangeCursor(in_data, out_data, params, output, extra)); // Premiere Pro/Elements does not support this suite if (in_data->appl_id != 'PrMr') { ERR(suites.AdvAppSuite2()->PF_InfoDrawText3("ColorGrid - Change Cursor Event","Adobe Systems, Inc.", NULL)); } break; default: break; } return err; }
void C3DView::OnMouseMove(UINT nFlags, CPoint point) { if (GetRenderer()) { GetRenderer()->OnMouseMove(nFlags, point.x, point.y); ChangeCursor(); } CView::OnMouseMove(nFlags, point); }
void C3DView::OnRButtonUp(UINT nFlags, CPoint point) { if (GetRenderer()) { GetRenderer()->OnRButtonUp(nFlags, point.x, point.y); ChangeCursor(); } ReleaseCapture(); CView::OnRButtonUp(nFlags, point); }
void C3DView::OnRButtonDown(UINT nFlags, CPoint point) { if (GetRenderer()) { GetRenderer()->OnRButtonDown(nFlags, point.x, point.y); ChangeCursor(); } SetCapture(); CView::OnRButtonDown(nFlags, point); }
void LiveEffectsTool::OnMouseMove(DocCoord Coord, Spread* pSpread, ClickModifiers mods) { // Stub out this function if the tool isn't wanted #ifndef NO_ADVANCED_TOOLS // We are interested in any selected paths that the cursor is over // we will also be needing the current docview SelRange* Selected = GetApplication()->FindSelection(); Node* pNode = Selected->FindFirst(); // Check to see if the selection is on the same spread as the mouse if (pNode!=NULL) { // Get the spread and return if it is different from the one with the cursor Spread* pNodeSpread = pNode->FindParentSpread(); if (pNodeSpread!=pSpread) return; } // Find the Blob manager, so we can find out how big a rect to use BlobManager* pBlobMgr = GetApplication()->GetBlobManager(); if (pBlobMgr==NULL) return; // Find the Rect round the mouse pos that counts as a hit DocRect BlobRect; pBlobMgr->GetBlobRect(Coord, &BlobRect); // Work out the square of the distance that we will count as 'close' to the line INT32 Range = BlobRect.Width() / 2; Range *= Range; // // loop through the selection // while (pNode!=NULL) // { // // Now find the next selected node // pNode = Selected->FindNext(pNode); // } // We did not find anything good, so set the cursor to the normal one ChangeCursor(pNormalCursor); // And set the status bar text StatusMsg.Load(_R(IDS_LIVEEFFECTSTART), Tool::GetModuleID(GetID())); GetApplication()->UpdateStatusBarText(&StatusMsg); #endif // NO_ADVANCED_TOOLS }
long CSaveIconView::OnLeftButtonDown(int nX, int nY) { SetFocus(); m_nGrabPosX = nX; m_nGrabPosY = nY; m_nGrabDistX = 0; m_nGrabDistY = 0; m_nGrabRotX = m_nRotationX; m_nGrabRotY = m_nRotationY; m_nGrabbing = true; SetCapture(m_hWnd); ChangeCursor(); return TRUE; }
long CSaveIconView::OnSetCursor(HWND hWnd, unsigned int nX, unsigned int nY) { ChangeCursor(); return TRUE; }
void PushTool::OnMouseMove(DocCoord dcPoint, Spread* pSpread, ClickModifiers mods) { #ifdef RALPH //Graham 20/9/96. //We need to check if the zoom tool's over a Hot Link. If it is, the cursor changes //to a pointing hand. //The one exception is if CTRL is pressed, in which case the cursor is the //normal Push tool cursor (Disabled at the moment) //First, try and find a node with a Hot Link AttrUser* pHotLinkNode= (AttrUser*) DocView::FindHotLinkNode(dcPoint); if (pHotLinkNode && !(mods.Constrain)) { //Yes. So change the cursor to a pointing hand ChangeCursor(Cursor::PointingHand); //And now to update the status bar of the browser //So first get a pointer to the document //And a pointer to the Ralph document... Document* ThisDoc=Document::GetSelected(); RalphDocument* ThisRalphDoc=ThisDoc->GetRalphDoc(); ERROR3IF(ThisRalphDoc==NULL, "DocView::OnMouseMoveWithNoTool has no Ralph Doc"); //Then get the base URL of this Ralph document as a Web Address WebAddress wBase(ThisRalphDoc->GetBaseURL()); //And get the URL of this node as a Web Address WebAddress wEmbedded(pHotLinkNode->GetWebAddress()); //This function makes wEmbedded into an absolute URL (if necessary) wEmbedded.Combine(wBase); //Make the Web Address into a normal string String_256 strEmbedded=wEmbedded.GetWebAddress(); //And put that URL into the status bar string String_256 sPushTool; sPushTool.MakeMsg(_R(IDS_PUSHTOOL_HOTLINK), (TCHAR*) strEmbedded); //And tell the Ralph document to show the string in the browser's status //bar ThisRalphDoc->SetStatusBar(&sPushTool); } else { //No, the cursor is not over a Hot Link or CTRL is pressed //Change the cursor to the standard Push tool cursor //and display a standard message in the browser status bar ChangeCursor(pcPushCursor); String_256 StringToPass(_R(IDS_RALPH_PUSHTOOLSTR)); DocView::SetBrowserStatusBar(&StringToPass); } #endif //RALPH #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX) if (this!=NULL) { String_256 text(""); if (text.Load(_R(IDS_PUSHTOOL_STATUSHELP))) GetApplication()->UpdateStatusBarText(&text); } else ERROR3("PushTool::OnMouseMove() - this==NULL"); #endif }
void mouse_t::Hide() { ChangeCursor( MOUSE_CURSOR_NULL ); }
void mouse_t::Show() { ChangeCursor( MOUSE_CURSOR_POINTER ); }