]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/wizard.cpp
Borland has only lfind
[wxWidgets.git] / src / generic / wizard.cpp
index 7973669650b96a1a9386a182b6a64916420ea768..c3d603509ed8f57dc2c804e26aabefa785eba192 100644 (file)
@@ -125,31 +125,17 @@ void wxWizardPage::Init()
 }
 
 wxWizardPage::wxWizardPage(wxWizard *parent,
-                           const wxBitmap& bitmap,
-                           const wxChar *resource)
+                           const wxBitmap& bitmap)
 {
-    Create(parent, bitmap, resource);
+    Create(parent, bitmap);
 }
 
 bool wxWizardPage::Create(wxWizard *parent,
-                          const wxBitmap& bitmap,
-                          const wxChar *resource)
+                          const wxBitmap& bitmap)
 {
     if ( !wxPanel::Create(parent, wxID_ANY) )
         return false;
 
-    if ( resource != NULL )
-    {
-#if wxUSE_WX_RESOURCES
-#if 0
-       if ( !LoadFromResource(this, resource) )
-        {
-            wxFAIL_MSG(wxT("wxWizardPage LoadFromResource failed!!!!"));
-        }
-#endif
-#endif // wxUSE_RESOURCES
-    }
-
     m_bitmap = bitmap;
 
     // initially the page is hidden, it's shown only when it becomes current
@@ -326,6 +312,15 @@ bool wxWizard::Create(wxWindow *parent,
     return result;
 }
 
+wxWizard::~wxWizard()
+{
+    // normally we don't have to delete this sizer as it's deleted by the
+    // associated window but if we never used it or didn't set it as the window
+    // sizer yet, do delete it manually
+    if ( !m_usingSizer || !m_started )
+        delete m_sizerPage;
+}
+
 void wxWizard::AddBitmapRow(wxBoxSizer *mainColumn)
 {
     m_sizerBmpAndPage = new wxBoxSizer(wxHORIZONTAL);
@@ -848,6 +843,13 @@ void wxWizard::OnWizEvent(wxWizardEvent& event)
     }
 }
 
+void wxWizard::SetBitmap(const wxBitmap& bitmap)
+{
+    m_bitmap = bitmap;
+    if (m_statbmp)
+        m_statbmp->SetBitmap(m_bitmap);
+}
+
 // ----------------------------------------------------------------------------
 // wxWizardEvent
 // ----------------------------------------------------------------------------