| 1 | // Aseprite UI Library |
| 2 | // Copyright (C) 2001-2013 David Capello |
| 3 | // |
| 4 | // This file is released under the terms of the MIT license. |
| 5 | // Read LICENSE.txt for more information. |
| 6 | |
| 7 | #ifndef UI_CLOSE_EVENT_H_INCLUDED |
| 8 | #define UI_CLOSE_EVENT_H_INCLUDED |
| 9 | #pragma once |
| 10 | |
| 11 | #include "ui/event.h" |
| 12 | |
| 13 | namespace ui { |
| 14 | |
| 15 | class CloseEvent : public Event |
| 16 | { |
| 17 | public: |
| 18 | CloseEvent(Component* source) |
| 19 | : Event(source) |
| 20 | , m_canceled(false) { } |
| 21 | void cancel() { m_canceled = true; } |
| 22 | bool canceled() const { return m_canceled; } |
| 23 | |
| 24 | private: |
| 25 | bool m_canceled; |
| 26 | }; |
| 27 | |
| 28 | } // namespace ui |
| 29 | |
| 30 | #endif // UI_CLOSE_EVENT_H_INCLUDED |
| 31 | |