+void GaugeWidgetsPage::StartTimer(wxButton *clicked)
+{
+ static const int INTERVAL = 300;
+
+ wxLogMessage(_T("Launched progress timer (interval = %d ms)"), INTERVAL);
+
+ m_timer = new wxTimer(this,
+ clicked->GetId() == GaugePage_Progress ? GaugePage_Timer : GaugePage_IndeterminateTimer);
+ m_timer->Start(INTERVAL);
+
+ clicked->SetLabel(_T("&Stop timer"));
+
+ if (clicked->GetId() == GaugePage_Progress)
+ FindWindow(GaugePage_IndeterminateProgress)->Disable();
+ else
+ FindWindow(GaugePage_Progress)->Disable();
+}
+
+void GaugeWidgetsPage::StopTimer(wxButton *clicked)
+{
+ wxCHECK_RET( m_timer, _T("shouldn't be called") );
+
+ m_timer->Stop();
+ delete m_timer;
+ m_timer = NULL;
+
+ if (clicked->GetId() == GaugePage_Progress)
+ {
+ clicked->SetLabel(_T("Simulate &progress"));
+ FindWindow(GaugePage_IndeterminateProgress)->Enable();
+ }
+ else
+ {
+ clicked->SetLabel(_T("Simulate undeterminate job"));
+ FindWindow(GaugePage_Progress)->Enable();
+ }
+
+ wxLogMessage(_T("Progress finished."));
+}
+