#include <wx/generic/aboutdlgg.h>
This class defines a customizable About dialog.
Note that if you don't need customization, you should use the global wxAboutBox() function that is both easier to use and shows the native dialog if available.
To use this class, you need to derive your own class from it and override the virtual method DoAddCustomControls().
To instantiate an object from your wxGenericAboutDialog-based class, you can use either the default constructor followed by a call to Create(), or directly using the alternate constructor. In either case, you have to prepare a wxAboutDialogInfo containing standard informations to display in an about-box.
Example of usage, MyAboutDlg being a class derived from wxGenericAboutDialog:
Public Member Functions | |
wxGenericAboutDialog () | |
Default constructor, Create() must be called later. | |
wxGenericAboutDialog (const wxAboutDialogInfo &info, wxWindow *parent=NULL) | |
Creates the dialog and initializes it with the given information. | |
bool | Create (const wxAboutDialogInfo &info, wxWindow *parent=NULL) |
Initializes the dialog created using the default constructor. | |
Protected Member Functions | |
virtual void | DoAddCustomControls () |
This virtual method may be overridden to add more controls to the dialog. | |
void | AddControl (wxWindow *win, const wxSizerFlags &flags) |
Add arbitrary control to the sizer content with the specified flags. | |
void | AddControl (wxWindow *win) |
Add arbitrary control to the sizer content and centre it. | |
void | AddText (const wxString &text) |
Add the given (not empty) text to the sizer content. | |
void | AddCollapsiblePane (const wxString &title, const wxString &text) |
Add a wxCollapsiblePane containing the given text. | |
wxGenericAboutDialog::wxGenericAboutDialog | ( | ) |
Default constructor, Create() must be called later.
wxGenericAboutDialog::wxGenericAboutDialog | ( | const wxAboutDialogInfo & | info, |
wxWindow * | parent = NULL |
||
) |
Creates the dialog and initializes it with the given information.
|
protected |
Add a wxCollapsiblePane containing the given text.
|
protected |
Add arbitrary control to the sizer content with the specified flags.
For example, here is how to add an expandable line with a border of 3 pixels, then a line of text:
|
protected |
Add arbitrary control to the sizer content and centre it.
|
protected |
Add the given (not empty) text to the sizer content.
bool wxGenericAboutDialog::Create | ( | const wxAboutDialogInfo & | info, |
wxWindow * | parent = NULL |
||
) |
Initializes the dialog created using the default constructor.
|
inlineprotectedvirtual |
This virtual method may be overridden to add more controls to the dialog.
Use the protected AddControl(), AddText() and AddCollapsiblePane() methods to add custom controls.
This method is called during the dialog creation and you don't need to call it, only to override it.