void CWinNfsGraphView::OnToggleLegend(void) { bool bIsDrawLegend = GetDocument()->GetDrawManager()->IsDrawLegend(); bIsDrawLegend = !bIsDrawLegend; GetDocument()->GetDrawManager()->SetDrawLegend(bIsDrawLegend); RedrawGraph(); }
void CWinNfsGraphView::OnYaxisZoomOut(void) { MAG_LEVEL eLevel; eLevel = (MAG_LEVEL)((LONG)GetDocument()->GetNfsGraphManager()->GetMagY() + 1); if(eLevel == ML_MAXOFLEVEL) return; GetDocument()->GetNfsGraphManager()->SetMagY((MAG_LEVEL)eLevel); RedrawGraph(); }
void CWinNfsGraphView::OnToggleGraphType(void) { GRAPH_TYPE eGraphType = GetDocument()->GetNfsGraphManager()->GetGraphType(); if(eGraphType == GT_LINE) eGraphType = GT_BAR; else if(eGraphType == GT_BAR) eGraphType = GT_LINE; GetDocument()->GetNfsGraphManager()->SetGraphType((GRAPH_TYPE)eGraphType); RedrawGraph(); }
void CWinNfsGraphView::OnYaxisZoomIn(void) { MAG_LEVEL eLevel; eLevel = GetDocument()->GetNfsGraphManager()->GetMagY(); if(eLevel == ML_10x) return; eLevel = (MAG_LEVEL)((LONG)eLevel - 1); GetDocument()->GetNfsGraphManager()->SetMagY((MAG_LEVEL)eLevel); RedrawGraph(); }
void CGraphs::SetGraphRange(UINT nRange) { nRange = max(nRange, 1); m_nGraphScale = 0; while (nRange > 0xFFFF) { m_nGraphScale++; nRange /= m_nGraphScale * 1000; } ASSERT(nRange < 0xFFFF); m_nGraphRange = nRange; RedrawGraph(); }
void CWinNfsGraphView::OnTimer(UINT_PTR nIDEvent) { static bool bStartTimer = false; if(nIDEvent == REDRAW_TIMER_ID && bStartTimer == false) { bStartTimer = true; if(m_ptMousePoint != m_ptChangedMousePoint) { RedrawGraph(); m_ptMousePoint = m_ptChangedMousePoint; } bStartTimer = false; } CView::OnTimer(nIDEvent); }
void CWinNfsGraphView::OnMoveZeroY(void) { GetDocument()->GetDrawManager()->ScrollZeroY(); RedrawGraph(); }
void CWinNfsGraphView::OnMoveDown(void) { GetDocument()->GetDrawManager()->Scroll(0, 400); RedrawGraph(); }
void CWinNfsGraphView::OnMoveRight(void) { GetDocument()->GetDrawManager()->Scroll(-800, 0); RedrawGraph(); }