class mrpt::gui::mrptEventWindowClosed

An event sent by a window upon when it’s about to be closed, either manually by the user or programmatically.

The event field member allow_close is default by default, but can be set to false in the event callback to forbid the window to be closed by the user. If the event corresponds to a programatic close, this field is ignored.

IMPORTANTE NOTICE: Event handlers in your observer class will be invoked from the wxWidgets internal MRPT thread, so all your code in the handler must be thread safe.

See also:

CBaseGUIWindow

#include <mrpt/gui/CBaseGUIWindow.h>

class mrptEventWindowClosed: public mrpt::system::mrptEvent
{
public:
    //
fields

    CBaseGUIWindow* source_object;
    bool allow_close;

    // construction

    mrptEventWindowClosed(
        CBaseGUIWindow* obj,
        bool _allow_close = true
        );
};