]> git.saurik.com Git - wxWidgets.git/blame - src/msw/aboutdlg.cpp
Fixed wxscintilla compilation for wxDFB.
[wxWidgets.git] / src / msw / aboutdlg.cpp
CommitLineData
ca7adbf8
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: src/msw/aboutdlg.cpp
3// Purpose: implementation of wxAboutBox() for wxMSW
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// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19// for compilers that support precompilation, includes "wx.h".
20#include "wx/wxprec.h"
21
22#ifdef __BORLANDC__
23 #pragma hdrstop
24#endif
25
26#if wxUSE_ABOUTDLG
27
28#ifndef WX_PRECOMP
a01446c5 29 #include "wx/msgdlg.h"
ca7adbf8
VZ
30#endif //WX_PRECOMP
31
32#include "wx/aboutdlg.h"
33#include "wx/generic/aboutdlgg.h"
34
35// ============================================================================
36// implementation
37// ============================================================================
38
ca7adbf8 39// our public entry point
c173e541 40void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent)
ca7adbf8
VZ
41{
42 // we prefer to show a simple message box if we don't have any fields which
43 // can't be shown in it because as much as there is a standard about box
44 // under MSW at all, this is it
fd3f8f5c 45 if ( info.IsSimple() )
ca7adbf8
VZ
46 {
47 // build the text to show in the box
48 const wxString name = info.GetName();
49 wxString msg;
50 msg << name;
51 if ( info.HasVersion() )
fd3a0ca9 52 {
9a83f860 53 msg << wxT('\n');
704006b3 54 msg << info.GetLongVersion();
fd3a0ca9
VS
55 }
56
9a83f860 57 msg << wxT("\n\n");
ca7adbf8
VZ
58
59 if ( info.HasCopyright() )
9a83f860 60 msg << info.GetCopyrightToDisplay() << wxT('\n');
ca7adbf8 61
fd3f8f5c
VZ
62 // add everything remaining
63 msg << info.GetDescriptionAndCredits();
ca7adbf8 64
a23a0a45 65 wxMessageBox(msg, wxString::Format(_("About %s"), name), wxOK | wxCENTRE, parent);
ca7adbf8 66 }
fd3f8f5c
VZ
67 else // simple "native" version is not enough
68 {
69 // we need to use the full-blown generic version
c173e541 70 wxGenericAboutBox(info, parent);
fd3f8f5c 71 }
ca7adbf8
VZ
72}
73
74#endif // wxUSE_ABOUTDLG