MRPT  1.9.9
Classes | Namespaces | Macros | Functions
Utilities for MRPT-wxWidgets interfacing (in

Detailed Description

#include <mrpt/gui/WxUtils.h>)

Collaboration diagram for Utilities for MRPT-wxWidgets interfacing (in:

Classes

class  mrpt::gui::wxMRPTImageControl
 A custom control to display the bitmap and avoid flicker. More...
 
class  mrpt::gui::CPanelCameraSelection
 A panel to select the camera input from all the formats supported by MRPT. More...
 

Namespaces

 mrpt::gui::detail
 Auxiliary structures used internally to mrpt.
 

Macros

#define WX_START_TRY
 
#define WX_END_TRY
 

Functions

wxImage * mrpt::gui::MRPTImage2wxImage (const mrpt::img::CImage &img)
 Create a wxImage from a MRPT image. More...
 
wxBitmap * mrpt::gui::MRPTImage2wxBitmap (const mrpt::img::CImage &img)
 Create a wxBitmap from a MRPT image. More...
 
mrpt::img::CImagemrpt::gui::wxImage2MRPTImage (const wxImage &img)
 Create a MRPT image from a wxImage. More...
 
mrpt::img::CImage::Ptr mrpt::gui::wxImage2MRPTImagePtr (const wxImage &img)
 Create a MRPT image from a wxImage. More...
 
mrptKeyModifier mrpt::gui::keyEventToMrptKeyModifier (const wxKeyEvent &ev)
 Extracts the key modifiers from a wxKeyEvent. More...
 

Macro Definition Documentation

◆ WX_END_TRY

#define WX_END_TRY
Value:
} \
catch (std::exception & e) \
{ \
wxMessageBox( \
mrpt::exception_to_str(e), wxT("Exception"), wxOK, nullptr); \
} \
catch (...) \
{ \
wxMessageBox(_("Untyped exception!"), _("Exception"), wxOK, nullptr); \
}
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
Definition: exceptions.cpp:59

Definition at line 75 of file WxUtils.h.

◆ WX_START_TRY

#define WX_START_TRY
Value:
try \
{

Definition at line 72 of file WxUtils.h.

Function Documentation

◆ keyEventToMrptKeyModifier()

mrptKeyModifier mrpt::gui::keyEventToMrptKeyModifier ( const wxKeyEvent &  ev)

Extracts the key modifiers from a wxKeyEvent.

Definition at line 939 of file WxUtils.cpp.

References mrpt::gui::MRPTKMOD_ALT, mrpt::gui::MRPTKMOD_CMD, mrpt::gui::MRPTKMOD_CONTROL, mrpt::gui::MRPTKMOD_META, mrpt::gui::MRPTKMOD_NONE, and mrpt::gui::MRPTKMOD_SHIFT.

Referenced by mrpt::gui::CWindowDialog::OnChar(), and mrpt::gui::CWindowDialogPlots::OnChar().

Here is the caller graph for this function:

◆ MRPTImage2wxBitmap()

wxBitmap * mrpt::gui::MRPTImage2wxBitmap ( const mrpt::img::CImage img)

Create a wxBitmap from a MRPT image.

The new object must be freed by the user when not required anymore.

See also
MRPTImage2wxImage

Definition at line 74 of file WxUtils.cpp.

References mrpt::gui::MRPTImage2wxImage(), and THROW_EXCEPTION.

Referenced by mrpt::gui::wxMRPTImageControl::AssignImage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MRPTImage2wxImage()

wxImage * mrpt::gui::MRPTImage2wxImage ( const mrpt::img::CImage img)

Create a wxImage from a MRPT image.

The new object must be freed by the user when not required anymore.

See also
MRPTImage2wxImage

Definition at line 24 of file WxUtils.cpp.

References mrpt::img::CH_RGB, mrpt::img::CImage::colorImage(), mrpt::opengl::internal::data, mrpt::img::CImage::getChannelCount(), mrpt::img::CImage::getChannelsOrder(), mrpt::img::CImage::getHeight(), mrpt::img::CImage::getRowStride(), mrpt::img::CImage::getWidth(), mrpt::img::CImage::isColor(), mrpt::img::CImage::makeDeepCopy(), mrpt::system::os::memcpy(), mrpt::img::CImage::ptrLine(), mrpt::img::SHALLOW_COPY, mrpt::img::CImage::swapRB(), and THROW_EXCEPTION.

Referenced by mrpt::gui::CDisplayWindowPlots::image(), mrpt::gui::MRPTImage2wxBitmap(), and mrpt::gui::CDisplayWindow::showImage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wxImage2MRPTImage()

mrpt::img::CImage * mrpt::gui::wxImage2MRPTImage ( const wxImage &  img)

Create a MRPT image from a wxImage.

The new object must be freed by the user when not required anymore. It is recommended to use wxImage2MRPTImagePtr instead since smart pointers are safer to manage.

See also
wxImage2MRPTImage, wxImage2MRPTImagePtr

Definition at line 89 of file WxUtils.cpp.

Referenced by mrpt::gui::wxImage2MRPTImagePtr().

Here is the caller graph for this function:

◆ wxImage2MRPTImagePtr()

mrpt::img::CImage::Ptr mrpt::gui::wxImage2MRPTImagePtr ( const wxImage &  img)

Create a MRPT image from a wxImage.

The new object is returned as a smart pointer to a CImage object.

See also
wxImage2MRPTImage

Definition at line 105 of file WxUtils.cpp.

References mrpt::gui::wxImage2MRPTImage().

Here is the call graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020