MeshLib Documentation
Loading...
Searching...
No Matches
MRSaveOnClose.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRViewerPlugin.h"
5
6namespace MR
7{
8
9// this plugin will show a message to the user if she closes the application when something is modified
10class MRVIEWER_CLASS SaveOnClosePlugin : public MR::ViewerPlugin, public MultiListener<PreDrawListener,InterruptCloseListener>
11{
12public:
13 MRVIEWER_API virtual void init( Viewer* _viewer ) override;
14 MRVIEWER_API virtual void shutdown() override;
15
16private:
17 virtual void preDraw_() override;
18 virtual bool interruptClose_() override;
19
20 bool initialized_{ false };
21 bool shouldClose_{ false };
22 bool showCloseModal_{ false };
23 // how long active modal will blink in seconds
24 float activeModalHighlightTimer_{ 0.0f };
25};
26
27} //namespace MR
Definition MRSaveOnClose.h:11
virtual MRVIEWER_API void shutdown() override
virtual MRVIEWER_API void init(Viewer *_viewer) override
Definition MRViewerPlugin.h:27
Definition MRCameraOrientationPlugin.h:8
Definition Viewer.dox.py:1
Definition MRViewerEventsListener.h:29