- m_state = Continue;
- m_iLastView = -1;
- m_parentTop = parent;
- while ( m_parentTop && m_parentTop->GetParent() )
- m_parentTop = m_parentTop->GetParent();
-
- m_btnAbort = new wxButton(this, wxID_CANCEL, _("Cancel"));
- wxLayoutConstraints* c = new wxLayoutConstraints;
- c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
- c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
-
- wxSize sizeBtn = wxButton::GetDefaultSize();
- c->width.Absolute(sizeBtn.x);
- c->height.Absolute(sizeBtn.y);
-
- m_btnAbort->SetConstraints(c);
-
- m_btnPause = new wxButton (this, ID_BTN_PAUSE, wxString("Pause"));
- wxLayoutConstraints* cPause = new wxLayoutConstraints;
- cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
- cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
- cPause->width.Absolute(sizeBtn.x);
- cPause->height.Absolute(sizeBtn.y);
- m_btnPause->SetConstraints(cPause);
-
- m_btnStep = new wxButton (this, ID_BTN_STEP, wxString("Step"));
- wxLayoutConstraints* cStep = new wxLayoutConstraints;
- cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
- cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
- cStep->width.Absolute(sizeBtn.x);
- cStep->height.Absolute(sizeBtn.y);
- m_btnStep->SetConstraints(cStep);
-
- SetAutoLayout(TRUE);
- Layout();
-
- wxSize sizeDlg (250,250);
- if (sizeDlg.x != sizeDlg.y) {
- sizeDlg.x = max(sizeDlg.x,sizeDlg.y);
- sizeDlg.y = max(sizeDlg.x,sizeDlg.y);
- }
- if (m_iTrace >= Trace::TRACE_PLOT)
- sizeDlg.x += 250;
-
- m_iClientX = sizeDlg.x;
- m_iClientY = sizeDlg.y;
- SetClientSize(sizeDlg);
-
- Centre(wxCENTER_FRAME | wxBOTH);
-
- if ( m_parentTop )
- m_parentTop->Enable(FALSE);
-
- Show(TRUE);
- Enable(TRUE); // enable this window
-
- m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen
- m_pDC = dynamic_cast<wxDC*> (new wxClientDC (this));
- int x, y;
- this->GetClientSize(&x, &y);
- m_pSGPDriver = new SGPDriver (m_pDC, x, y);
- m_pSGP = new SGP (*m_pSGPDriver);
-
- wxYield(); // Update the display
-
- m_pSGP->setTextPointSize(10);
+ m_state = Continue;
+ m_iLastView = -1;
+ m_parentTop = parent;
+ while ( m_parentTop && m_parentTop->GetParent() )
+ m_parentTop = m_parentTop->GetParent();
+
+ m_btnAbort = new wxButton(this, wxID_CANCEL, _("Cancel"));
+ wxLayoutConstraints* c = new wxLayoutConstraints;
+ c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
+ c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
+
+ wxSize sizeBtn = wxButton::GetDefaultSize();
+ c->width.Absolute(sizeBtn.x);
+ c->height.Absolute(sizeBtn.y);
+
+ m_btnAbort->SetConstraints(c);
+
+ m_btnPause = new wxButton (this, ID_BTN_PAUSE, _T("Pause"));
+ wxLayoutConstraints* cPause = new wxLayoutConstraints;
+ cPause->right.SameAs(this, wxRight, 3*LAYOUT_X_MARGIN + sizeBtn.x);
+ cPause->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
+ cPause->width.Absolute(sizeBtn.x);
+ cPause->height.Absolute(sizeBtn.y);
+ m_btnPause->SetConstraints(cPause);
+
+ m_btnStep = new wxButton (this, ID_BTN_STEP, _T("Step"));
+ wxLayoutConstraints* cStep = new wxLayoutConstraints;
+ cStep->right.SameAs(this, wxRight, 5*LAYOUT_X_MARGIN + sizeBtn.x * 2);
+ cStep->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN);
+ cStep->width.Absolute(sizeBtn.x);
+ cStep->height.Absolute(sizeBtn.y);
+ m_btnStep->SetConstraints(cStep);
+
+ SetAutoLayout(TRUE);
+ Layout();
+
+ wxSize sizeDlg (500,500);
+ if (sizeDlg.x != sizeDlg.y) {
+ sizeDlg.x = imax(sizeDlg.x,sizeDlg.y);
+ sizeDlg.y = imax(sizeDlg.x,sizeDlg.y);
+ }
+ if (m_iTrace >= Trace::TRACE_PLOT)
+ sizeDlg.x += 250;
+
+ m_iClientX = sizeDlg.x;
+ m_iClientY = sizeDlg.y;
+ SetClientSize(sizeDlg);
+
+ Centre(wxCENTER_FRAME | wxBOTH);
+
+ if ( m_parentTop )
+ m_parentTop->Enable(FALSE);
+
+ Show(TRUE);
+ Enable(TRUE); // enable this window
+
+ m_bitmap.Create (m_iClientX, m_iClientY); // save a copy of screen
+ m_pDC = dynamic_cast<wxDC*> (new wxClientDC (this));
+ int x, y;
+ this->GetClientSize(&x, &y);
+ m_pSGPDriver = new SGPDriver (m_pDC, x, y);
+ m_pSGP = new SGP (*m_pSGPDriver);
+
+ wxYield(); // Update the display
+
+ m_pSGP->setTextPointSize(10);