12 #if MRPT_HAS_WXWIDGETS 17 #include <wx/artprov.h> 18 #include <wx/bitmap.h> 22 #include <wx/string.h> 29 #include <mrpt/config.h> 56 wxWindow* parent, const
std::
string& appName,
57 const
std::
string& additionalInfo, const
bool showStandardInfo)
60 const wxWindowID
id = -1;
62 wxFlexGridSizer* FlexGridSizer2;
65 parent,
id, _(
"About box..."), wxDefaultPosition, wxDefaultSize,
66 wxDEFAULT_DIALOG_STYLE | wxCLOSE_BOX, _T(
"id"));
67 SetClientSize(wxSize(636, 375));
68 FlexGridSizer1 =
new wxFlexGridSizer(0, 1, 0, 0);
69 FlexGridSizer1->AddGrowableCol(0);
70 FlexGridSizer4 =
new wxFlexGridSizer(0, 2, 0, 0);
71 FlexGridSizer4->AddGrowableCol(1);
72 FlexGridSizer4->AddGrowableRow(0);
73 FlexGridSizer2 =
new wxFlexGridSizer(2, 1, 0, 0);
74 FlexGridSizer2->AddGrowableCol(0);
75 FlexGridSizer2->AddGrowableRow(0);
76 FlexGridSizer2->AddGrowableRow(1);
77 lbProgName =
new wxStaticText(
78 this, ID_STATICTEXT1, _(
"Title"), wxDefaultPosition, wxDefaultSize, 0,
79 _T(
"ID_STATICTEXT1"));
80 wxFont lbProgNameFont(
82 _T(
"Times New Roman"), wxFONTENCODING_DEFAULT);
83 lbProgName->SetFont(lbProgNameFont);
85 lbProgName, 1, wxALL | wxALIGN_BOTTOM | wxALIGN_CENTER_HORIZONTAL, 5);
86 lbBuild =
new wxStaticText(
87 this, ID_STATICTEXT2, _(
"Label"), wxDefaultPosition, wxDefaultSize, 0,
88 _T(
"ID_STATICTEXT2"));
90 lbBuild, 1, wxALL | wxALIGN_TOP | wxALIGN_CENTER_HORIZONTAL, 5);
92 FlexGridSizer2, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 0);
93 StaticBitmap1 =
new wxStaticBitmap(
94 this, ID_STATICBITMAP1,
95 wxArtProvider::GetBitmap(
96 wxART_MAKE_ART_ID_FROM_STR(_T(
"IMG_MRPT_LOGO")), wxART_OTHER),
97 wxDefaultPosition, wxDefaultSize, 0, _T(
"ID_STATICBITMAP1"));
100 wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
102 FlexGridSizer4, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 1);
103 StaticLine1 =
new wxStaticLine(
104 this, ID_STATICLINE1, wxPoint(3, 86), wxSize(627, 2), wxLI_HORIZONTAL,
105 _T(
"ID_STATICLINE1"));
107 StaticLine1, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 5);
108 Notebook1 =
new wxNotebook(
109 this, ID_NOTEBOOK1, wxPoint(6, 91), wxSize(625, 250), 0,
111 lbInfo =
new wxTextCtrl(
112 Notebook1, ID_TEXTCTRL1, wxEmptyString, wxPoint(4, 24),
113 wxSize(545, 250), wxTE_MULTILINE | wxTE_READONLY | wxTE_AUTO_URL,
114 wxDefaultValidator, _T(
"ID_TEXTCTRL1"));
116 10, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL,
false, _T(
"Courier New"),
117 wxFONTENCODING_DEFAULT);
118 lbInfo->SetFont(lbInfoFont);
119 lbLicense =
new wxTextCtrl(
120 Notebook1, ID_TEXTCTRL2, _(
""), wxDefaultPosition, wxDefaultSize,
121 wxTE_MULTILINE | wxTE_READONLY | wxTE_AUTO_URL, wxDefaultValidator,
123 wxFont lbLicenseFont(
124 10, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL,
false, _T(
"Courier New"),
125 wxFONTENCODING_DEFAULT);
126 lbLicense->SetFont(lbLicenseFont);
127 TextCtrl1 =
new wxTextCtrl(
128 Notebook1, ID_TEXTCTRL3, _(tutorial()), wxPoint(4, 24),
129 wxSize(545, 222), wxTE_MULTILINE | wxTE_READONLY | wxTE_AUTO_URL,
130 wxDefaultValidator, _T(
"ID_TEXTCTRL3"));
131 wxFont TextCtrl1Font(
132 10, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL,
false, _T(
"Courier New"),
133 wxFONTENCODING_DEFAULT);
134 TextCtrl1->SetFont(TextCtrl1Font);
135 Notebook1->AddPage(lbInfo, _(
"Information"),
false);
136 Notebook1->AddPage(lbLicense, _(
"License"),
false);
137 Notebook1->AddPage(TextCtrl1, _(
"Tutorial"),
false);
139 Notebook1, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 5);
140 Button11 =
new wxButton(
141 this, ID_BUTTON1, _(
"OK"), wxPoint(250, 345), wxSize(76, 26), 0,
142 wxDefaultValidator, _T(
"ID_BUTTON1"));
145 wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
146 SetSizer(FlexGridSizer1);
147 FlexGridSizer1->SetSizeHints(
this);
151 ID_BUTTON1, wxEVT_COMMAND_BUTTON_CLICKED,
157 lbLicense->SetValue(
_U(license().c_str()));
172 wxString
s(_(
"Build: "));
174 s << _(
" - ") << MRPTver;
176 lbBuild->SetLabel(
s);
183 wxString wxVer(wxVERSION_STRING);
184 cout << information(
"wxWidgets",
std::string(wxVer.mb_str()));
187 lbProgName->SetLabel(
_U(m_appName.c_str()));
188 lbProgName->SetForegroundColour(wxColour(0, 0, 128));
190 FlexGridSizer1->RecalcSizes();
195 #endif // MRPT_HAS_WXWIDGETS static const long ID_STATICLINE1
static const long ID_STATICBITMAP1
This namespace provides a OS-independent interface to many useful functions: filenames manipulation...
void OnButton1Click(wxCommandEvent &event)
std::string MRPT_getCompilationDate()
Returns the MRPT source code timestamp, according to the Reproducible-Builds specifications: https://...
#define wxFONTWEIGHT_BOLD
This auxiliary class redirects the output sent to a streambuf to a wxTextCtrl object.
static const long ID_BUTTON1
GLsizei const GLchar ** string
static const long ID_TEXTCTRL2
static const long ID_NOTEBOOK1
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static const long ID_TEXTCTRL3
void OnInit(wxInitDialogEvent &event)
static const long ID_TEXTCTRL1
static const long ID_STATICTEXT2
std::string MRPT_getVersion()
Returns a string describing the MRPT version.
static const long ID_STATICTEXT1