Menu

[r6]: / AboutDialog.cpp  Maximize  Restore  History

Download this file

373 lines (285 with data), 24.0 kB

  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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
/////////////////////////////////////////////////////////////////////////////
// Name: AboutDialog.cpp
// Purpose:
// Author:
// Modified by:
// Created: 25/06/2006 22:36:03
// RCS-ID:
// Copyright:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (Personal Edition), 25/06/2006 22:36:03
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "AboutDialog.h"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "MIView.h"
#include "MainFrame.h"
#include <wx/datetime.h>
#include <wx/msgdlg.h>
#include <wx/wxhtml.h>
#include "AboutDialog.h"
#include <wx/utils.h>
////@begin XPM images
////@end XPM images
/*!
* AboutDialog type definition
*/
IMPLEMENT_DYNAMIC_CLASS( AboutDialog, wxDialog )
/*!
* AboutDialog event table definition
*/
BEGIN_EVENT_TABLE( AboutDialog, wxDialog )
////@begin AboutDialog event table entries
EVT_BUTTON( wxID_OK, AboutDialog::OnOkClick )
////@end AboutDialog event table entries
END_EVENT_TABLE()
/*!
* AboutDialog constructors
*/
AboutDialog::AboutDialog( )
{
}
AboutDialog::AboutDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
Create(parent, id, caption, pos, size, style);
}
/*!
* AboutDialog creator
*/
bool AboutDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin AboutDialog member initialisation
htmlWindow = NULL;
txtVideoCard = NULL;
txtGLVersion = NULL;
txtDisplaySize = NULL;
txtDisplayDepth = NULL;
txtOSVersion = NULL;
////@end AboutDialog member initialisation
////@begin AboutDialog creation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end AboutDialog creation
return true;
}
/*!
* Control creation for AboutDialog
*/
void AboutDialog::CreateControls()
{
////@begin AboutDialog content construction
AboutDialog* itemDialog1 = this;
this->SetBackgroundColour(wxColour(255, 255, 255));
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxPanel* itemPanel3 = new wxPanel( itemDialog1, ID_PANEL2, wxDefaultPosition, wxSize(25, -1), wxNO_BORDER|wxTAB_TRAVERSAL );
itemPanel3->SetBackgroundColour(wxColour(145, 200, 255));
itemBoxSizer2->Add(itemPanel3, 1, wxGROW|wxALL, 0);
wxStaticLine* itemStaticLine4 = new wxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
itemBoxSizer2->Add(itemStaticLine4, 0, wxGROW|wxALL, 0);
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer5, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, _("MIView"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText6->SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 0);
wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _("Medical Image Viewer"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText7->SetForegroundColour(wxColour(0, 0, 202));
itemStaticText7->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemBoxSizer5->Add(itemStaticText7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 2);
wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC, _("version 0.7 (build 005) - January 5, 2011\nGreg Book"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 10);
wxHyperlinkCtrl* itemHyperlinkCtrl9 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINKCTRL2, _("http://gbooksoft.com"), _T("http://gbooksoft.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemBoxSizer5->Add(itemHyperlinkCtrl9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxHyperlinkCtrl* itemHyperlinkCtrl10 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINKCTRL1, _("Email the developer"), _T("mailto:gbook@gbook.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemBoxSizer5->Add(itemHyperlinkCtrl10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
htmlWindow = new wxHtmlWindow( itemDialog1, ID_HTMLWINDOW, wxDefaultPosition, wxSize(200, 150), wxHW_SCROLLBAR_AUTO|wxNO_BORDER|wxHSCROLL|wxVSCROLL );
itemBoxSizer5->Add(htmlWindow, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer5->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticText* itemStaticText13 = new wxStaticText( itemDialog1, wxID_STATIC, _("End User License Agreement"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText13->SetFont(wxFont(7, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemBoxSizer5->Add(itemStaticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2);
wxRichTextCtrl* itemRichTextCtrl14 = new wxRichTextCtrl( itemDialog1, ID_RICHTEXTCTRL1, _("IMPORTANT, PLEASE READ CAREFULLY. THIS IS A LICENSE AGREEMENT\n\n\tThis SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. This SOFTWARE PRODUCT is licensed, not sold.\n\nEnd User License Agreement\n\nThis End User License Agreement (\"EULA\") is a legal agreement between you (either an individual or a single entity) and The Book Company with regard to the copyrighted Software (herein referred to as \"SOFTWARE PRODUCT\" or \"SOFTWARE\") provided with this EULA. The SOFTWARE PRODUCT includes computer software, the associated media, any printed materials, and any \"online\" or electronic documentation. Use of any software and related documentation (\"Software\") provided to you by The Book Company in whatever form or media, will constitute your acceptance of these terms, unless separate terms are provided by the software supplier, in which case certain additional or different terms may apply. If you do not agree with the terms of this EULA, do not download, install, copy or use the Software. By installing, copying or otherwise using the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, The Book Company is unwilling to license the SOFTWARE PRODUCT to you.\n\n0. This software shall be used for research or informational purposes ONLY. It shall not be used as a diagnostic tool or in the treatment of patients. This software is NOT FDA approved. DO NOT USE THIS SOFTWARE AS A TOOL FOR DIAGNOSIS OF MEDICAL IMAGES.\n\n1. Eligible Licensees. This Software is available for license solely to SOFTWARE owners, with no right of duplication or further distribution, licensing, or sub-licensing. IF YOU DO NOT OWN THE SOFTWARE, THEN DO NOT DOWNLOAD, INSTALL, COPY OR USE THE SOFTWARE.\n \n2. License Grant. The Book Company grants to you a personal, non-transferable and non-exclusive right to use the copy of the Software provided with this EULA. You agree you will not copy the Software except as necessary to use it on a single computer. You agree that you may not copy the written materials accompanying the Software. Modifying, translating, renting, copying, transferring or assigning all or part of the Software, or any rights granted hereunder, to any other persons and removing any proprietary notices, labels or marks from the Software is strictly prohibited. Furthermore, you hereby agree not to create derivative works based on the Software. You may not transfer this Software.\n\n3. Copyright. The Software is licensed, not sold. You acknowledge that no title to the intellectual property in the Software is transferred to you. You further acknowledge that title and full ownership rights to the Software will remain the exclusive property of The Book Company and/or its suppliers, and you will not acquire any rights to the Software, except as expressly set forth above. All copies of the Software will contain the same proprietary notices as contained in or on the Software. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, music, text and \"applets,\" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT, are owned by The Book Company or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. You may not copy the printed materials \naccompanying the SOFTWARE PRODUCT.\n\n4. Reverse Engineering. You agree that you will not attempt, and if you are a corporation, you will use your best efforts to prevent your employees and contractors from attempting to reverse compile, modify, translate or disassemble the Software in whole or in part. Any failure to comply with the above or any other terms and conditions contained herein will result in the automatic termination of this license and the reversion of the rights granted hereunder to The Book Company.\n\n5. Disclaimer of Warranty. The Software is provided \"AS IS\" without warranty of any kind. The Book Company and its suppliers disclaim and make no express or implied warranties and specifically disclaim the warranties of merchantability, fitness for a particular purpose and non-infringement of third-party rights. The entire risk as to the quality and performance of the Software is with you. Neither The Book Company nor its suppliers warrant that the functions contained in the Software will meet your requirements or that the operation of the Software will be uninterrupted or error-free. The Book Company IS NOT OBLIGATED TO PROVIDE ANY UPDATES TO THE SOFTWARE.\n\n6. Limitation of Liability. The Book Company assumes no liability from the use of this software. In no event shall The Book Company or its suppliers be liable to you for any consequential, special, incidental or indirect damages of any kind arising out of the use or inability to use the software, even if The Book Company or its supplier has been advised of the possibility of such damages, or \nany claim by a third party. \n\n7. Rental. You may not loan, rent, or lease the SOFTWARE. \n\n8. Upgrades. If the SOFTWARE is an upgrade from an earlier release or previously released version, you now may use that upgraded product only in accordance with this EULA. If the SOFTWARE PRODUCT is an upgrade of a software program which you licensed as a single product, the SOFTWARE PRODUCT may be used only as part of that single product package and may not be separated for use on more than one computer.\n\n9. OEM Product Support. Product support for the SOFTWARE PRODUCT IS provided by The Book Company. For product support, please call The Book Company. Should you have any questions concerning this, please refer to the address provided in the documentation.\n\n10. No Liability for Consequential Damages. In no event shall The Book Company or its suppliers be liable for any damages whatsoever (including, without limitation, incidental, direct, indirect special and consequential damages, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use this Book Company product, even if The Book Company has been advised of the possibility of such damages. Because some states/countries do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.\n\n11. Indemnification By You. If you distribute the Software in violation of this Agreement, you agree to indemnify, hold harmless and defend The Book Company and its suppliers from and against any claims or lawsuits, including attorney's fees that arise or result from the use or distribution of the Software in violation of this Agreement.\n\nThe Book Company\nWest Hartford, CT 06110\ngbook@gbook.org"), wxDefaultPosition, wxSize(100, 150), wxTE_READONLY|wxWANTS_CHARS );
itemRichTextCtrl14->SetFont(wxFont(7, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Tahoma")));
itemBoxSizer5->Add(itemRichTextCtrl14, 0, wxGROW|wxALL, 2);
wxStdDialogButtonSizer* itemStdDialogButtonSizer15 = new wxStdDialogButtonSizer;
itemBoxSizer5->Add(itemStdDialogButtonSizer15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton16 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemStdDialogButtonSizer15->AddButton(itemButton16);
itemStdDialogButtonSizer15->Realize();
wxStaticLine* itemStaticLine17 = new wxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
itemBoxSizer2->Add(itemStaticLine17, 0, wxGROW|wxALL, 0);
wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer18, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText19 = new wxStaticText( itemDialog1, wxID_STATIC, _("System Information"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText19->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemStaticText19->Wrap(210);
itemBoxSizer18->Add(itemStaticText19, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticText* itemStaticText20 = new wxStaticText( itemDialog1, wxID_STATIC, _("Video Card"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer18->Add(itemStaticText20, 0, wxALIGN_LEFT|wxALL, 1);
txtVideoCard = new wxTextCtrl( itemDialog1, ID_TXT_VIDEOCARD, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
itemBoxSizer18->Add(txtVideoCard, 0, wxGROW|wxALL, 1);
wxStaticText* itemStaticText22 = new wxStaticText( itemDialog1, wxID_STATIC, _("OpenGL Version"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer18->Add(itemStaticText22, 0, wxALIGN_LEFT|wxALL, 1);
txtGLVersion = new wxTextCtrl( itemDialog1, ID_OPENGL_VERSION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
itemBoxSizer18->Add(txtGLVersion, 0, wxGROW|wxALL, 1);
wxGridSizer* itemGridSizer24 = new wxGridSizer(2, 2, 0, 0);
itemBoxSizer18->Add(itemGridSizer24, 0, wxGROW|wxALL, 0);
wxStaticText* itemStaticText25 = new wxStaticText( itemDialog1, wxID_STATIC, _("Display Resolution"), wxDefaultPosition, wxDefaultSize, 0 );
itemGridSizer24->Add(itemStaticText25, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 1);
wxStaticText* itemStaticText26 = new wxStaticText( itemDialog1, wxID_STATIC, _("Display Depth"), wxDefaultPosition, wxDefaultSize, 0 );
itemGridSizer24->Add(itemStaticText26, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 1);
txtDisplaySize = new wxTextCtrl( itemDialog1, ID_DISPLAY_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
itemGridSizer24->Add(txtDisplaySize, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 1);
txtDisplayDepth = new wxTextCtrl( itemDialog1, ID_TEXTCTRL23, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
itemGridSizer24->Add(txtDisplayDepth, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 1);
wxStaticText* itemStaticText29 = new wxStaticText( itemDialog1, wxID_STATIC, _("Operating System"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer18->Add(itemStaticText29, 0, wxALIGN_LEFT|wxALL, 1);
txtOSVersion = new wxTextCtrl( itemDialog1, ID_OS_VERSION, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer18->Add(txtOSVersion, 0, wxGROW|wxALL, 1);
itemBoxSizer18->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticText* itemStaticText32 = new wxStaticText( itemDialog1, wxID_STATIC, _("Credits"), wxDefaultPosition, wxSize(200, -1), wxALIGN_CENTRE );
itemStaticText32->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
itemBoxSizer18->Add(itemStaticText32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
wxStaticText* itemStaticText33 = new wxStaticText( itemDialog1, wxID_STATIC, _("MIView was built with the help of the following programs and libraries:"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText33->Wrap(250);
itemBoxSizer18->Add(itemStaticText33, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer34 = new wxFlexGridSizer(4, 2, 0, 0);
itemBoxSizer18->Add(itemFlexGridSizer34, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
wxHyperlinkCtrl* itemHyperlinkCtrl35 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINK_WX, _("wxWidgets"), _T("http://www.wxwidgets.com"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemFlexGridSizer34->Add(itemHyperlinkCtrl35, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText36 = new wxStaticText( itemDialog1, wxID_STATIC, _("Cross platform application framework"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText36->Wrap(210);
itemFlexGridSizer34->Add(itemStaticText36, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxHyperlinkCtrl* itemHyperlinkCtrl37 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINK_GDCM, _("Gdcm 2"), _T("http://sourceforge.net/projects/gdcm"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemFlexGridSizer34->Add(itemHyperlinkCtrl37, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText38 = new wxStaticText( itemDialog1, wxID_STATIC, _("Llibrary for reading DICOM/ACR/NEMA images"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText38->Wrap(210);
itemFlexGridSizer34->Add(itemStaticText38, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxHyperlinkCtrl* itemHyperlinkCtrl39 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINK_AFNI, _("ANFI"), _T("http://afni.nimh.nih.gov/afni/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemFlexGridSizer34->Add(itemHyperlinkCtrl39, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText40 = new wxStaticText( itemDialog1, wxID_STATIC, _("Library for reading/writing Analyze/Nifti1 images"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText40->Wrap(210);
itemFlexGridSizer34->Add(itemStaticText40, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxHyperlinkCtrl* itemHyperlinkCtrl41 = new wxHyperlinkCtrl( itemDialog1, ID_HYPERLINK_GLSL, _("glslDevil"), _T("http://www.vis.uni-stuttgart.de/glsldevil/"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
itemFlexGridSizer34->Add(itemHyperlinkCtrl41, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxStaticText* itemStaticText42 = new wxStaticText( itemDialog1, wxID_STATIC, _("Excellent free GLSL debugger"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticText42->Wrap(210);
itemFlexGridSizer34->Add(itemStaticText42, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
////@end AboutDialog content construction
htmlWindow->SetBorders(1);
CheckOpenGL();
}
/*!
* Should we show tooltips?
*/
bool AboutDialog::ShowToolTips()
{
return true;
}
/*!
* Get bitmap resources
*/
wxBitmap AboutDialog::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin AboutDialog bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end AboutDialog bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon AboutDialog::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin AboutDialog icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end AboutDialog icon retrieval
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/
void AboutDialog::OnOkClick( wxCommandEvent& event )
{
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in AboutDialog.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK in AboutDialog.
}
void AboutDialog::CheckOpenGL(void)
{
// IWbemServices::GetObject(Win32_VideoController;
const GLubyte *vendorString = glGetString(GL_VENDOR);
const GLubyte *rendererString = glGetString(GL_RENDERER);
const GLubyte *versionString = glGetString(GL_VERSION);
wxString vendorStr = vendorString;
wxString rendererStr = rendererString;
wxString versionStr = versionString;
wxString osVersion = ::wxGetOsDescription();
wxSize displaySize = wxGetDisplaySize();
int displayDepth = ::wxDisplayDepth();
txtVideoCard->SetValue(vendorStr + " " + rendererStr);
txtGLVersion->SetValue(versionStr);
txtOSVersion->SetValue(osVersion);
txtDisplaySize->SetValue(wxString::Format("%dx%d", displaySize.GetWidth(), displaySize.GetHeight()));
txtDisplayDepth->SetValue(wxString::Format("%d bpp",displayDepth));
wxString str;
wxString openGLver = "1.1";
wxString vertexShader = "Not present";
wxString fragmentShader = "Not present";
wxString vertexProgram = "Not present";
wxString fragmentProgram = "Not present";
wxString bgcolor = "red";
wxString texture3D = "Not present";
/* print the first line to setup the HTML table */
str = "<font size=\"2\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tr><td align=\"right\"><b>OpenGL Property</b></td><td><b>Value</b></td></tr>";
/* get the OpenGL version */
if (GLEE_VERSION_1_2) { openGLver = "1.2"; bgcolor = "red"; }
if (GLEE_VERSION_1_3) { openGLver = "1.3"; bgcolor = "red"; }
if (GLEE_VERSION_1_4) { openGLver = "1.4"; bgcolor = "red"; }
if (GLEE_VERSION_1_5) { openGLver = "1.5"; bgcolor = "red"; }
if (GLEE_VERSION_2_0) { openGLver = "2.0"; bgcolor = "#DBF7DD"; }
if (GLEE_VERSION_2_1) { openGLver = "2.1"; bgcolor = "#DBF7DD"; }
/* print the OpenGL version */
str += "<tr><td align=\"right\">OpenGL Version</td><td bgcolor=\"" + bgcolor + "\">" + openGLver + "</td></tr>";
/* check if vertex shader exists */
if (GL_ARB_vertex_shader) { vertexShader = "Present"; bgcolor = "#DBF7DD"; }
else { vertexShader = "Not present"; bgcolor = "red"; }
str += "<tr><td align=\"right\">Vertex Shader</td><td bgcolor=\"" + bgcolor + "\">" + vertexShader + "</td></tr>";
/* check if fragment shader exists */
if (GL_ARB_fragment_shader) { fragmentShader = "Present"; bgcolor = "#DBF7DD"; }
else { fragmentShader = "Not present"; bgcolor = "red"; }
str += "<tr><td align=\"right\">Fragment Shader</td><td bgcolor=\"" + bgcolor + "\">" + fragmentShader + "</td></tr>";
/* check if vertex program exists */
if (GL_ARB_vertex_program) { vertexProgram = "Present"; bgcolor = "#DBF7DD"; }
else { vertexProgram = "Not present"; bgcolor = "red"; }
str += "<tr><td align=\"right\">Vertex Program</td><td bgcolor=\"" + bgcolor + "\">" + vertexProgram + "</td></tr>";
/* check if fragment program exists */
if (GL_ARB_fragment_program) { fragmentProgram = "Present"; bgcolor = "#DBF7DD"; }
else { fragmentProgram = "Not present"; bgcolor = "red"; }
str += "<tr><td align=\"right\">Fragment Program</td><td bgcolor=\"" + bgcolor + "\">" + fragmentProgram + "</td></tr>";
/* check if 3D texture exists */
if (GL_EXT_texture3D) { texture3D = "Present"; bgcolor = "#DBF7DD"; }
else { texture3D = "Not present"; bgcolor = "red"; }
str += "<tr><td align=\"right\">3D Textures</td><td bgcolor=\"" + bgcolor + "\">" + texture3D + "</td></tr>";
str += "</table></font>";
htmlWindow->AppendToPage(str);
}