X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca7adbf8bc5df4932deebb653060dc220ff4c06e..4f2511d706e5274a34e1521e11c1b95fed735b42:/include/wx/generic/aboutdlgg.h diff --git a/include/wx/generic/aboutdlgg.h b/include/wx/generic/aboutdlgg.h index d5bf6f8b69..c275ed7ba7 100644 --- a/include/wx/generic/aboutdlgg.h +++ b/include/wx/generic/aboutdlgg.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/aboutdlgg.h -// Purpose: generic wxAboutDialog implementation +// Purpose: generic wxAboutBox() implementation // Author: Vadim Zeitlin // Created: 2006-10-07 // RCS-ID: $Id$ @@ -17,24 +17,25 @@ #include "wx/dialog.h" -class WXDLLIMPEXP_CORE wxAboutDialogInfo; -class WXDLLIMPEXP_CORE wxSizer; +class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo; +class WXDLLIMPEXP_FWD_CORE wxSizer; +class WXDLLIMPEXP_FWD_CORE wxSizerFlags; // ---------------------------------------------------------------------------- -// wxAboutDialog: generic "About" dialog implementation +// wxGenericAboutDialog: generic "About" dialog implementation // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxAboutDialog : public wxDialog +class WXDLLIMPEXP_ADV wxGenericAboutDialog : public wxDialog { public: // constructors and Create() method // -------------------------------- // default ctor, you must use Create() to really initialize the dialog - wxAboutDialog() { Init(); } + wxGenericAboutDialog() { Init(); } // ctor which fully initializes the object - wxAboutDialog(const wxAboutDialogInfo& info) + wxGenericAboutDialog(const wxAboutDialogInfo& info) { Init(); @@ -45,22 +46,40 @@ public: bool Create(const wxAboutDialogInfo& info); protected: - // common part of all ctors - void Init() { m_sizerText = NULL; } - - // add arbitrary control to the text sizer contents + // this virtual method may be overridden to add some more controls to the + // dialog + // + // notice that for this to work you must call Create() from the derived + // class ctor and not use the base class ctor directly as otherwise the + // virtual function of the derived class wouldn't be called + virtual void DoAddCustomControls() { } + + // add arbitrary control to the text sizer contents with the specified + // flags + void AddControl(wxWindow *win, const wxSizerFlags& flags); + + // add arbitrary control to the text sizer contents and center it void AddControl(wxWindow *win); // 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; } + wxSizer *m_sizerText; }; // unlike wxAboutBox which can show either the native or generic about dialog, // this function always shows the generic one -WXDLLIMPEXP_CORE void wxGenericAboutBox(const wxAboutDialogInfo& info); +WXDLLIMPEXP_ADV void wxGenericAboutBox(const wxAboutDialogInfo& info); #endif // wxUSE_ABOUTDLG