Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Protected Attributes
mrpt::gui::wxMRPTImageControl Class Reference

Detailed Description

A custom control to display the bitmap and avoid flicker.

Definition at line 141 of file WxUtils.h.

#include <mrpt/gui/WxUtils.h>

Inheritance diagram for mrpt::gui::wxMRPTImageControl:
Inheritance graph

Public Member Functions

 wxMRPTImageControl (wxWindow *parent, wxWindowID winID, int x, int y, int width, int height)
 
virtual ~wxMRPTImageControl ()
 
void AssignImage (wxBitmap *img)
 Assigns this image. More...
 
void AssignImage (const mrpt::utils::CImage &img)
 Assigns this image. More...
 
void GetBitmap (wxBitmap &bmp)
 
void OnPaint (wxPaintEvent &ev)
 
void OnMouseMove (wxMouseEvent &ev)
 
void OnMouseClick (wxMouseEvent &ev)
 
void OnEraseBackground (wxEraseEvent &)
 

Protected Attributes

wxBitmap * m_img
 
std::mutex m_img_cs
 
wxPoint m_last_mouse_point
 
wxPoint m_last_mouse_click
 
std::mutex m_mouse_cs
 

Constructor & Destructor Documentation

◆ wxMRPTImageControl()

wxMRPTImageControl::wxMRPTImageControl ( wxWindow *  parent,
wxWindowID  winID,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 304 of file WxUtils.cpp.

References OnMouseClick(), OnMouseMove(), and OnPaint().

Here is the call graph for this function:

◆ ~wxMRPTImageControl()

wxMRPTImageControl::~wxMRPTImageControl ( )
virtual

Definition at line 319 of file WxUtils.cpp.

References m_img, and m_img_cs.

Member Function Documentation

◆ AssignImage() [1/2]

void wxMRPTImageControl::AssignImage ( wxBitmap *  img)

Assigns this image.

This object has the ownship of the image and will delete it when appropriate. Remember to call Refresh to display the image.

Definition at line 341 of file WxUtils.cpp.

References m_img, and m_img_cs.

◆ AssignImage() [2/2]

void wxMRPTImageControl::AssignImage ( const mrpt::utils::CImage img)

Assigns this image.

Remember to call Refresh to display the image.

Definition at line 353 of file WxUtils.cpp.

References m_img, m_img_cs, and mrpt::gui::MRPTImage2wxBitmap().

Here is the call graph for this function:

◆ GetBitmap()

void wxMRPTImageControl::GetBitmap ( wxBitmap &  bmp)

Definition at line 381 of file WxUtils.cpp.

References m_img, and m_img_cs.

◆ OnEraseBackground()

void mrpt::gui::wxMRPTImageControl::OnEraseBackground ( wxEraseEvent &  )
inline

Definition at line 168 of file WxUtils.h.

◆ OnMouseClick()

void wxMRPTImageControl::OnMouseClick ( wxMouseEvent &  ev)

Definition at line 335 of file WxUtils.cpp.

References m_last_mouse_click, and m_mouse_cs.

Referenced by wxMRPTImageControl().

Here is the caller graph for this function:

◆ OnMouseMove()

void wxMRPTImageControl::OnMouseMove ( wxMouseEvent &  ev)

Definition at line 329 of file WxUtils.cpp.

References m_last_mouse_point, and m_mouse_cs.

Referenced by wxMRPTImageControl().

Here is the caller graph for this function:

◆ OnPaint()

void wxMRPTImageControl::OnPaint ( wxPaintEvent &  ev)

Definition at line 367 of file WxUtils.cpp.

References m_img, and m_img_cs.

Referenced by wxMRPTImageControl().

Here is the caller graph for this function:

Member Data Documentation

◆ m_img

wxBitmap* mrpt::gui::wxMRPTImageControl::m_img
protected

Definition at line 144 of file WxUtils.h.

Referenced by AssignImage(), GetBitmap(), OnPaint(), and ~wxMRPTImageControl().

◆ m_img_cs

std::mutex mrpt::gui::wxMRPTImageControl::m_img_cs
protected

Definition at line 145 of file WxUtils.h.

Referenced by AssignImage(), GetBitmap(), OnPaint(), and ~wxMRPTImageControl().

◆ m_last_mouse_click

wxPoint mrpt::gui::wxMRPTImageControl::m_last_mouse_click
protected

Definition at line 147 of file WxUtils.h.

Referenced by OnMouseClick().

◆ m_last_mouse_point

wxPoint mrpt::gui::wxMRPTImageControl::m_last_mouse_point
protected

Definition at line 147 of file WxUtils.h.

Referenced by OnMouseMove().

◆ m_mouse_cs

std::mutex mrpt::gui::wxMRPTImageControl::m_mouse_cs
protected

Definition at line 148 of file WxUtils.h.

Referenced by OnMouseClick(), and OnMouseMove().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019