@@ -44,9 +44,9 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
4444#pragma endregion
4545
4646#pragma region ToolBar: Buttons(Start, Fill Ink, Clean), Combobox(processingBox)
47- wxToolBar *toolbar1 = new wxToolBar ( this , wxID_ANY );
48- start = new wxButton (toolbar1, BUTTON_Start, _T (" Start" ), wxDefaultPosition, wxDefaultSize , 0 );
49- clean = new wxButton (toolbar1, BUTTON_Clean, _T (" Clean" ), wxDefaultPosition, wxDefaultSize , 0 );
47+ wxToolBar *toolbar1 = CreateToolBar ( );
48+ start = new wxButton (toolbar1, BUTTON_Start, _T (" Start" ), wxDefaultPosition, wxSize ( 100 , 40 ) , 0 );
49+ clean = new wxButton (toolbar1, BUTTON_Clean, _T (" Clean" ), wxDefaultPosition, wxSize ( 100 , 40 ) , 0 );
5050
5151 processingBox = new wxComboBox (toolbar1, COMBOBOX_Processing, " Original Image" , wxDefaultPosition, wxSize (200 , 20 ), 0 );
5252 processingBox->Append (" Original Image" );
@@ -214,7 +214,8 @@ void MyFrame::OnOpenSrc(wxCommandEvent& event) {
214214 dp->SetMinSize (img);
215215 this ->Layout ();
216216
217- drawPane->paintNow (true );
217+ render_loop_on = true ;
218+ activateRenderLoop (render_loop_on);
218219}
219220
220221void MyFrame::OnSaveResult (wxCommandEvent& event) {
@@ -288,7 +289,7 @@ void MyFrame::OnIterativeFDoG(wxCommandEvent& event) {
288289
289290// Comboboxes
290291void MyFrame::OnProcessingBox (wxCommandEvent& event) {
291- string s = processingBox->GetValue ();
292+ wxString s = processingBox->GetValue ();
292293 drawPane->processingS = s;
293294
294295 if (s == " ETF" || s==" ETF-debug" ) {
@@ -359,7 +360,7 @@ void MyFrame::OnSliderTau(wxCommandEvent& event) {
359360 drawPane->paintNow (true ); // execute action
360361}
361362
362- void MyFrame::addlog (wxString info, wxColour& color) {
363+ void MyFrame::addlog (wxString info, const wxColour& color) {
363364 time_t currentTime;// for logging current time
364365 struct tm *localTime;// for logging current time
365366 time (¤tTime); // Get the current time
@@ -445,4 +446,4 @@ void BasicDrawPane::render(wxDC& dc, bool render_loop_on) {
445446 wxBitmap bmp (img);
446447 dc.DrawBitmap (bmp, 0 , 0 );
447448}
448- #pragma endregion
449+ #pragma endregion
0 commit comments