X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b85db900cdc04cd70dfa940c7d99469f7f4c2b41..661698e54f2bc599dc1a961ffbae08ccdd6b9b97:/include/wx/generic/aboutdlgg.h diff --git a/include/wx/generic/aboutdlgg.h b/include/wx/generic/aboutdlgg.h index 421fbe452b..9ad4a77e41 100644 --- a/include/wx/generic/aboutdlgg.h +++ b/include/wx/generic/aboutdlgg.h @@ -17,9 +17,19 @@ #include "wx/dialog.h" -class WXDLLIMPEXP_ADV wxAboutDialogInfo; -class WXDLLIMPEXP_CORE wxSizer; -class WXDLLIMPEXP_CORE wxSizerFlags; +class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo; +class WXDLLIMPEXP_FWD_CORE wxSizer; +class WXDLLIMPEXP_FWD_CORE wxSizerFlags; + +// Under GTK and OS X "About" dialogs are not supposed to be modal, unlike MSW +// and, presumably, all the other platforms. +#ifndef wxUSE_MODAL_ABOUT_DIALOG + #if defined(__WXGTK__) || defined(__WXMAC__) + #define wxUSE_MODAL_ABOUT_DIALOG 0 + #else + #define wxUSE_MODAL_ABOUT_DIALOG 1 + #endif +#endif // wxUSE_MODAL_ABOUT_DIALOG not defined // ---------------------------------------------------------------------------- // wxGenericAboutDialog: generic "About" dialog implementation @@ -35,15 +45,15 @@ public: wxGenericAboutDialog() { Init(); } // ctor which fully initializes the object - wxGenericAboutDialog(const wxAboutDialogInfo& info) + wxGenericAboutDialog(const wxAboutDialogInfo& info, wxWindow* parent = NULL) { Init(); - (void)Create(info); + (void)Create(info, parent); } // this method must be called if and only if the default ctor was used - bool Create(const wxAboutDialogInfo& info); + bool Create(const wxAboutDialogInfo& info, wxWindow* parent = NULL); protected: // this virtual method may be overridden to add some more controls to the @@ -64,17 +74,28 @@ protected: // add the text, if it's not empty, to the text sizer contents void AddText(const wxString& text); +#if wxUSE_COLLPANE + // add a wxCollapsiblePane containing the given text + void AddCollapsiblePane(const wxString& title, const wxString& text); +#endif // wxUSE_COLLPANE + private: // common part of all ctors void Init() { m_sizerText = NULL; } +#if !wxUSE_MODAL_ABOUT_DIALOG + // An explicit handler for deleting the dialog when it's closed is needed + // when we show it non-modally. + void OnCloseWindow(wxCloseEvent& event); + void OnOK(wxCommandEvent& event); +#endif // !wxUSE_MODAL_ABOUT_DIALOG wxSizer *m_sizerText; }; // unlike wxAboutBox which can show either the native or generic about dialog, // this function always shows the generic one -WXDLLIMPEXP_ADV void wxGenericAboutBox(const wxAboutDialogInfo& info); +WXDLLIMPEXP_ADV void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); #endif // wxUSE_ABOUTDLG