+#if wxUSE_COLLPANE
+void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
+ const wxString& text)
+{
+ wxCollapsiblePane *pane = new wxCollapsiblePane(this, wxID_ANY, title);
+ wxWindow * const paneContents = pane->GetPane();
+ wxStaticText *txt = new wxStaticText(paneContents, wxID_ANY, text,
+ wxDefaultPosition, wxDefaultSize,
+ wxALIGN_CENTRE);
+
+ // don't make the text unreasonably wide
+ static const int maxWidth = wxGetDisplaySize().x/3;
+ txt->Wrap(maxWidth);
+
+
+ // we need a sizer to make this text expand to fill the entire pane area
+ wxSizer * const sizerPane = new wxBoxSizer(wxHORIZONTAL);
+ sizerPane->Add(txt, wxSizerFlags(1).Expand());
+ paneContents->SetSizer(sizerPane);
+
+ // NB: all the wxCollapsiblePanes must be added with a null proportion value
+ m_sizerText->Add(pane, wxSizerFlags(0).Expand().Border(wxBOTTOM));
+}
+#endif
+
+#if !wxUSE_MODAL_ABOUT_DIALOG
+
+void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
+{
+ Destroy();
+
+ event.Skip();
+}
+
+void wxGenericAboutDialog::OnOK(wxCommandEvent& WXUNUSED(event))
+{
+ // By default a modeless dialog would be just hidden, destroy this one
+ // instead.
+ Destroy();
+}
+
+#endif // !wxUSE_MODAL_ABOUT_DIALOG
+