1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
|
/**********************************************************************
Audacity: A Digital Audio Editor
AboutDialog.cpp
Dominic Mazzoni
**********************************************************************/
#include "wx/dialog.h"
#include "wx/html/htmlwin.h"
#include "AboutDialog.h"
#include "Audacity.h"
#include "xpm/AudacityLogo.xpm"
#ifdef __WXMSW__
#define DLOG_HEIGHT 440
#else
#define DLOG_HEIGHT 410
#endif
const char *creditText =
"<html>"
"<body bgcolor=\"#eeeeee\">"
"<font size=1>"
"<center>"
"<h3>Audacity " AUDACITY_VERSION_STRING "</h3>"
"A New Digital Audio Editor"
"</center>"
"<p>"
"Audacity is a free program being written by a team of developers using "
"Sourceforge, an online service for open-source projects. "
"It is based on the wxWindows toolkit and is available for "
"Windows, MacOS, and Linux."
"<p>"
"This program is still in beta! Many people find it very useful "
"and stable enough for everyday use, but it is not finished and "
"comes with no guarantee! We depend on your feedback, so "
"please visit our website and give us your bug reports and "
"feature requests."
"<p>"
"http://audacity.sourceforge.net/"
"<p>"
"<center><b>Credits</b></center>"
"<p>"
"<table border=0>"
"<tr>"
"<td>Dominic Mazzoni</td>"
"<td>Project leader and primary programmer</td>"
"</tr>"
"<tr>"
"<td>Joshua Haberman</td>"
"<td>Preferences dialog, MP3 importing and exporting, and general development</td>"
"</tr>"
"<tr>"
"<td>Roger Dannenberg</td>"
"<td>Audio and MIDI I/O Libraries</td>"
"</tr>"
"<tr>"
"<td>Nasca Octavian Paul</td>"
"<td>Effects programming</td>"
"</tr>"
"<tr>"
"<td>Harvey Lubin</td>"
"<td>Main Logo</td>"
"</tr>"
"<tr>"
"<td>Tom Woodhams</td>"
"<td>Aqua Graphics (MacOS)</td>"
"</tr>"
"<tr>"
"<td>Tony Oetzmann</td>"
"<td>Tutorials and Online Help</td>"
"</tr>"
"</table>"
"<p>"
"<center>"
"<b>Other contributors:</b>"
"<p>"
"<br>"
"Dave Beydler<br>"
"Matt Brubeck<br>"
"Jason Cohen<br>"
"Robert Leidle<br>"
"Logan Lewis<br>"
"Jason Pepas<br>"
"Mark Phillips<br>"
"Jonathan Ryshpan<br>"
"Mark Tomlinson<br>"
"David Topper<br>"
"Rudy Trubitt<br>"
"</center>"
"</font>"
"</body>"
"</html>";
class Eraser:public wxWindow {
public:
Eraser(wxWindow * parent, wxWindowID id,
const wxPoint & pos,
const wxSize & size):wxWindow(parent, id, pos, size) {
} virtual void OnPaint(wxPaintEvent & event) {
wxPaintDC dc(this);
dc.SetPen(*wxWHITE_PEN);
dc.SetBrush(*wxWHITE_BRUSH);
int x, y;
GetClientSize(&x, &y);
dc.DrawRectangle(0, 0, x, y);
}
public:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(Eraser, wxWindow)
EVT_PAINT(Eraser::OnPaint)
END_EVENT_TABLE()
// ----------------------------------------------------------------------------
// icons
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(AboutDialog, wxDialog)
EVT_BUTTON(wxID_OK, AboutDialog::OnOK)
EVT_BUTTON(wxID_YES, AboutDialog::OnOK)
EVT_BUTTON(wxID_NO, AboutDialog::OnOK)
EVT_BUTTON(wxID_CANCEL, AboutDialog::OnOK)
END_EVENT_TABLE()
IMPLEMENT_CLASS(AboutDialog, wxDialog)
AboutDialog::AboutDialog(wxWindow * parent)
: wxDialog(parent, -1, "About Audacity...",
wxDefaultPosition, wxSize(400, DLOG_HEIGHT))
{
Centre();
Eraser *panel = new Eraser(this, -1,
wxPoint(0, 0),
wxSize(400, DLOG_HEIGHT));
panel->SetBackgroundColour(wxColour(255, 255, 255));
wxString creditStr = creditText;
wxHtmlWindow *html = new wxHtmlWindow(panel, -1,
wxPoint(10, 210),
wxSize(380, 150));
html->SetPage(creditStr);
wxButton *ok = new wxButton(panel, wxID_OK,
"Audacious!",
wxPoint(150, 375),
wxSize(100, 20));
#ifndef TARGET_CARBON
ok->SetDefault();
ok->SetFocus();
#endif
logo = new wxBitmap((const char **) AudacityLogo_xpm);
icon =
new wxStaticBitmap(panel, -1, *logo, wxPoint(93, 10),
wxSize(215, 190));
}
AboutDialog::~AboutDialog()
{
delete icon;
delete logo;
}
void AboutDialog::OnOK(wxCommandEvent & WXUNUSED(event))
{
EndModal(wxID_YES);
}
|