- m_parentTop = parent;
- while ( m_parentTop && m_parentTop->GetParent() )
- m_parentTop = m_parentTop->GetParent();
-
- 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);
-
- SetAutoLayout(TRUE);
- Layout();
-
- wxSize sizeDlg (500,500);
- if (sizeDlg.x != sizeDlg.y) {
- sizeDlg.x = max(sizeDlg.x,sizeDlg.y);
- sizeDlg.y = max(sizeDlg.x,sizeDlg.y);
- }
-
- 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_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);
- m_pSGP->setTextPointSize(10);
- m_pEZPlot = new EZPlot;
-
-#ifdef __WXMAC__
- MacUpdateImmediately();
-#endif
+ Create(parent, id, pos, size, style, name);
+
+ SetSize (GetBestSize());
+
+ m_pEZPlot = new EZPlot;