CStatusLineCtrl::CStatusLineCtrl(CQueueView* pParent, const t_EngineData* const pEngineData, const wxRect& initialPosition) : m_pEngineData(pEngineData) { m_mdc = 0; m_pPreviousStatusText = 0; m_last_elapsed_seconds = 0; m_last_left = 0; m_last_bar_split = -1; m_last_permill = -1; wxASSERT(pEngineData); #ifdef __WXMSW__ Create(pParent, wxID_ANY, initialPosition.GetPosition(), initialPosition.GetSize()); #else Create(pParent->GetMainWindow(), wxID_ANY, initialPosition.GetPosition(), initialPosition.GetSize()); #endif SetOwnFont(pParent->GetFont()); SetForegroundColour(pParent->GetForegroundColour()); SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBackgroundColour(pParent->GetBackgroundColour()); m_transferStatusTimer.SetOwner(this); m_pParent = pParent; m_pStatus = 0; m_lastOffset = -1; m_gcLastTimeStamp = wxDateTime::Now(); m_gcLastOffset = -1; m_gcLastSpeed = -1; SetTransferStatus(0); // Calculate field widths so that the contents fit under every language. if (!m_initialized) { m_initialized = true; wxClientDC dc(this); dc.SetFont(GetFont()); wxCoord w, h; wxTimeSpan elapsed(100, 0, 0); dc.GetTextExtent(elapsed.Format(_("%H:%M:%S elapsed")), &w, &h); m_textHeight = h; m_fieldOffsets[0] = 50 + w; dc.GetTextExtent(elapsed.Format(_("%H:%M:%S left")), &w, &h); m_fieldOffsets[1] = m_fieldOffsets[0] + 20 + w; m_fieldOffsets[2] = m_fieldOffsets[1] + 20; m_fieldOffsets[3] = m_fieldOffsets[2] + PROGRESSBAR_WIDTH + 20; } #ifdef __WXGTK__ ResetCursor(this); #endif }
void CDB_driver::Step() { ResetCursor(); QueueCommand(new DebuggerContinueBaseCmd(this, _T("p"))); // print a stack frame to find out about the file we 've stopped QueueCommand(new CdbCmd_SwitchFrame(this, -1)); }
void CPaintCursorAppView::HandleResourceChange( TInt aType ) { CCoeControl::HandleResourceChange( aType ); if ( aType == KEikDynamicLayoutVariantSwitch ) { ResetCursor(); } }
EXPORT_C TInt CMTPTypeObjectPropList::Validate() const { TInt relValue(KErrNone); TUint32 num = NumberOfElements(); ResetCursor(); for(TUint32 i = 0; i< num;i++) { TRAPD(err, GetNextElementL()) if(KErrNone != err) { relValue = KMTPDataTypeInvalid; break; } } ResetCursor(); return relValue; }
void OverlayControl::MouseDown(HWND hwnd, WPARAM wParam, LPARAM lParam) { if (!ActiveOverlay) return; // Left or right button clicked -- select the element under cursor. RECT clipRect, clientRect; GetWindowRect(hwnd, &clipRect); GetClientRect(hwnd, &clientRect); // Save original mouse position. GetCursorPosition(hwnd, &clickAnchor); // Element could be activated only if no element active AND user doesn't click // within the active element. if (!ActiveOverlay->ActiveElement || !ActiveOverlay->HitTestElement(ActiveOverlay->ActiveElement, &clientRect, &clickAnchor, &hitTestAnchor)) { // Find overlay element under cursor. OverlayElement *element = ActiveOverlay->FindElementFromPoint(&clientRect, &clickAnchor, &hitTestAnchor); ActivateElement(hwnd, element); } if (!ActiveOverlay->ActiveElement) { ResetCursor(); } if (0 != (wParam & MK_LBUTTON)) { if (ActiveOverlay->ActiveElement) { ActiveOverlay->ActiveElement->GetRect(&clientRect, &elementRectAnchor); // Show that we're about to drag the object. UpdateCursor(hitTestAnchor); // Capture the mouse. SetCapture(hwnd); ClipCursor(&clipRect); } return; } if (0 != (wParam & MK_RBUTTON)) { // Show popup menu. POINT pt; GetCursorPos(&pt); __raise RightMouseButtonClicked(ActiveOverlay->ActiveElement, &pt); return; } }
void DisclosureTriangleButton::SetEnabled(bool isEnabledIn) { this->isEnabled = isEnabledIn; if (isEnabled) { SetCursor(MouseCursor::PointingHand); } else { ResetCursor(); } }
void OverlayControl::MouseUp(HWND hwnd, WPARAM wParam, LPARAM lParam) { if (!ActiveOverlay) return; // Release mouse. ClipCursor(0); ReleaseCapture(); ResetCursor(); }
int FindNode(time_t wanted_time) { ResetCursor(); while(CursorValid()) { if(CURSOR->data.time == wanted_time) return 1; CursorStepNext(); } return 0; }
int RemoveOldestNode() { if(list_size == 0) return 0; ResetCursor(); time_t temp = CURSOR->data.time; while(CursorValid()) { if(CURSOR->data.time < temp) temp = CURSOR->data.time; CursorStepNext(); } return RemoveTime(temp); }
void GUI_GeneralPreview(Widget w,XtPointer client, XtPointer call) { struct CTransform *ctransform=(struct CTransform *)client; struct FFTSound *copy; int length; PlayStopHard(); if( ! DA_initialized(ctransform->fftsound)){ fprintf(stderr,"No Sound loaded\n"); return; } XmUpdateDisplay(w); SetWatchCursor(topLevel); if(ctransform->doprogress==true){ XtVaSetValues(progressScale, XmNvalue, 0, NULL); XtManageChild(progressDialog); } while (XtAppPending(app_context)) { XtAppProcessEvent(app_context,XtIMXEvent|XtIMTimer|XtIMAlternateInput); } length=min(areat2-areat1,CONFIG_getMaxPreviewLength(ctransform->fftsound)); copy=makeFFTSoundCopy(ctransform->fftsound,areat1,areat1+length); copyFFTSound(ctransform->fftsound,copy,areat1); // copy=ctransform->fftsound; (*ctransform->Transform)(ctransform,ctransform->pointer,copy,0,length,areat1); Play(copy,0,length); /* if(pthread_create(&pthread,NULL,DoPlay,copy)!=0){ fprintf(stderr,"Could not make pthread\n"); } */ // RedrawWin(ctransform->fftsound); if(ctransform->doprogress==true) XtUnmanageChild(progressDialog); ResetCursor(topLevel); }
void CDataGraph::enableCursor(bool varToggle) { cursorEnabled=varToggle; if (varToggle){ customPlot->axisRect()->setRangeDrag(0); //désactive temporairement le drag and drop des courbes //On ajoute les curseurs au graphique customPlot->addItem(cursor1); customPlot->addItem(cursor2); //qDebug() << customPlot->itemCount() << "créés"; //on les rend sélectionnables cursor1->setSelectable(true); cursor2->setSelectable(true); //Positionnement des curseurs cursor1->start->setCoords( (customPlot->xAxis->range().upper)-7, (customPlot->yAxis->range().lower)); cursor1->end->setCoords( (customPlot->xAxis->range().upper)-7, (customPlot->yAxis->range().upper)); cursor2->start->setCoords( (customPlot->xAxis->range().upper)-5, (customPlot->yAxis->range().lower)); cursor2->end->setCoords( (customPlot->xAxis->range().upper)-5, (customPlot->yAxis->range().upper)); ManageCursor(cursor1,(customPlot->xAxis->range().upper)-7,3); ManageCursor(cursor2,(customPlot->xAxis->range().upper)-5,4); customPlot->replot(); //on rend le delta T visible m_ihm.ui.label_deltaT->setVisible(true); m_ihm.ui.label_deltaT->setText("2"); } else{ customPlot->axisRect()->setRangeDrag(Qt::Horizontal); //réactive drag de la courbe (uniquement le long de l'axe horizontal) //le delta T n'est plus visible m_ihm.ui.label_deltaT->setVisible(false); //on enlève les curseurs le cas échéant ResetCursor(); customPlot->replot(); } }
void CorrectText(bool detect){ dword len = win::SendMessage(hwnd_ctrl, WM_GETTEXTLENGTH, 0, 0); if(mask_password && !len) return; #ifdef USE_RICHINK if(detect && len==dword(text.size()-1)){ C_buffer<wchar> tmp; tmp.Resize(len+1); SendMessageW(hwnd_ctrl, WM_GETTEXT, len, (win::LPARAM)tmp.Begin()); if(!MemCmp(tmp.Begin(), text.begin(), len*sizeof(wchar))) return; MemCpy(text.begin(), tmp.Begin(), len*sizeof(wchar)); }else{ text.resize(len+1); win::SendMessage(hwnd_ctrl, WM_GETTEXT, len, (win::LPARAM)text.begin()); } text[len] = 0; #else if(detect && len==dword(text.size()-1)){ C_buffer<wchar> tmp; tmp.Resize(len+1); SendMessageW(hwnd_ctrl, WM_GETTEXT, len+1, (win::LPARAM)tmp.Begin()); if(!MemCmp(tmp.Begin(), text.begin(), (len+1)*sizeof(wchar))) return; MemCpy(text.begin(), tmp.Begin(), (len+1)*sizeof(wchar)); }else{ text.resize(len+1); win::SendMessage(hwnd_ctrl, WM_GETTEXT, len+1, (win::LPARAM)text.begin()); text.begin()[len] = 0; } #endif mask_password = false; text_dirty = true; SetSelFromWin(); ResetCursor(); }
void GUI_GeneralOk(Widget w,XtPointer client, XtPointer call) { struct CTransform *ctransform=(struct CTransform *)client; if( ! DA_initialized(ctransform->fftsound)){ fprintf(stderr,"No Sound loaded\n"); return; } XmUpdateDisplay(w); SetWatchCursor(topLevel); if(ctransform->doprogress==true){ XtVaSetValues(progressScale, XmNvalue, 0, NULL); XtManageChild(progressDialog); } while (XtAppPending(app_context)) { XtAppProcessEvent(app_context,XtIMXEvent|XtIMTimer|XtIMAlternateInput); } UNDO_addTransform(ctransform->fftsound); (*ctransform->Transform)(ctransform,ctransform->pointer,ctransform->fftsound,areat1,areat2,0); SetVisibleFunc(1,2); SetVisibleFunc(2,2); SetVisibleFunc(3,2); RedrawWin(ctransform->fftsound); if(ctransform->doprogress==true) XtUnmanageChild(progressDialog); ResetCursor(topLevel); XtUnmanageChild(ctransform->parentwidget); }
EXPORT_C CMTPTypeObjectPropListElement& CMTPTypeObjectPropList::GetNextElementL() const { // Update the page index and buffer index of element if (NULL == iCurrentElement) { ResetCursor(); } if (iResetCursor) { iResetCursor = EFalse; } else { TUint elemSize = iCurrentElement->Size(); IncreaseIndexL(iCurrentElement->iPageIndex, iCurrentElement->iBufIndex, elemSize, EFalse); } iCurrentElement->iArrayBuffered = EFalse; // Copy value of handle/propcode/datatype from buffer to element TUint pageIndex = iCurrentElement->iPageIndex; TUint bufIndex = iCurrentElement->iBufIndex; MemoryCopyL(&(iCurrentElement->iObjectHandle), pageIndex, bufIndex, sizeof(TUint32)); IncreaseIndexL(pageIndex, bufIndex, sizeof(TUint32), EFalse); MemoryCopyL(&(iCurrentElement->iPropertyCode), pageIndex, bufIndex, sizeof(TUint16)); IncreaseIndexL(pageIndex, bufIndex, sizeof(TUint16), EFalse); MemoryCopyL(&(iCurrentElement->iDataType), pageIndex, bufIndex, sizeof(TUint16)); IncreaseIndexL(pageIndex, bufIndex, sizeof(TUint16), EFalse); // Calculate value length switch(iCurrentElement->iDataType) { case EMTPTypeUINT8: iCurrentElement->iValueSize = sizeof(TUint8); break; case EMTPTypeUINT16: iCurrentElement->iValueSize = sizeof(TUint16); break; case EMTPTypeUINT32: iCurrentElement->iValueSize = sizeof(TUint32); break; case EMTPTypeUINT64: iCurrentElement->iValueSize = sizeof(TUint64); break; case EMTPTypeUINT128: iCurrentElement->iValueSize = 2 * sizeof(TUint64); break; case EMTPTypeString: { TUint8 arrayLen = 0; MemoryCopyL(&arrayLen, pageIndex, bufIndex, sizeof(TUint8)); iCurrentElement->iValueSize = arrayLen * sizeof(TUint16) + sizeof(TUint8); break; } case EMTPTypeAUINT16: case EMTPTypeAUINT8: case EMTPTypeAUINT32: case EMTPTypeAUINT64: case EMTPTypeAUINT128: { TUint32 arrayLen = 0; TUint32 arrayWidth = ArrayElemWidth(iCurrentElement->iDataType); MemoryCopyL(&arrayLen, pageIndex, bufIndex, sizeof(TUint32)); iCurrentElement->iValueSize = arrayLen * arrayWidth + sizeof(TUint32); break; } default: break; } return *iCurrentElement; }
//============================== // OvrGazeCursorLocal::BeginFrame void OvrGazeCursorLocal::BeginFrame() { ResetCursor(); }
void CTRiASMICursorProperty::FinalRelease() { ResetCursor(); // Cursor wieder freigeben }
virtual void Activate(bool b){ if(b==activated) return; const int CHANGE_IG_FLAGS = IG_SCREEN_USE_DSA|IG_SCREEN_SHOW_SIP; if(b){ assert(!active_this); active_this = this; saved_ig_flags = app->GetGraphicsFlags(); dword flg = CHANGE_IG_FLAGS & ~IG_SCREEN_USE_DSA; #ifdef _WIN32_WCE if(!last_sip_on) flg &= ~IG_SCREEN_SHOW_SIP; #endif app->UpdateGraphicsFlags(flg, CHANGE_IG_FLAGS); save_ig_proc = (win::WNDPROC)win::SetWindowLong(hwnd_ig, GWL_WNDPROC, (win::LPARAM)IgraphWindowProcThunk); save_ctrl_proc = (win::WNDPROC)win::SetWindowLong(hwnd_ctrl, GWL_WNDPROC, (win::LPARAM)CtrlWindowProcThunk); //EnableWindow(hwnd_ctrl, true); ResetCursor(); if(!(te_flags&TXTED_REAL_VISIBLE)){ timer_id = win::SetTimer(hwnd_ctrl, 1, 50, NULL); }else{ win::EnableWindow(hwnd_ctrl, true); } win::SetFocus(hwnd_ctrl); }else{ if(!(te_flags&TXTED_REAL_VISIBLE)){ win::KillTimer(hwnd_ctrl, timer_id); }else{ win::EnableWindow(hwnd_ctrl, false); } #ifdef _WIN32_WCE win::SIPINFO si; MemSet(&si, 0, sizeof(si)); si.cbSize = sizeof(si); //if(want_keyboard==-1) //if(win::SipGetInfo(&si)) //last_sip_on = (si.fdwFlags&SIPF_ON); last_sip_on = (app->GetGraphicsFlags()&IG_SCREEN_SHOW_SIP); #endif assert(active_this); win::SetWindowLong(hwnd_ctrl, GWL_WNDPROC, (win::LPARAM)save_ctrl_proc); save_ctrl_proc = NULL; win::SetWindowLong(hwnd_ig, GWL_WNDPROC, (win::LPARAM)save_ig_proc); save_ig_proc = NULL; active_this = NULL; //EnableWindow(hwnd_ctrl, false); app->UpdateGraphicsFlags(saved_ig_flags & ~IG_SCREEN_SHOW_SIP, CHANGE_IG_FLAGS); win::SetFocus(hwnd_ig); #ifdef _WIN32_WCE //if(!IsWMSmartphone()) //win::SHSipPreference(hwnd_ig, win::SIP_DOWN); #endif //win::SetTimer(NULL, 0, 500, CloseTimerProc); } #ifdef _WIN32_WCE want_keyboard = b; #endif activated = b; C_text_editor_common::Activate(b); }
void CDB_driver::StepIn() { ResetCursor(); QueueCommand(new DebuggerContinueBaseCmd(this, _T("t"))); Step(); }
void CDB_driver::Continue() { ResetCursor(); QueueCommand(new CdbCmd_Continue(this)); m_IsStarted = true; }
void CDB_driver::Stop() { ResetCursor(); QueueCommand(new DebuggerCmd(this, _T("q"))); m_IsStarted = false; }
void OverlayControl::MouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam) { if (!ActiveOverlay || !ActiveOverlay->ActiveElement) { ResetCursor(); return; } RECT clientRect; GetClientRect(hwnd, &clientRect); POINT pt; GetCursorPosition(hwnd, &pt); if (0 != (wParam & MK_LBUTTON)) { RECT elementRect; memmove(&elementRect, &elementRectAnchor, sizeof(elementRect)); int dx = pt.x - clickAnchor.x, dy = pt.y - clickAnchor.y; bool updateAnchors = false; // Move/drag element. if (0 != (hitTestAnchor & ohtLeftBorder)) { if (ohtInside != hitTestAnchor && dx > 0 && RectWidth(elementRect) - dx < OverlayElement::MinimalSize) dx = RectWidth(elementRect) - OverlayElement::MinimalSize; elementRect.left += dx; } if (0 != (hitTestAnchor & ohtRightBorder)) { if (ohtInside != hitTestAnchor && dx < 0 && RectWidth(elementRect) + dx < OverlayElement::MinimalSize) dx = OverlayElement::MinimalSize - RectWidth(elementRect); elementRect.right += dx; } if (0 != (hitTestAnchor & ohtTopBorder)) { if (ohtInside != hitTestAnchor && dy > 0 && RectHeight(elementRect) - dy < OverlayElement::MinimalSize) dy = RectHeight(elementRect) - OverlayElement::MinimalSize; elementRect.top += dy; } if (0 != (hitTestAnchor & ohtBottomBorder)) { if (ohtInside != hitTestAnchor && dy < 0 && RectHeight(elementRect) + dy < OverlayElement::MinimalSize) dy = OverlayElement::MinimalSize - RectHeight(elementRect); elementRect.bottom += dy; } // Check for sanity. if (elementRect.left < clientRect.left) { updateAnchors = true; OffsetRect(&elementRect, clientRect.left - elementRect.left, 0); } if (elementRect.right > clientRect.right) { updateAnchors = true; OffsetRect(&elementRect, clientRect.right - elementRect.right, 0); } if (elementRect.top < clientRect.top) { updateAnchors = true; OffsetRect(&elementRect, 0, clientRect.top - elementRect.top); } if (elementRect.bottom > clientRect.bottom) { updateAnchors = true; OffsetRect(&elementRect, 0, clientRect.bottom - elementRect.bottom); } if (updateAnchors) { memmove(&clickAnchor, &pt, sizeof(clickAnchor)); memmove(&elementRectAnchor, &elementRect, sizeof(elementRectAnchor)); } // Update element coordinates. ActiveOverlay->ActiveElement->SetRect(&clientRect, &elementRect); // Drag object under cursor. RepaintAll(hwnd); } else { // No mouse keys pressed -- change cursor accordingly to what's // visible on the screen. OverlayHitTest hitTest = ohtNone; OverlayElement *element = ActiveOverlay->ActiveElement; if (ActiveOverlay->ActiveElement && !ActiveOverlay->HitTestElement(ActiveOverlay->ActiveElement, &clientRect, &pt, &hitTest)) { element = ActiveOverlay->FindElementFromPoint(&clientRect, &pt, &hitTest); } if (0 != element && element == ActiveOverlay->ActiveElement && ohtInside != hitTest) UpdateCursor(hitTest); else ResetCursor(); } }
void CDB_driver::StepOut() { ResetCursor(); QueueCommand(new DebuggerContinueBaseCmd(this, _T("gu"))); QueueCommand(new CdbCmd_SwitchFrame(this, -1)); }
win::LRESULT CtrlWindowProc(win::HWND hwnd, win::UINT msg, win::WPARAM wParam, win::LPARAM lParam){ switch(msg){ case WM_KEYDOWN: case WM_KEYUP: switch(wParam){ case VK_RETURN: if(!(te_flags&TXTED_ALLOW_EOL) || IsReadOnly()) return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); return 0; case VK_SHIFT: case VK_LSHIFT: case VK_RSHIFT: shift_down = (msg==WM_KEYDOWN); return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); case VK_UP: case VK_DOWN: if(!(te_flags&TXTED_ALLOW_EOL)){ if(shift_down){ SetCursorPos(wParam==VK_UP ? 0 : text.size()-1, cursor_sel); ResetCursor(); TextEditNotify(false, true, false); break; } } if(te_flags&TXTED_REAL_VISIBLE){ dword sel0, sel1; win::SendMessage(hwnd, EM_GETSEL, (win::WPARAM)&sel0, (win::LPARAM)&sel1); if(sel0!=sel1) break; int num_lines = win::SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); if(wParam==VK_UP){ //check if we're on 1st line if(num_lines>1 && int(sel0)>=win::SendMessage(hwnd, EM_LINELENGTH, 0, 0)) break; }else{ if(num_lines>1 && int(sel0)<win::SendMessage(hwnd, EM_LINELENGTH, num_lines-1, 0)) break; } } case VK_F1: case VK_F2: case VK_F3: case VK_F4: case VK_F5: case VK_F6: case VK_F7: case VK_F8: case VK_F9: case VK_F10: case VK_F11: case VK_F12: #ifdef _WINDOWS case VK_ESCAPE: case VK_PRIOR: case VK_NEXT: case VK_TAB: #endif return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); case VK_DELETE: if(mask_password){ mask_password = false; SetInitText(NULL); } /* else if(!GetTextLength()) return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); */ break; /* case VK_LEFT: case VK_RIGHT: if(!GetTextLength()) return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); break; */ } break; #ifdef _DEBUG case WM_SYSKEYDOWN: case WM_SYSKEYUP: if(wParam==VK_F10){ return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); } break; #endif //* case WM_CHAR: //process end-of-line here, because Windows enters \r\n as eol if(wParam=='\r'){ if((te_flags&TXTED_ALLOW_EOL) && !IsReadOnly()){ if(!(te_flags&TXTED_REAL_VISIBLE)){ ReplaceSelection(L"\n"); TextEditNotify(false, false, true); return 0; }else return CallWindowProc(save_ctrl_proc, hwnd, msg, wParam, lParam); } return CallWindowProc(save_ig_proc, hwnd_ig, msg, wParam, lParam); }else if(wParam=='\t'){ return 0; } break; /**/ case WM_TIMER: { /* #ifdef _WIN32_WCE if(!IsWMSmartphone() && want_keyboard!=-1){ //win::SetWindowPos(hwnd_ig, b ? HWND_NOTOPMOST : HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); //UpdateWindow(hwnd_ig); if(want_keyboard){ win::SHSipPreference(hwnd_ig, C_text_editor_win32::last_sip_on ? win::SIP_UP : win::SIP_DOWN); }else{ win::SHSipPreference(hwnd_ig, win::SIP_DOWN); } want_keyboard = -1; } #endif /**/ if(win::GetFocus()!=hwnd_ctrl) win::SetFocus(hwnd_ctrl); bool cm = SetSelFromWin(); //if(cm) CorrectText(true); bool cf = TickCursor(); if(cm || cf || text_dirty){ TextEditNotify(cf, cm, text_dirty); text_dirty = false; } } break; } return CallWindowProc(save_ctrl_proc, hwnd, msg, wParam, lParam); }
void CDB_driver::SwitchToFrame(size_t number) { ResetCursor(); QueueCommand(new CdbCmd_SwitchFrame(this, number)); }
void DebuggerDriver::NotifyDebuggeeContinued() { m_pDBG->DebuggeeContinued(); ResetCursor(); }
void C$$safe_root$$CursorProperty::FinalRelease() { ResetCursor(); // Cursor wieder freigeben }