]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/aboutdlgg.h
initial implementation of wxAboutBox()
[wxWidgets.git] / include / wx / generic / aboutdlgg.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/aboutdlgg.h
3 // Purpose: generic wxAboutDialog implementation
4 // Author: Vadim Zeitlin
5 // Created: 2006-10-07
6 // RCS-ID: $Id$
7 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_GENERIC_ABOUTDLGG_H_
12 #define _WX_GENERIC_ABOUTDLGG_H_
13
14 #include "wx/defs.h"
15
16 #if wxUSE_ABOUTDLG
17
18 #include "wx/dialog.h"
19
20 class WXDLLIMPEXP_CORE wxAboutDialogInfo;
21 class WXDLLIMPEXP_CORE wxSizer;
22
23 // ----------------------------------------------------------------------------
24 // wxAboutDialog: generic "About" dialog implementation
25 // ----------------------------------------------------------------------------
26
27 class WXDLLIMPEXP_CORE wxAboutDialog : public wxDialog
28 {
29 public:
30 // constructors and Create() method
31 // --------------------------------
32
33 // default ctor, you must use Create() to really initialize the dialog
34 wxAboutDialog() { Init(); }
35
36 // ctor which fully initializes the object
37 wxAboutDialog(const wxAboutDialogInfo& info)
38 {
39 Init();
40
41 (void)Create(info);
42 }
43
44 // this method must be called if and only if the default ctor was used
45 bool Create(const wxAboutDialogInfo& info);
46
47 protected:
48 // common part of all ctors
49 void Init() { m_sizerText = NULL; }
50
51 // add arbitrary control to the text sizer contents
52 void AddControl(wxWindow *win);
53
54 // add the text, if it's not empty, to the text sizer contents
55 void AddText(const wxString& text);
56
57
58 wxSizer *m_sizerText;
59 };
60
61 // unlike wxAboutBox which can show either the native or generic about dialog,
62 // this function always shows the generic one
63 WXDLLIMPEXP_CORE void wxGenericAboutBox(const wxAboutDialogInfo& info);
64
65 #endif // wxUSE_ABOUTDLG
66
67 #endif // _WX_GENERIC_ABOUTDLGG_H_
68