9 #ifndef MRPT_WX_UTILS_H
10 #define MRPT_WX_UTILS_H
21 #if MRPT_HAS_WXWIDGETS
24 #include <wx/statbmp.h>
26 #include <wx/toolbar.h>
29 #include <wx/statusbr.h>
30 #include <wx/msgdlg.h>
31 #include <wx/artprov.h>
32 #include <wx/bitmap.h>
35 #include <wx/string.h>
36 #include <wx/msgdlg.h>
38 #include <wx/filedlg.h>
39 #include <wx/progdlg.h>
40 #include <wx/imaglist.h>
41 #include <wx/busyinfo.h>
43 #include <wx/textdlg.h>
44 #include <wx/dirdlg.h>
45 #include <wx/colordlg.h>
46 #include <wx/dcmemory.h>
49 #include <wx/spinctrl.h>
51 #include <wx/notebook.h>
52 #include <wx/button.h>
54 #include <wx/stattext.h>
55 #include <wx/textctrl.h>
56 #include <wx/choice.h>
57 #include <wx/radiobox.h>
58 #include <wx/settings.h>
59 #include <wx/checkbox.h>
61 #include <wx/dcclient.h>
69 #if MRPT_HAS_WXWIDGETS
74 # define _U(x) wxString::From8BitData(x)
82 #define WX_START_TRY \
88 catch(std::exception &e) \
90 wxMessageBox( wxString(e.what(),wxConvUTF8), wxT("Exception"), wxOK, NULL); \
94 wxMessageBox( _("Untyped exception!"), _("Exception"), wxOK, NULL); \
114 wxImage
GUI_IMPEXP * IplImage2wxImage(
void* img );
126 mrpt::utils::CImagePtr
GUI_IMPEXP wxImage2MRPTImagePtr(
const wxImage &img );
133 class GUI_IMPEXP wxMRPTImageControl :
public wxPanel
139 wxPoint m_last_mouse_point, m_last_mouse_click;
143 wxMRPTImageControl( wxWindow *parent,wxWindowID winID,
int x,
int y,
int width,
int height);
144 virtual ~wxMRPTImageControl();
146 void AssignImage(wxBitmap *img);
148 void GetBitmap(wxBitmap &bmp);
150 void OnPaint(wxPaintEvent &ev);
151 void OnMouseMove(wxMouseEvent& ev);
152 void OnMouseClick(wxMouseEvent& ev);
154 void OnEraseBackground(wxEraseEvent &) { }
159 class GUI_IMPEXP CPanelCameraSelection:
public wxPanel
163 CPanelCameraSelection(wxWindow* parent,wxWindowID
id=wxID_ANY);
164 virtual ~CPanelCameraSelection();
167 const std::string §,
171 const std::string §,
175 wxTextCtrl* edRawlogLabel;
176 wxStaticText* StaticText10;
177 wxStaticText* StaticText9;
179 wxButton* btnBrowseRawlogDir;
180 wxRadioBox* rbBumblebeeSel;
181 wxButton* btnBrowseVideo;
182 wxStaticText* StaticText2;
184 wxCheckBox* cbKinect_3D;
185 wxRadioBox* rbKinect_int;
186 wxCheckBox* cbSR_chConf;
187 wxStaticText* StaticText6;
188 wxSpinCtrl* opencvCamIndex;
189 wxTextCtrl* edIPcamURL;
190 wxStaticText* StaticText8;
191 wxStaticText* StaticText11;
192 wxTextCtrl* edCustomCamConfig;
195 wxChoice* cbOpencvCamType;
196 wxStaticText* StaticText1;
197 wxStaticText* StaticText3;
198 wxRadioBox* rbSR_usb;
200 wxButton* btnBrowseRawlog;
202 wxCheckBox* cbGrayscale;
203 wxCheckBox* cbSR_chRange;
204 wxStaticText* StaticText5;
205 wxStaticText* StaticText7;
207 wxTextCtrl* edVideoFile;
208 wxCheckBox* cbBumblebeeRectif;
209 wxCheckBox* cbKinect_Int;
210 wxCheckBox* cbSR_chIntensity;
211 wxCheckBox* cbKinect_Depth;
212 wxNotebook* pagesCameras;
213 wxPanel* pnSwissRanger;
214 wxTextCtrl* edRawlogFile;
215 wxTextCtrl* edRawlogImgDir;
217 wxCheckBox* cbSR_ch3D;
218 wxStaticText* StaticText4;
219 wxChoice* cbOpencvResolution;
225 static const long ID_STATICTEXT1;
226 static const long ID_SPINCTRL1;
227 static const long ID_STATICTEXT3;
228 static const long ID_CHOICE1;
229 static const long ID_STATICTEXT6;
230 static const long ID_CHOICE2;
231 static const long ID_PANEL2;
232 static const long ID_STATICTEXT7;
233 static const long ID_TEXTCTRL1;
234 static const long ID_PANEL3;
235 static const long ID_TEXTCTRL6;
236 static const long ID_PANEL4;
237 static const long ID_STATICTEXT8;
238 static const long ID_TEXTCTRL2;
239 static const long ID_BUTTON7;
240 static const long ID_PANEL5;
241 static const long ID_STATICTEXT9;
242 static const long ID_TEXTCTRL3;
243 static const long ID_BUTTON8;
244 static const long ID_STATICTEXT5;
245 static const long ID_TEXTCTRL7;
246 static const long ID_BUTTON9;
247 static const long ID_STATICTEXT10;
248 static const long ID_TEXTCTRL8;
249 static const long ID_STATICTEXT11;
250 static const long ID_PANEL6;
251 static const long ID_RADIOBOX1;
252 static const long ID_CHECKBOX1;
253 static const long ID_STATICTEXT2;
254 static const long ID_PANEL7;
255 static const long ID_RADIOBOX2;
256 static const long ID_STATICTEXT4;
257 static const long ID_TEXTCTRL4;
258 static const long ID_CHECKBOX3;
259 static const long ID_CHECKBOX4;
260 static const long ID_CHECKBOX5;
261 static const long ID_CHECKBOX6;
262 static const long ID_PANEL1;
263 static const long ID_CHECKBOX7;
264 static const long ID_CHECKBOX8;
265 static const long ID_CHECKBOX9;
266 static const long ID_RADIOBOX3;
267 static const long ID_PANEL8;
268 static const long ID_NOTEBOOK1;
269 static const long ID_CHECKBOX2;
276 void OnbtnBrowseVideoClick(wxCommandEvent& event);
277 void OnbtnBrowseRawlogClick(wxCommandEvent& event);
278 void OnbtnBrowseRawlogDirClick(wxCommandEvent& event);
280 DECLARE_EVENT_TABLE()
287 struct TReturnAskUserOpenCamera
290 bool accepted_by_user;