@@ -199,7 +199,7 @@ void MyFrame::OnToggleLog(wxCommandEvent &event)
199199void MyFrame::OnOpenSrc (wxCommandEvent &event)
200200{
201201 render_loop_on = false ;
202- activateRenderLoop (render_loop_on);
202+ SetRenderingState (render_loop_on);
203203 wxFileDialog openFileDialog (this , _ (" Open image file" ), " " , " " , " image files (*.bmp;*.png;*.jpg)|*.bmp;*.png;*.jpg" ,
204204 wxFD_OPEN | wxFD_FILE_MUST_EXIST);
205205 wxString s;
@@ -231,7 +231,7 @@ void MyFrame::OnOpenSrc(wxCommandEvent &event)
231231 this ->Layout ();
232232
233233 render_loop_on = true ;
234- activateRenderLoop (render_loop_on);
234+ SetRenderingState (render_loop_on);
235235 ETF_iteration = FDoG_iteration = 0 ;
236236 s.Printf (" ETF: %d iterations" , ETF_iteration);
237237 SetStatusText (s, 1 );
@@ -261,7 +261,7 @@ void MyFrame::OnSaveResult(wxCommandEvent &event)
261261void MyFrame::OnStart (wxCommandEvent &event)
262262{
263263 render_loop_on = !render_loop_on;
264- activateRenderLoop (render_loop_on);
264+ SetRenderingState (render_loop_on);
265265}
266266
267267void MyFrame::OnClean (wxCommandEvent &event)
@@ -333,7 +333,7 @@ void MyFrame::OnProcessingBox(wxCommandEvent &event)
333333
334334 addlog (" [Mode Changed] " + s, wxColour (*wxBLACK));
335335 drawPane->render ();
336- activateRenderLoop (render_loop_on);
336+ SetRenderingState (render_loop_on);
337337}
338338
339339// Slides: Pattern Parameter
@@ -401,23 +401,23 @@ void MyFrame::addlog(wxString info, const wxColour &color)
401401 log->AppendText (s);
402402}
403403
404- void MyFrame::activateRenderLoop (bool on)
404+ void MyFrame::SetRenderingState (bool on)
405405{
406406 if (on) {
407407 start->SetLabel (" Stop" );
408- Connect (wxID_ANY, wxEVT_IDLE, wxIdleEventHandler (MyFrame::onIdle ));
408+ Connect (wxID_ANY, wxEVT_IDLE, wxIdleEventHandler (MyFrame::OnIdle ));
409409 render_loop_on = true ;
410410 addlog (" -------Start iteration-------" , wxColour (*wxBLACK));
411411 return ;
412412 }
413413
414414 start->SetLabel (" Start" );
415- Disconnect (wxEVT_IDLE, wxIdleEventHandler (MyFrame::onIdle ));
415+ Disconnect (wxEVT_IDLE, wxIdleEventHandler (MyFrame::OnIdle ));
416416 render_loop_on = false ;
417417 addlog (" -------Stop iteration-------" , wxColour (*wxBLACK));
418418}
419419
420- void MyFrame::onIdle (wxIdleEvent &evt)
420+ void MyFrame::OnIdle (wxIdleEvent &evt)
421421{
422422 if (!render_loop_on) return ;
423423 drawPane->render ();
0 commit comments