13#pragma implementation "AboutChameleonDialog.h"
18#include <wx/msw/private.h>
19#include <wx/filename.h>
20#include <wx/stdpaths.h>
21#include <wx/textctrl.h>
29#include "../../kernel/core/ui/language.hpp"
30#include "../../kernel/core/version.h"
35 AboutDialogTextCtrl(wxWindow* parent,
const wxString& contents) : wxTextCtrl(parent, wxID_ANY, contents, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_BESTWRAP | wxTE_READONLY | wxTE_AUTO_URL)
37 SetFont(wxFont(10, wxSWISS, wxNORMAL, wxNORMAL,
false,
"Arial"));
42 wxMouseEvent mouseEvent =
event.GetMouseEvent();
44 if (mouseEvent.IsButton())
46 wxString
url = GetRange(event.GetURLStart(), event.GetURLEnd());
47 wxLaunchDefaultBrowser(
url);
91 Create(parent,
id, caption, pos, size, style);
106 SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
107 wxDialog::Create( parent,
id, caption, pos, size, style );
112 GetSizer()->SetSizeHints(
this);
128 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
129 this->SetSizer(itemBoxSizer2);
131 wxNotebook* aboutDialogNoteBook =
new wxNotebook(
this,
ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_TOP);
133#if !wxCHECK_VERSION(2,5,2)
134 wxNotebookSizer* itemNotebook3Sizer =
new wxNotebookSizer(aboutDialogNoteBook);
138 wxPanel* mainAboutPanel =
new wxPanel( aboutDialogNoteBook,
ID_PROGPANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
139 mainAboutPanel->SetForegroundColour(wxColour(0, 0, 0));
140 mainAboutPanel->SetBackgroundColour(wxColour(255, 255, 255));
144 wxBitmap itemStaticBitmap6Bitmap(this->
GetBitmapResource(wxT(
"chamlogo_1.xpm")));
145 wxStaticBitmap* itemStaticBitmap6 =
new wxStaticBitmap( mainAboutPanel, wxID_STATIC, itemStaticBitmap6Bitmap, wxDefaultPosition, wxSize(300, 300), 0 );
146 itemStaticBitmap6->SetBackgroundColour(wxColour(255, 255, 255));
147 m_sizerProgram->Add(itemStaticBitmap6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
149 wxStaticText* mainStaticText =
new wxStaticText( mainAboutPanel, wxID_STATIC, _(
"NumeRe:\nFramework für Numerische Rechnungen"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
150 mainStaticText->SetForegroundColour(wxColour(0, 0, 0));
151 mainStaticText->SetBackgroundColour(wxColour(255, 255, 255));
152 mainStaticText->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD,
false,
_T(
"Arial")));
153 m_sizerProgram->Add(mainStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
155 m_lblVersion =
new wxStaticText( mainAboutPanel, wxID_STATIC, _(
"Version 9.8.7.6"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxNO_BORDER );
157 m_lblVersion->SetBackgroundColour(wxColour(255, 255, 255));
158 m_lblVersion->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD,
false,
_T(
"Arial")));
161 wxStaticText* licenceStaticText =
new wxStaticText( mainAboutPanel, wxID_STATIC, _(
_guilang.
get(
"GUI_ABOUT_LICENCE_SHORT",
AutoVersion::YEAR)), wxDefaultPosition, wxDefaultSize, 0 );
162 licenceStaticText->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxNORMAL,
false,
_T(
"Arial")));
163 m_sizerProgram->Add(licenceStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
165 aboutDialogNoteBook->AddPage(mainAboutPanel,
"NumeRe");
168 wxPanel* teamPanel =
new wxPanel( aboutDialogNoteBook,
ID_TEAMPANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
169 teamPanel->SetForegroundColour(wxColour(255, 255, 255));
170 teamPanel->SetBackgroundColour(wxColour(255, 255, 255));
171 wxBoxSizer* teamBoxSizer =
new wxBoxSizer(wxVERTICAL);
172 teamPanel->SetSizer(teamBoxSizer);
174 wxStaticText* teamStaticText =
new wxStaticText( teamPanel, wxID_STATIC, _(
_guilang.
get(
"GUI_ABOUT_TEAM_INTRO")), wxDefaultPosition, wxDefaultSize, 0 );
175 teamStaticText->SetForegroundColour(wxColour(0, 0, 0));
176 teamStaticText->SetBackgroundColour(wxColour(255, 255, 255));
177 teamStaticText->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxNORMAL,
false,
_T(
"Arial")));
178 teamBoxSizer->Add(teamStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
181 teamBoxSizer->Add(aboutTextCtrl, 1, wxGROW | wxEXPAND | wxALL, 5);
183 aboutDialogNoteBook->AddPage(teamPanel,
"Team");
186 wxPanel* infoPanel =
new wxPanel(aboutDialogNoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
187 infoPanel->SetForegroundColour(*wxBLACK);
188 infoPanel->SetBackgroundColour(*wxWHITE);
189 wxBoxSizer* infoBoxSizer =
new wxBoxSizer(wxVERTICAL);
190 infoPanel->SetSizer(infoBoxSizer);
193 infoBoxSizer->Add(infoTextCtrl, 1, wxGROW | wxEXPAND | wxALL, 5);
195 aboutDialogNoteBook->AddPage(infoPanel,
"Info");
198 wxPanel* creditsPanel =
new wxPanel(aboutDialogNoteBook,
ID_CREDITSPANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
199 creditsPanel->SetForegroundColour(wxColour(0, 0, 0));
200 creditsPanel->SetBackgroundColour(wxColour(255, 255, 255));
201 wxBoxSizer* creditsBoxSizer =
new wxBoxSizer(wxVERTICAL);
202 creditsPanel->SetSizer(creditsBoxSizer);
205 creditsBoxSizer->Add(creditsTextCtrl, 1, wxGROW | wxEXPAND | wxALL, 5);
207 aboutDialogNoteBook->AddPage(creditsPanel,
"Credits");
210 wxPanel* statsPanel =
new wxPanel(aboutDialogNoteBook,
ID_STATSPANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
211 statsPanel->SetForegroundColour(wxColour(0, 0, 0));
212 statsPanel->SetBackgroundColour(wxColour(255, 255, 255));
213 wxBoxSizer* statsBoxSizer =
new wxBoxSizer(wxVERTICAL);
214 statsPanel->SetSizer(statsBoxSizer);
217 statsBoxSizer->Add(statsTextCtrl, 1, wxGROW | wxEXPAND | wxALL, 5);
219 aboutDialogNoteBook->AddPage(statsPanel,
"Stats");
222 wxPanel* joinPanel =
new wxPanel(aboutDialogNoteBook,
ID_STATSPANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
223 joinPanel->SetForegroundColour(wxColour(0, 0, 0));
224 joinPanel->SetBackgroundColour(wxColour(255, 255, 255));
225 wxBoxSizer* joinBoxSizer =
new wxBoxSizer(wxVERTICAL);
226 joinPanel->SetSizer(joinBoxSizer);
229 joinBoxSizer->Add(joinTextCtrl, 1, wxGROW | wxEXPAND | wxALL, 5);
231 aboutDialogNoteBook->AddPage(joinPanel,
"Contribute");
233#if !wxCHECK_VERSION(2,5,2)
234 itemBoxSizer2->Add(itemNotebook3Sizer, 0, wxGROW|wxALL, 5);
236 itemBoxSizer2->Add(aboutDialogNoteBook, 0, wxGROW|wxALL, 5);
239 wxBoxSizer* itemBoxSizer21 =
new wxBoxSizer(wxHORIZONTAL);
240 itemBoxSizer2->Add(itemBoxSizer21, 0, wxALIGN_RIGHT|wxALL, 0);
242 wxButton* itemButton22 =
new wxButton(
this,
ID_BUTTONOK, _(
"OK"), wxDefaultPosition, wxDefaultSize, 0 );
243 itemBoxSizer21->Add(itemButton22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
277 wxFileName f(wxStandardPaths::Get().GetExecutablePath());
279 if (
name ==
_T(
"chamlogo_1.xpm"))
281 wxBitmap bitmap(f.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR)+
"icons\\folder.png", wxBITMAP_TYPE_PNG);
const std::string sVersion
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_ABOUTCHAMELEONDIALOG_IDNAME, const wxString &caption=SYMBOL_ABOUTCHAMELEONDIALOG_TITLE, const wxPoint &pos=SYMBOL_ABOUTCHAMELEONDIALOG_POSITION, const wxSize &size=SYMBOL_ABOUTCHAMELEONDIALOG_SIZE, long style=SYMBOL_ABOUTCHAMELEONDIALOG_STYLE)
Creation.
void OnButtonOKClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTONOK
void CreateControls()
Creates the controls and sizers.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
AboutChameleonDialog()
Constructors.
wxStaticText * m_lblVersion
wxBoxSizer * m_sizerProgram
static bool ShowToolTips()
Should we show tooltips?
void OnUrlClick(wxTextUrlEvent &event)
AboutDialogTextCtrl(wxWindow *parent, const wxString &contents)
This class handles the internal language system and returns the language strings of the selected lang...
std::string get(const std::string &sMessage, const std::vector< std::string > &vTokens) const
This member function returns the language string for the passed language identifier and replaces all ...