void PanelatorUI::DoFlyoutCommand(AEGP_FlyoutMenuCmdID commandID) { switch(commandID){ case PT_MenuCmd_RED: i_use_bg = false; red = PF_MAX_CHAN8; green = blue = 0; break; case PT_MenuCmd_GREEN: i_use_bg = false; green = PF_MAX_CHAN8; red = blue = 0; break; case PT_MenuCmd_BLUE: i_use_bg = false; blue = PF_MAX_CHAN8; red = green = 0; break; case PT_MenuCmd_STANDARD: i_use_bg = true; break; case PT_MenuCmd_TITLE_LONGER: i_panelSuite->AEGP_SetTitle(i_panelH, reinterpret_cast<A_u_char*>("This is a longer name")); break; case PT_MenuCmd_TITLE_SHORTER: i_panelSuite->AEGP_SetTitle(i_panelH, reinterpret_cast<A_u_char*>("P!")); break; } InvalidateAll(); }
/********************************************************************* * Function: void GOLFree() * * PreCondition: none * * Input: none * * Output: none * * Side Effects: none * * Overview: frees memory of all objects in the current linked list * and starts a new linked list. This function must be * called only inside the GOLDrawCallback()function when * using GOLDraw() and GOLMsg() to manage rendering and * message processing. * * Note: drawing and messaging must be suspended * ********************************************************************/ void GOLFree(void) { OBJ_HEADER *pNextObj; OBJ_HEADER *pCurrentObj; pCurrentObj = _pGolObjects; while(pCurrentObj != NULL) { pNextObj = (OBJ_HEADER *)pCurrentObj->pNxtObj; // check if there are additional items to free if(pCurrentObj->FreeObj) pCurrentObj->FreeObj(pCurrentObj); GFX_free(pCurrentObj); pCurrentObj = pNextObj; } GOLNewList(); #ifdef USE_DOUBLE_BUFFERING InvalidateAll(); #endif }
void GridViewGridControl::UpdateGridData() { for (int i = 1; i < GetRowCount(); i++) { for (int j = 1; j < GetColCount(); j++) { CGridCell* pCell = GetCell(i, j); pCell->UpdateText(); } } AutoSize(); int maxSize = GetColSize(1); for (int i = 2; i < GetColCount(); i++) { int colSize = GetColSize(i); if (colSize > maxSize) maxSize= colSize; } maxSize += 5; for (int i = 1; i < GetColCount(); i++) SetColSize(i, maxSize); InvalidateAll(); }
void OpStatusField::OnDesktopWindowStatusChanged(DesktopWindow* desktop_window, DesktopWindowStatusType type) { if (m_status_type == STATUS_TYPE_TOOLBAR || type != m_status_type || GetParentDesktopWindowType() == DIALOG_TYPE_CUSTOMIZE_TOOLBAR) { return; } if( m_global_widget ) { if (desktop_window->GetStatusText(m_status_type) == NULL) SetText( desktop_window->GetUnderlyingStatusText(m_status_type)); else SetText( desktop_window->GetStatusText(m_status_type) ); } if(!m_global_widget) { DesktopWindow* parent = GetParentDesktopWindow(); if (parent->GetStatusText(m_status_type) == NULL) SetText( parent->GetUnderlyingStatusText(m_status_type)); else SetText( parent->GetStatusText(m_status_type) ); } InvalidateAll(); ResetRequiredSize(); GetParent()->OnContentSizeChanged(); }
bool mitk::MicroBirdTrackingDevice::StopTracking() { TrackingDevice::StopTracking(); // Call superclass method SwitchTransmitter(false); // Switch off transmitter InvalidateAll(); // Invalidate all tools return true; // \todo : think about return value }
void TestZoneCurveGridCtrl::UpdateModifiedRows() { for (int i = m_currTZC + 1; i < GetRowCount(); i++) for (int j = 1; j < GetColCount(); j++) { CGridCell* pCell = GetCell(i, j); pCell->UpdateText(); } InvalidateAll(); }
void XYGridControl::UpdateModifiedRows() { for (int i = m_nCurrent + 1; i < GetRowCount(); i++) { for (int j = 1; j < GetColCount(); j++) { CGridCell* pCell = GetCell(i, j); pCell->UpdateText(); } } InvalidateAll(); }
void DataCaptureGridCtrl::UpdateModifiedRows() { for (int i = m_currDCap + 1; i < GetRowCount(); i++) for (int j = 1; j < GetColCount(); j++) { CGridCell* pCell = GetCell(i, j); pCell->UpdateText(); } InvalidateAll(); }
void ProdRestartGridCtrl::UpdateAllRows() { productionRestartTimes.Cleanup(); productionRestartTimes.Sort(true); for (int i = 1; i < GetRowCount(); i++) { CGridCell* pCell = GetCell(i, 1); pCell->UpdateText(); } InvalidateAll(); }
void XYViewGridControl::UpdateXYData() { for (int i = 1; i < GetRowCount(); i++) { GetCell(i, 1)->UpdateText(); GetCell(i, 2)->UpdateText(); } AutoSize(); InvalidateAll(); }
void CWnd::Execute(float elapsed) { if (childwindow) { childwindow->Execute(elapsed); if (childwindow->closed) { delete childwindow; childwindow=NULL; InvalidateAll(); } } else for (int i=0;i<MAX_CHILD;i++)if (child[i]!=NULL)child[i]->Execute(elapsed); }
void CTDCTaskListCtrl::OnNotifySplitterChange(int nSplitPos) { // if split width exceeds client column width // extend column width to suit if (IsRight(m_lcTasks)) { CRect rClient; CWnd::GetClientRect(rClient); nSplitPos = (rClient.Width() - nSplitPos); } if (nSplitPos > CLIENTCOLWIDTH) { m_lcTasks.SetColumnWidth(0, (nSplitPos + 4)); } else if (m_lcTasks.GetColumnWidth(0) > CLIENTCOLWIDTH) { m_lcTasks.SetColumnWidth(0, CLIENTCOLWIDTH); } InvalidateAll(TRUE); }
/********************************************************************* * Function: WORD GOLDraw() * * PreCondition: none * * Input: none * * Output: non-zero if drawing is complete * * Side Effects: none * * Overview: redraws objects in the current linked list * * Note: none * ********************************************************************/ WORD GOLDraw(void) { static OBJ_HEADER *pCurrentObj = NULL; SHORT done; #ifdef USE_DOUBLE_BUFFERING static BYTE DisplayUpdated = 0; if(IsDisplayUpdatePending()) { return 0; } #endif // USE_DOUBLE_BUFFERING if(pCurrentObj == NULL) { if(GOLDrawCallback()) { #ifdef USE_DOUBLE_BUFFERING #ifdef USE_TRANSITION_EFFECTS if(TransitionPendingStatus) { TransitionPendingStatus = 0; while(IsDisplayUpdatePending()); GFXExecutePendingTransition(GetDrawBufferAddress(), GetFrameBufferAddress()); } #endif #endif //USE_DOUBLE_BUFFERING // It's last object jump to head pCurrentObj = _pGolObjects; #ifdef USE_DOUBLE_BUFFERING if(DisplayUpdated) { RequestDisplayUpdate(); DisplayUpdated = 0; return(0); } #endif //USE_DOUBLE_BUFFERING } else { return (0); // drawing is not done } } done = 0; while(pCurrentObj != NULL) { if(IsObjUpdated(pCurrentObj)) { done = pCurrentObj->DrawObj(pCurrentObj); if(done) { GOLDrawComplete(pCurrentObj); #ifdef USE_DOUBLE_BUFFERING InvalidateRectangle(pCurrentObj->left, pCurrentObj->top, pCurrentObj->right, pCurrentObj->bottom); DisplayUpdated = 1; #endif //USE_DOUBLE_BUFFERING } else { return (0); // drawing is not done } } pCurrentObj = (OBJ_HEADER *)pCurrentObj->pNxtObj; } #if defined(USE_TRANSITION_EFFECTS) && defined(USE_DOUBLE_BUFFERING) TransitionPendingStatus = GFXIsTransitionPending(); InvalidateAll(); //If needed, invalidate only the transition rectangle instead #endif return (1); // drawing is completed }
void CServerPage::PerformCommand(int command,DWORD p1,int p2) { switch(command) { case 1:Close(0); break; case 2:SpawnObject(IDChicken,NULL); break; case 3:RemoveObject(IDChicken); break; case 16:SpawnObject(IDBauer,NULL); break; case 17:RemoveObject(IDBauer); break; case 4:SpawnObject(IDStall,NULL); break; case 5:RemoveObject(IDStall); break; case 6:SpawnObject(IDTree,NULL); break; case 7:RemoveObject(IDTree); break; case 8:SpawnObject(IDGartenkralle,NULL); break; case 9:RemoveObject(IDGartenkralle); break; case 10:SpawnObject(IDGolfer,NULL); break; case 11:RemoveObject(IDGolfer); break; case 12:SpawnObject(IDDrescher,NULL); break; case 13:RemoveObject(IDDrescher); break; case 14:SpawnObject(IDPlasmaCannon,NULL); break; case 15:RemoveObject(IDPlasmaCannon); break; case 20:game->aircontrol=LongToFloat(p2); mustsend=TRUE; break; case 21:game->damage=LongToFloat(p2); mustsend=TRUE; break; case 22:game->gravity=LongToFloat(p2); mustsend=TRUE; break; case 23:game->jumpspeed=LongToFloat(p2); mustsend=TRUE; break; case 24:game->plasmarate=LongToFloat(p2); mustsend=TRUE; break; case 25:game->plasmaregeneration=LongToFloat(p2); mustsend=TRUE; break; case 26:game->replenishpower=LongToFloat(p2); mustsend=TRUE; break; case 27:game->sittime=LongToFloat(p2); mustsend=TRUE; break; case 28:game->takepower=LongToFloat(p2); mustsend=TRUE; break; case 29:game->throwtime=LongToFloat(p2); mustsend=TRUE; break; case 30:game->respawntime=LongToFloat(p2); mustsend=TRUE; break; case 50:Config.KI=p2; mustsend=TRUE; break; case 51:game->PlasmaBallPressure=p2; mustsend=TRUE; break; } InvalidateAll(); }
void TestZoneCurveGridCtrl::ResetTestZoneCurveGrid() { // start with a clean slate sequence.SequenceCleanup(); // set type strings curveTypeStrings.Alloc(6); curveTypeMap.Alloc(6); // always valid curveTypeStrings += "Pressure"; curveTypeMap += TestZoneCurve::tzPressure; curveTypeStrings += "Flow"; curveTypeMap += TestZoneCurve::tzFlowRate; if (testZoneTemperatureVaries && control.IsLiquid()) { curveTypeStrings += "Temperature"; curveTypeMap += TestZoneCurve::tzTemperature; } if (testZoneCompressibilityVaries && control.IsLiquid()) { curveTypeStrings += "Compressibility"; curveTypeMap += TestZoneCurve::tzCompressibility; } if (testZoneVolumeVaries) { curveTypeStrings += "Volume Change"; curveTypeMap += TestZoneCurve::tzDeltaVolume; curveTypeStrings += "Volume"; curveTypeMap += TestZoneCurve::tzAbsVolume; } // curve file desigs if (control.UseCurveFiles()) { nsCurveFileStatics::testZoneBCCurveFile.GetIDs(curveFileDesigStrings); } else { curveFOOK = AppMenuC::GetFuncObjList(typeid(DO_Curve), curveFOStrings, curveFOData, " "); } // and sequences sequence.GetSequenceIDs(sequenceDesigStrings); // make sure there are 20 blanks testZoneCurves.ReAlloc(testZoneCurves.Size() + 20); SetRowCount(testZoneCurves.AllocSize() + 1); SetColCount(6); SetCenteredText(0, 1, "Type" ); if (control.UseCurveFiles()) SetCenteredText(0, 2, "Curve ID" ); else SetCenteredText(0, 2, "Curve Object" ); SetCenteredText(0, 3, "Start Sequence" ); SetCenteredText(0, 4, "End Sequence" ); SetCenteredText(0, 5, "Curve Data" ); CString sRowHeader; for (int i = 0; i < testZoneCurves.AllocSize(); i++) { int row = i + 1; sRowHeader.Format("%d", row); SetCenteredText(row, 0, sRowHeader ); SetCell(row, 1, new CurveTypeGridCell(i)); if (control.UseCurveFiles()) SetCell(row, 2, new CurveDesigGridCell(i)); else SetCell(row, 2, new CurveFOGridCell(i)); SetCell(row, 3, new StartSequenceDesigGridCell(i)); SetCell(row, 4, new EndSequenceDesigGridCell(i)); SetCell(row, 5, new TZDataGridCell(i)); // reset all data for (int j = 1; j < 6; j++) ResetCell(i + 1, j); } SetEditMode(); SetBorderThickness(4); AutoSize(); for (int j = 1; j < 6; j++) SetColSize(j, GetColSize(j) + 15); InvalidateAll(); }
void DataCaptureGridCtrl::ResetDataCaptureGrid() { // start with a clean slate dataCapture.DataCaptureCleanup(); // set type strings captureTypeStrings.Alloc(5); // always valid captureTypeStrings += "Pressure"; captureTypeStrings += "Flow"; captureTypeStrings += "Production"; if (!control.IsGas()) captureTypeStrings += "Test Zone"; if (control.IsUnconfined()) captureTypeStrings += "Water Table"; pressureCapTypeStrings.Alloc(3); pressureCapTypeStrings += "Test Zone"; pressureCapTypeStrings += "Observation Well"; pressureCapTypeStrings += "Superposition"; flowCapTypeStrings.Alloc(4); flowCapTypeStrings += "Well"; flowCapTypeStrings += "Formation"; flowCapTypeStrings += "Test Zone"; flowCapTypeStrings += "Wellbore Storage"; productionCapTypeStrings.Alloc(4); productionCapTypeStrings += "Well"; productionCapTypeStrings += "Formation"; productionCapTypeStrings += "Test Zone"; productionCapTypeStrings += "Wellbore Storage"; testZoneCapTypeStrings.Alloc(3); testZoneCapTypeStrings += "TZ Temp."; testZoneCapTypeStrings += "TZ Comp."; testZoneCapTypeStrings += "TZ Volume"; waterTableCapTypeStrings.Alloc(1); waterTableCapTypeStrings += "Observation Well"; int maxCol = 6; if (control.IsLayered()) { maxCol++; wellboreZoneStrings.Alloc(layerSpec.GetNWellboreZone()); for (int i = 0; i < wellBoreZones.Size(); i++) { const WellBoreZone& currZone = wellBoreZones[i]; if (!currZone.zoneIsPacker) wellboreZoneStrings += currZone.intervalID; } } if (control.Is1DRadial()) maxCol++; // make sure there are 20 blanks dataCaptureData.ReAlloc(dataCaptureData.Size() + 20); SetRowCount(dataCaptureData.AllocSize() + 1); SetColCount(maxCol); SetCenteredText(0, 1, "Well ID" ); SetCenteredText(0, 2, "Output Type" ); SetCenteredText(0, 3, "Sub-Type" ); int nextCol = 4; if (control.IsLayered()) SetCenteredText(0, nextCol++, "Wellbore Zone" ); SetCenteredText(0, nextCol++, "Radius" ); if (control.Is1DRadial()) SetCenteredText(0, nextCol++, "RadiusUnits" ); SetCenteredText(0, nextCol++, "Output Units" ); CString sRowHeader; for (int i = 0; i < dataCaptureData.AllocSize(); i++) { int row = i + 1; sRowHeader.Format("%d", row); SetCenteredText(row, 0, sRowHeader ); SetCell(row, 1, new DcapDesigGridCell(i)); SetCell(row, 2, new CaptureTypeGridCell(i)); SetCell(row, 3, new CaptureSubTypeGridCell(i)); nextCol = 4; if (control.IsLayered()) SetCell(row, nextCol++, new DcapWellboreZoneDesigGridCell(i)); SetCell(row, nextCol++, new DataCaptureRadiusGridCell(i)); if (control.Is1DRadial()) SetCell(row, nextCol++, new RadUnitsGridCell(i)); SetCell(row, nextCol++, new OutputUnitsGridCell(i)); // reset all data for (int j = 1; j < maxCol; j++) ResetCell(i + 1, j); } SetEditMode(); SetBorderThickness(4); AutoSize(); for (int j = 1; j < maxCol; j++) SetColSize(j, GetColSize(j) + 15); InvalidateAll(); }
RasterizerCacheOpenGL::~RasterizerCacheOpenGL() { InvalidateAll(); }