1// Aseprite
2// Copyright (C) 2015-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_MOVING_SYMMETRY_STATE_H_INCLUDED
8#define APP_UI_EDITOR_MOVING_SYMMETRY_STATE_H_INCLUDED
9#pragma once
10
11#include "app/pref/preferences.h"
12#include "app/ui/editor/standby_state.h"
13
14namespace app {
15 class Editor;
16
17 class MovingSymmetryState : public StandbyState {
18 public:
19 MovingSymmetryState(Editor* editor, ui::MouseMessage* msg,
20 app::gen::SymmetryMode mode,
21 Option<double>& symmetryAxis);
22
23 virtual bool onMouseUp(Editor* editor, ui::MouseMessage* msg) override;
24 virtual bool onMouseMove(Editor* editor, ui::MouseMessage* msg) override;
25 virtual bool onUpdateStatusBar(Editor* editor) override;
26
27 virtual bool requireBrushPreview() override { return false; }
28
29 private:
30 app::gen::SymmetryMode m_symmetryMode;
31 Option<double>& m_symmetryAxis;
32 int m_symmetryAxisStart;
33 gfx::PointF m_mouseStart;
34 };
35
36} // namespace app
37
38#endif
39