1// Aseprite
2// Copyright (C) 2019 Igara Studio S.A.
3// Copyright (C) 2001-2017 David Capello
4//
5// This program is distributed under the terms of
6// the End-User License Agreement for Aseprite.
7
8#ifndef APP_UI_EDITOR_RULER_H_INCLUDED
9#define APP_UI_EDITOR_RULER_H_INCLUDED
10#pragma once
11
12#include "ui/base.h"
13
14namespace app {
15
16 // A ruler inside the editor. It is used by SelectBoxState to show
17 // rulers that can be dragged by the user.
18 class Ruler {
19 public:
20 Ruler()
21 : m_align(0)
22 , m_position(0) {
23 }
24
25 Ruler(const int align,
26 const int position)
27 : m_align(align)
28 , m_position(position) {
29 }
30
31 int align() const { return m_align; }
32 int position() const { return m_position; }
33
34 void setPosition(const int position) {
35 m_position = position;
36 }
37
38 private:
39 int m_align;
40 int m_position;
41 };
42
43} // namespace app
44
45#endif // APP_UI_EDITOR_RULER_H_INCLUDED
46