28 #ifndef MRPT_WX_UTILS_H
29 #define MRPT_WX_UTILS_H
40 #if MRPT_HAS_WXWIDGETS
43 #include <wx/statbmp.h>
45 #include <wx/toolbar.h>
48 #include <wx/statusbr.h>
49 #include <wx/msgdlg.h>
50 #include <wx/artprov.h>
51 #include <wx/bitmap.h>
54 #include <wx/string.h>
55 #include <wx/msgdlg.h>
57 #include <wx/filedlg.h>
58 #include <wx/progdlg.h>
59 #include <wx/imaglist.h>
60 #include <wx/busyinfo.h>
62 #include <wx/textdlg.h>
63 #include <wx/dirdlg.h>
64 #include <wx/colordlg.h>
65 #include <wx/dcmemory.h>
68 #include <wx/spinctrl.h>
70 #include <wx/notebook.h>
71 #include <wx/button.h>
73 #include <wx/stattext.h>
74 #include <wx/textctrl.h>
75 #include <wx/choice.h>
76 #include <wx/radiobox.h>
77 #include <wx/settings.h>
78 #include <wx/checkbox.h>
80 #include <wx/dcclient.h>
88 #if MRPT_HAS_WXWIDGETS
93 # define _U(x) wxString::From8BitData(x)
101 #define WX_START_TRY \
107 catch(std::exception &e) \
109 wxMessageBox( wxString(e.what(),wxConvUTF8), wxT("Exception"), wxOK, this); \
113 wxMessageBox( _("Untyped exception!"), _("Exception"), wxOK, this); \
133 wxImage
GUI_IMPEXP * IplImage2wxImage(
void* img );
152 class GUI_IMPEXP wxMRPTImageControl :
public wxPanel
158 wxPoint m_last_mouse_point, m_last_mouse_click;
162 wxMRPTImageControl( wxWindow *parent,wxWindowID winID,
int x,
int y,
int width,
int height);
163 virtual ~wxMRPTImageControl();
165 void AssignImage(wxBitmap *img);
167 void GetBitmap(wxBitmap &bmp);
169 void OnPaint(wxPaintEvent &ev);
170 void OnMouseMove(wxMouseEvent& ev);
171 void OnMouseClick(wxMouseEvent& ev);
173 void OnEraseBackground(wxEraseEvent &ev) { }
178 class GUI_IMPEXP CPanelCameraSelection:
public wxPanel
182 CPanelCameraSelection(wxWindow* parent,wxWindowID
id=wxID_ANY);
183 virtual ~CPanelCameraSelection();
186 const std::string §,
190 const std::string §,
194 wxTextCtrl* edRawlogLabel;
195 wxStaticText* StaticText10;
196 wxStaticText* StaticText9;
198 wxButton* btnBrowseRawlogDir;
199 wxRadioBox* rbBumblebeeSel;
200 wxButton* btnBrowseVideo;
201 wxStaticText* StaticText2;
203 wxCheckBox* cbKinect_3D;
204 wxRadioBox* rbKinect_int;
205 wxCheckBox* cbSR_chConf;
206 wxStaticText* StaticText6;
207 wxSpinCtrl* opencvCamIndex;
208 wxTextCtrl* edIPcamURL;
209 wxStaticText* StaticText8;
210 wxStaticText* StaticText11;
211 wxTextCtrl* edCustomCamConfig;
214 wxChoice* cbOpencvCamType;
215 wxStaticText* StaticText1;
216 wxStaticText* StaticText3;
217 wxRadioBox* rbSR_usb;
219 wxButton* btnBrowseRawlog;
221 wxCheckBox* cbGrayscale;
222 wxCheckBox* cbSR_chRange;
223 wxStaticText* StaticText5;
224 wxStaticText* StaticText7;
226 wxTextCtrl* edVideoFile;
227 wxCheckBox* cbBumblebeeRectif;
228 wxCheckBox* cbKinect_Int;
229 wxCheckBox* cbSR_chIntensity;
230 wxCheckBox* cbKinect_Depth;
231 wxNotebook* pagesCameras;
232 wxPanel* pnSwissRanger;
233 wxTextCtrl* edRawlogFile;
234 wxTextCtrl* edRawlogImgDir;
236 wxCheckBox* cbSR_ch3D;
237 wxStaticText* StaticText4;
238 wxChoice* cbOpencvResolution;
244 static const long ID_STATICTEXT1;
245 static const long ID_SPINCTRL1;
246 static const long ID_STATICTEXT3;
247 static const long ID_CHOICE1;
248 static const long ID_STATICTEXT6;
249 static const long ID_CHOICE2;
250 static const long ID_PANEL2;
251 static const long ID_STATICTEXT7;
252 static const long ID_TEXTCTRL1;
253 static const long ID_PANEL3;
254 static const long ID_TEXTCTRL6;
255 static const long ID_PANEL4;
256 static const long ID_STATICTEXT8;
257 static const long ID_TEXTCTRL2;
258 static const long ID_BUTTON7;
259 static const long ID_PANEL5;
260 static const long ID_STATICTEXT9;
261 static const long ID_TEXTCTRL3;
262 static const long ID_BUTTON8;
263 static const long ID_STATICTEXT5;
264 static const long ID_TEXTCTRL7;
265 static const long ID_BUTTON9;
266 static const long ID_STATICTEXT10;
267 static const long ID_TEXTCTRL8;
268 static const long ID_STATICTEXT11;
269 static const long ID_PANEL6;
270 static const long ID_RADIOBOX1;
271 static const long ID_CHECKBOX1;
272 static const long ID_STATICTEXT2;
273 static const long ID_PANEL7;
274 static const long ID_RADIOBOX2;
275 static const long ID_STATICTEXT4;
276 static const long ID_TEXTCTRL4;
277 static const long ID_CHECKBOX3;
278 static const long ID_CHECKBOX4;
279 static const long ID_CHECKBOX5;
280 static const long ID_CHECKBOX6;
281 static const long ID_PANEL1;
282 static const long ID_CHECKBOX7;
283 static const long ID_CHECKBOX8;
284 static const long ID_CHECKBOX9;
285 static const long ID_RADIOBOX3;
286 static const long ID_PANEL8;
287 static const long ID_NOTEBOOK1;
288 static const long ID_CHECKBOX2;
295 void OnbtnBrowseVideoClick(wxCommandEvent& event);
296 void OnbtnBrowseRawlogClick(wxCommandEvent& event);
297 void OnbtnBrowseRawlogDirClick(wxCommandEvent& event);
299 DECLARE_EVENT_TABLE()
306 struct TReturnAskUserOpenCamera
309 bool accepted_by_user;