40 #include <wx/stattext.h> 41 #include <wx/textctrl.h> 45 #define STRINGIFY(x) #x 46 #define TOSTRING(x) STRINGIFY(x) 48 static const std::string
rc_copyright =
"Copyright (c) 2017 Roboception GmbH";
49 static const std::string
rc_license =
"The source code of rcdiscover is available under the 3-clause BSD license.";
50 static const std::string
wx_license =
"This program contains code from the \ 51 LGPLed library wxWidgets (http://www.wxwidgets.org/).";
56 const wxString &name) :
57 wxDialog(parent, id,
"About rcdiscover", pos, wxSize(420, 400), style, name)
59 auto *panel =
new wxPanel(
this);
60 auto *vbox =
new wxBoxSizer(wxVERTICAL);
63 auto *title_box =
new wxBoxSizer(wxHORIZONTAL);
64 auto *title =
new wxStaticText(panel, wxID_ANY,
"rcdiscover " PACKAGE_VERSION,
68 title->SetFont(wxFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
70 title_box->Add(title, 1, wxEXPAND | wxALL, 10);
71 vbox->Add(title_box, 0, wxALIGN_CENTER);
74 auto *copyright_box =
new wxBoxSizer(wxHORIZONTAL);
75 auto *copyright =
new wxStaticText(panel, wxID_ANY,
rc_copyright);
76 copyright_box->Add(copyright, 1, wxEXPAND | wxALL, 10);
77 vbox->Add(copyright_box, 0, wxALIGN_CENTER);
80 auto *rclicense_box =
new wxBoxSizer(wxHORIZONTAL);
81 auto *rclicense =
new wxStaticText(panel, wxID_ANY,
rc_license);
83 rclicense_box->Add(rclicense, 1, wxEXPAND | wxALL, 10);
84 vbox->Add(rclicense_box, 0, wxALIGN_CENTER);
87 auto *licenses_box =
new wxBoxSizer(wxHORIZONTAL);
88 auto *licenses =
new wxStaticText(panel, wxID_ANY,
wx_license);
90 licenses_box->Add(licenses, 1, wxEXPAND | wxALL, 10);
91 vbox->Add(licenses_box, 0);
93 auto *lgpl_box =
new wxBoxSizer(wxHORIZONTAL);
94 auto *lgpl =
new wxTextCtrl(panel, wxID_ANY, wxEmptyString, wxDefaultPosition,
95 wxSize(400, -1), wxTE_MULTILINE | wxTE_READONLY);
97 wxFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
99 lgpl_box->Add(lgpl, 1, wxEXPAND | wxALL, 10);
100 vbox->Add(lgpl_box, 1);
102 panel->SetSizer(vbox);
static const std::string wx_license
static const char lgpl_text[]
AboutDialog(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=wxDialogNameStr)
static const std::string rc_license
static const std::string rc_copyright