1 | // Aseprite UI Library |
2 | // Copyright (C) 2021 Igara Studio S.A. |
3 | // Copyright (C) 2001-2017 David Capello |
4 | // |
5 | // This file is released under the terms of the MIT license. |
6 | // Read LICENSE.txt for more information. |
7 | |
8 | #ifndef UI_POPUP_WINDOW_H_INCLUDED |
9 | #define |
10 | #pragma once |
11 | |
12 | #include "ui/window.h" |
13 | |
14 | namespace ui { |
15 | |
16 | class : public Window { |
17 | public: |
18 | enum class { |
19 | , |
20 | , |
21 | |
22 | }; |
23 | |
24 | enum class { |
25 | , |
26 | , |
27 | }; |
28 | |
29 | (const std::string& text = "" , |
30 | const ClickBehavior clickBehavior = ClickBehavior::CloseOnClickOutsideHotRegion, |
31 | const EnterBehavior enterBehavior = EnterBehavior::CloseOnEnter, |
32 | const bool withCloseButton = false); |
33 | (); |
34 | |
35 | // Sets the hot region. This region indicates the area where the |
36 | // mouse can be located and the window will be kept open. |
37 | // |
38 | // The screenRegion must be specified in native screen coordinates. |
39 | void (const gfx::Region& screenRegion); |
40 | |
41 | void (ClickBehavior behavior); |
42 | void (EnterBehavior behavior); |
43 | |
44 | void (); |
45 | void (); |
46 | |
47 | protected: |
48 | bool (Message* msg) override; |
49 | void (HitTestEvent& ev) override; |
50 | |
51 | virtual void (); |
52 | virtual void (); |
53 | |
54 | private: |
55 | void (); |
56 | void (); |
57 | |
58 | ClickBehavior ; |
59 | EnterBehavior ; |
60 | gfx::Region ; |
61 | bool = false; |
62 | bool = false; |
63 | }; |
64 | |
65 | class : public PopupWindow { |
66 | public: |
67 | (ClickBehavior clickBehavior); |
68 | protected: |
69 | void (InitThemeEvent& ev) override; |
70 | }; |
71 | |
72 | } // namespace ui |
73 | |
74 | #endif |
75 | |