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>
73 #if MRPT_HAS_WXWIDGETS
78 # define _U(x) wxString::From8BitData(x)
86 #define WX_START_TRY \
92 catch(std::exception &e) \
94 wxMessageBox( wxString(e.what(),wxConvUTF8), wxT("Exception"), wxOK, NULL); \
98 wxMessageBox( _("Untyped exception!"), _("Exception"), wxOK, NULL); \
150 void AssignImage(wxBitmap *
img);
152 void GetBitmap(wxBitmap &bmp);
154 void OnPaint(wxPaintEvent &ev);
155 void OnMouseMove(wxMouseEvent& ev);
156 void OnMouseClick(wxMouseEvent& ev);
280 void OnbtnBrowseVideoClick(wxCommandEvent& event);
281 void OnbtnBrowseRawlogClick(wxCommandEvent& event);
282 void OnbtnBrowseRawlogDirClick(wxCommandEvent& event);
284 DECLARE_EVENT_TABLE()
A panel to select the camera input from all the formats supported by MRPT.
static const long ID_PANEL7
static const long ID_CHECKBOX2
wxTextCtrl * edCustomCamConfig
wxChoice * cbOpencvCamType
static const long ID_SPINCTRL1
wxChoice * cbOpencvResolution
wxCheckBox * cbKinect_Depth
wxStaticText * StaticText11
wxStaticText * StaticText6
static const long ID_PANEL5
static const long ID_PANEL8
static const long ID_CHECKBOX1
wxStaticText * StaticText3
static const long ID_TEXTCTRL4
static const long ID_PANEL1
static const long ID_STATICTEXT11
wxStaticText * StaticText8
static const long ID_PANEL3
wxTextCtrl * edRawlogFile
static const long ID_CHECKBOX7
wxTextCtrl * edRawlogLabel
wxButton * btnBrowseVideo
wxStaticText * StaticText1
static const long ID_RADIOBOX3
static const long ID_BUTTON9
static const long ID_STATICTEXT8
wxStaticText * StaticText2
wxStaticText * StaticText7
wxCheckBox * cbKinect_Int
static const long ID_BUTTON7
wxButton * btnBrowseRawlogDir
wxCheckBox * cbSR_chIntensity
static const long ID_PANEL6
static const long ID_BUTTON8
static const long ID_STATICTEXT5
static const long ID_STATICTEXT4
static const long ID_CHECKBOX8
wxNotebook * pagesCameras
static const long ID_TEXTCTRL6
static const long ID_TEXTCTRL7
wxRadioBox * rbKinect_int
static const long ID_PANEL4
wxButton * btnBrowseRawlog
static const long ID_NOTEBOOK1
static const long ID_RADIOBOX2
static const long ID_CHECKBOX6
static const long ID_STATICTEXT1
static const long ID_CHOICE2
static const long ID_STATICTEXT7
static const long ID_STATICTEXT2
static const long ID_STATICTEXT9
static const long ID_PANEL2
static const long ID_TEXTCTRL3
static const long ID_CHECKBOX3
wxCheckBox * cbBumblebeeRectif
static const long ID_RADIOBOX1
wxTextCtrl * edRawlogImgDir
wxStaticText * StaticText4
wxStaticText * StaticText5
static const long ID_TEXTCTRL8
static const long ID_TEXTCTRL1
wxStaticText * StaticText9
wxStaticText * StaticText10
static const long ID_STATICTEXT3
wxSpinCtrl * opencvCamIndex
wxCheckBox * cbSR_chRange
static const long ID_CHECKBOX4
static const long ID_CHOICE1
wxRadioBox * rbBumblebeeSel
static const long ID_STATICTEXT6
static const long ID_TEXTCTRL2
static const long ID_STATICTEXT10
static const long ID_CHECKBOX9
static const long ID_CHECKBOX5
A custom control to display the bitmap and avoid flicker.
mrpt::synch::CCriticalSection m_mouse_cs
wxPoint m_last_mouse_click
mrpt::synch::CCriticalSection m_img_cs
void OnEraseBackground(wxEraseEvent &)
This class provides simple critical sections functionality.
This class allows loading and storing values and vectors of different types from a configuration text...
This class implements a config file-like interface over a memory-stored string list.
A class for storing images as grayscale or RGB bitmaps.
GLenum GLsizei GLsizei height
GLsizei const GLchar ** string
wxImage GUI_IMPEXP * MRPTImage2wxImage(const mrpt::utils::CImage &img)
Create a wxImage from a MRPT image.
wxBitmap GUI_IMPEXP * MRPTImage2wxBitmap(const mrpt::utils::CImage &img)
Create a wxBitmap from a MRPT image.
mrpt::utils::CImage GUI_IMPEXP * wxImage2MRPTImage(const wxImage &img)
Create a MRPT image from a wxImage.
wxImage GUI_IMPEXP * IplImage2wxImage(void *img)
Create a wxImage from a IPL image.
mrptKeyModifier keyEventToMrptKeyModifier(const wxKeyEvent &ev)
Extracts the key modifiers from a wxKeyEvent.
mrpt::utils::CImagePtr GUI_IMPEXP wxImage2MRPTImagePtr(const wxImage &img)
Create a MRPT image from a wxImage.
void HWDRIVERS_IMPEXP readConfigIntoVideoSourcePanel(void *panel, const std::string &in_cfgfile_section_name, const mrpt::utils::CConfigFileBase *in_cfgfile)
Parse the given section of the given configuration file and set accordingly the controls of the wxWid...
void HWDRIVERS_IMPEXP writeConfigFromVideoSourcePanel(void *panel, const std::string &in_cfgfile_section_name, mrpt::utils::CConfigFileBase *out_cfgfile)
Parse the user options in the wxWidgets "panel" and write the configuration into the given section of...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::utils::CConfigFileMemory selectedConfig