class mrpt::gui::CWindowDialog::wxMRPTImageControl

Overview

A custom control to display the bitmap and avoid flicker.

#include <mrpt/gui/WxSubsystem.h>

class wxMRPTImageControl: public wxPanel
{
public:
    // fields

    wxPoint m_last_mouse_point;
    wxPoint m_last_mouse_click;

    // construction

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

    // methods

    void AssignImage(wxBitmap* img);
    void GetBitmap(wxBitmap& bmp);
    void OnPaint(wxPaintEvent& ev);
    void OnMouseMove(wxMouseEvent& ev);
    void OnMouseClick(wxMouseEvent& ev);
    void OnChar(wxKeyEvent& ev);
    void OnEraseBackground(wxEraseEvent& ev);
};

Methods

void AssignImage(wxBitmap* img)

Assigns this image.

This object has the ownship of the image and will delete it when appropriate.