+void wxPlotWindow::Move( wxPlotCurve* curve, int pixels_up )
+{
+ m_area->DeleteCurve( curve );
+
+ curve->SetOffsetY( curve->GetOffsetY() + pixels_up );
+
+ m_area->Refresh( FALSE );
+
+ RedrawYAxis();
+}
+
+void wxPlotWindow::OnMoveUp( wxCommandEvent& WXUNUSED(event) )
+{
+ if (!m_current) return;
+
+ Move( m_current, 25 );
+}
+
+void wxPlotWindow::OnMoveDown( wxCommandEvent& WXUNUSED(event) )
+{
+ if (!m_current) return;
+
+ Move( m_current, -25 );
+}
+
+void wxPlotWindow::Enlarge( wxPlotCurve *curve, double factor )
+{
+ m_area->DeleteCurve( curve );
+
+ double range = curve->GetEndY() - curve->GetStartY();
+ double new_range = range * factor;
+ double middle = curve->GetEndY() - range/2;
+ curve->SetStartY( middle - new_range / 2 );
+ curve->SetEndY( middle + new_range / 2 );
+
+ m_area->Refresh( FALSE );
+
+ RedrawYAxis();
+}
+
+void wxPlotWindow::OnEnlarge100( wxCommandEvent& WXUNUSED(event) )
+{
+ if (!m_current) return;
+
+ Enlarge( m_current, 2.0 );
+}
+
+void wxPlotWindow::OnEnlarge50( wxCommandEvent& WXUNUSED(event) )
+{
+ if (!m_current) return;
+
+ Enlarge( m_current, 1.5 );
+}
+
+void wxPlotWindow::OnShrink50( wxCommandEvent& WXUNUSED(event) )
+{
+ if (!m_current) return;
+
+ Enlarge( m_current, 0.5 );
+}
+
+void wxPlotWindow::OnShrink33( wxCommandEvent& WXUNUSED(event) )
+{
+ if (!m_current) return;
+
+ Enlarge( m_current, 0.6666666 );
+}
+
+void wxPlotWindow::RedrawYAxis()
+{
+ int client_width;
+ int client_height;
+ GetClientSize( &client_width, &client_height);
+
+ wxPoint pos( m_area->GetPosition() );
+
+ wxRect rect(pos.x-45,0,45,client_height);
+ Refresh(TRUE,&rect);
+}
+