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_ZOOMING_STATE_H_INCLUDED |
8 | #define APP_UI_EDITOR_ZOOMING_STATE_H_INCLUDED |
9 | #pragma once |
10 | |
11 | #include "app/ui/editor/editor_state.h" |
12 | #include "gfx/point.h" |
13 | #include "render/zoom.h" |
14 | |
15 | namespace app { |
16 | |
17 | class ZoomingState : public EditorState { |
18 | public: |
19 | ZoomingState(); |
20 | virtual bool isTemporalState() const override { return true; } |
21 | virtual bool onMouseDown(Editor* editor, ui::MouseMessage* msg) override; |
22 | virtual bool onMouseUp(Editor* editor, ui::MouseMessage* msg) override; |
23 | virtual bool onMouseMove(Editor* editor, ui::MouseMessage* msg) override; |
24 | virtual bool onSetCursor(Editor* editor, const gfx::Point& mouseScreenPos) override; |
25 | virtual bool onKeyDown(Editor* editor, ui::KeyMessage* msg) override; |
26 | virtual bool onKeyUp(Editor* editor, ui::KeyMessage* msg) override; |
27 | virtual bool onUpdateStatusBar(Editor* editor) override; |
28 | |
29 | private: |
30 | gfx::Point m_startPos; |
31 | render::Zoom m_startZoom; |
32 | bool m_moved; |
33 | }; |
34 | |
35 | } // namespace app |
36 | |
37 | #endif // APP_UI_EDITOR_ZOOMING_STATE_H_INCLUDED |
38 | |