1 | // Aseprite |
2 | // Copyright (C) 2001-2016 David Capello |
3 | // |
4 | // This program is distributed under the terms of |
5 | // the End-User License Agreement for Aseprite. |
6 | |
7 | #ifndef APP_UI_EDITOR_OBSERVER_H_INCLUDED |
8 | #define APP_UI_EDITOR_OBSERVER_H_INCLUDED |
9 | #pragma once |
10 | |
11 | namespace app { |
12 | |
13 | class Editor; |
14 | |
15 | class EditorObserver { |
16 | public: |
17 | virtual ~EditorObserver() { } |
18 | virtual void dispose() { } |
19 | |
20 | virtual void onDestroyEditor(Editor* editor) { } |
21 | |
22 | // Called when the editor's state changes. |
23 | virtual void onStateChanged(Editor* editor) { } |
24 | |
25 | // Called when the scroll or zoom of the editor changes. |
26 | virtual void onScrollChanged(Editor* editor) { } |
27 | virtual void onZoomChanged(Editor* editor) { } |
28 | |
29 | // Called when the current frame of the editor changes. |
30 | virtual void onBeforeFrameChanged(Editor* editor) { } |
31 | virtual void onAfterFrameChanged(Editor* editor) { } |
32 | |
33 | // Called when the current layer of the editor changes. |
34 | virtual void onBeforeLayerChanged(Editor* editor) { } |
35 | virtual void onAfterLayerChanged(Editor* editor) { } |
36 | }; |
37 | |
38 | } // namespace app |
39 | |
40 | #endif // APP_UI_EDITOR_OBSERVER_H_INCLUDED |
41 | |