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>
55 wxWindow* parent, const std::
string& appName,
56 const std::
string& additionalInfo, const
bool showStandardInfo)
59 const wxWindowID
id = -1;
61 wxFlexGridSizer* FlexGridSizer2;
64 parent,
id, _(
"About box..."), wxDefaultPosition, wxDefaultSize,
65 wxDEFAULT_DIALOG_STYLE | wxCLOSE_BOX, _T(
"id"));
66 SetClientSize(wxSize(636, 375));
67 FlexGridSizer1 =
new wxFlexGridSizer(0, 1, 0, 0);
68 FlexGridSizer1->AddGrowableCol(0);
69 FlexGridSizer4 =
new wxFlexGridSizer(0, 2, 0, 0);
70 FlexGridSizer4->AddGrowableCol(1);
71 FlexGridSizer4->AddGrowableRow(0);
72 FlexGridSizer2 =
new wxFlexGridSizer(2, 1, 0, 0);
73 FlexGridSizer2->AddGrowableCol(0);
74 FlexGridSizer2->AddGrowableRow(0);
75 FlexGridSizer2->AddGrowableRow(1);
76 lbProgName =
new wxStaticText(
77 this, ID_STATICTEXT1, _(
"Title"), wxDefaultPosition, wxDefaultSize, 0,
78 _T(
"ID_STATICTEXT1"));
79 wxFont lbProgNameFont(
81 _T(
"Times New Roman"), wxFONTENCODING_DEFAULT);
82 lbProgName->SetFont(lbProgNameFont);
84 lbProgName, 1, wxALL | wxALIGN_BOTTOM | wxALIGN_CENTER_HORIZONTAL, 5);
85 lbBuild =
new wxStaticText(
86 this, ID_STATICTEXT2, _(
"Label"), wxDefaultPosition, wxDefaultSize, 0,
87 _T(
"ID_STATICTEXT2"));
89 lbBuild, 1, wxALL | wxALIGN_TOP | wxALIGN_CENTER_HORIZONTAL, 5);
91 FlexGridSizer2, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 0);
92 StaticBitmap1 =
new wxStaticBitmap(
93 this, ID_STATICBITMAP1,
94 wxArtProvider::GetBitmap(
95 wxART_MAKE_ART_ID_FROM_STR(_T(
"IMG_MRPT_LOGO")), wxART_OTHER),
96 wxDefaultPosition, wxDefaultSize, 0, _T(
"ID_STATICBITMAP1"));
99 wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
101 FlexGridSizer4, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 1);
102 StaticLine1 =
new wxStaticLine(
103 this, ID_STATICLINE1, wxPoint(3, 86), wxSize(627, 2), wxLI_HORIZONTAL,
104 _T(
"ID_STATICLINE1"));
106 StaticLine1, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 5);
107 Notebook1 =
new wxNotebook(
108 this, ID_NOTEBOOK1, wxPoint(6, 91), wxSize(625, 250), 0,
110 lbInfo =
new wxTextCtrl(
111 Notebook1, ID_TEXTCTRL1, wxEmptyString, wxPoint(4, 24),
112 wxSize(545, 250), wxTE_MULTILINE | wxTE_READONLY | wxTE_AUTO_URL,
113 wxDefaultValidator, _T(
"ID_TEXTCTRL1"));
115 10, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL,
false, _T(
"Courier New"),
116 wxFONTENCODING_DEFAULT);
117 lbInfo->SetFont(lbInfoFont);
118 lbLicense =
new wxTextCtrl(
119 Notebook1, ID_TEXTCTRL2, _(
""), wxDefaultPosition, wxDefaultSize,
120 wxTE_MULTILINE | wxTE_READONLY | wxTE_AUTO_URL, wxDefaultValidator,
122 wxFont lbLicenseFont(
123 10, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL,
false, _T(
"Courier New"),
124 wxFONTENCODING_DEFAULT);
125 lbLicense->SetFont(lbLicenseFont);
126 TextCtrl1 =
new wxTextCtrl(
127 Notebook1, ID_TEXTCTRL3,
_U(tutorial().c_str()), wxPoint(4, 24),
128 wxSize(545, 222), wxTE_MULTILINE | wxTE_READONLY | wxTE_AUTO_URL,
129 wxDefaultValidator, _T(
"ID_TEXTCTRL3"));
130 wxFont TextCtrl1Font(
131 10, wxSWISS, wxFONTSTYLE_NORMAL, wxNORMAL,
false, _T(
"Courier New"),
132 wxFONTENCODING_DEFAULT);
133 TextCtrl1->SetFont(TextCtrl1Font);
134 Notebook1->AddPage(lbInfo, _(
"Information"),
false);
135 Notebook1->AddPage(lbLicense, _(
"License"),
false);
136 Notebook1->AddPage(TextCtrl1, _(
"Tutorial"),
false);
138 Notebook1, 1, wxALL | wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP, 5);
139 Button11 =
new wxButton(
140 this, ID_BUTTON1, _(
"OK"), wxPoint(250, 345), wxSize(76, 26), 0,
141 wxDefaultValidator, _T(
"ID_BUTTON1"));
144 wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
145 SetSizer(FlexGridSizer1);
146 FlexGridSizer1->SetSizeHints(
this);
150 ID_BUTTON1, wxEVT_COMMAND_BUTTON_CLICKED,
156 lbLicense->SetValue(
_U(license().c_str()));
171 wxString
s(_(
"Build: "));
173 s << _(
" - ") << MRPTver;
175 lbBuild->SetLabel(
s);
182 wxString wxVer(wxVERSION_STRING);
183 cout << information(
"wxWidgets",
std::string(wxVer.mb_str()));
186 lbProgName->SetLabel(
_U(m_appName.c_str()));
187 lbProgName->SetForegroundColour(wxColour(0, 0, 128));
189 FlexGridSizer1->RecalcSizes();
194 #endif // MRPT_HAS_WXWIDGETS