1 | // Aseprite |
---|---|
2 | // Copyright (C) 2019-2020 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_TAG_WINDOW_H_INCLUDED |
9 | #define APP_UI_TAG_WINDOW_H_INCLUDED |
10 | #pragma once |
11 | |
12 | #include "app/ui/color_button.h" |
13 | #include "app/ui/user_data_view.h" |
14 | #include "doc/anidir.h" |
15 | #include "doc/frame.h" |
16 | #include "doc/user_data.h" |
17 | |
18 | #include "tag_properties.xml.h" |
19 | |
20 | namespace doc { |
21 | class Sprite; |
22 | class Tag; |
23 | } |
24 | |
25 | namespace app { |
26 | |
27 | class TagWindow : protected app::gen::TagProperties { |
28 | public: |
29 | TagWindow(const doc::Sprite* sprite, const doc::Tag* tag); |
30 | |
31 | bool show(); |
32 | |
33 | std::string nameValue(); |
34 | void rangeValue(doc::frame_t& from, doc::frame_t& to); |
35 | doc::AniDir aniDirValue(); |
36 | const doc::UserData& userDataValue() const { return m_userDataView.userData(); } |
37 | |
38 | private: |
39 | void onToggleUserData(); |
40 | |
41 | const doc::Sprite* m_sprite; |
42 | int m_base; |
43 | doc::UserData m_userData; |
44 | UserDataView m_userDataView; |
45 | }; |
46 | |
47 | } |
48 | |
49 | #endif |
50 |