class mrpt::graphslam::CWindowObserver

Monitor events in the visualization window.

#include <mrpt/graphslam/misc/CWindowObserver.h>

class CWindowObserver: public mrpt::system::CObserver
{
public:
    //
methods

    void returnEventsStruct(
        std::map<std::string, bool>* codes_to_pressed,
        bool reset_keypresses = true
        );

    void registerKeystroke(const std::string key_str, const std::string key_desc);
};

Inherited Members

public:
    //
methods

    void observeBegin(CObservable& obj);
    void observeEnd(CObservable& obj);

Methods

void returnEventsStruct(
    std::map<std::string, bool>* codes_to_pressed,
    bool reset_keypresses = true
    )

Return a map of key code to a boolean indicating whether it was pressed since the previous time the class was quarried.

By default the codes are reset every time the method is invoked, unless reset_keypresses<**> is set to False

void registerKeystroke(const std::string key_str, const std::string key_desc)

Make new keystrokes available in the help message box.

Classes with access to the CWindowObserver can use this method to add keystrokes according to their needs