diff options
author | crupest <crupest@outlook.com> | 2018-11-24 00:41:38 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-24 00:41:38 +0800 |
commit | d4658bfd97e1770e7ab4de356b3fd8c0d1999493 (patch) | |
tree | aa91d04d7abfe776625ed2980bcae82fbfd516d0 /CruUI-Generate/cru_ui.hpp | |
parent | e8589550140d20b675fa7736441d7cdd1daee4d7 (diff) | |
download | cru-d4658bfd97e1770e7ab4de356b3fd8c0d1999493.tar.gz cru-d4658bfd97e1770e7ab4de356b3fd8c0d1999493.tar.bz2 cru-d4658bfd97e1770e7ab4de356b3fd8c0d1999493.zip |
Improve hit test for clip.
Diffstat (limited to 'CruUI-Generate/cru_ui.hpp')
-rw-r--r-- | CruUI-Generate/cru_ui.hpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/CruUI-Generate/cru_ui.hpp b/CruUI-Generate/cru_ui.hpp index ab070ba1..62a2158a 100644 --- a/CruUI-Generate/cru_ui.hpp +++ b/CruUI-Generate/cru_ui.hpp @@ -597,7 +597,6 @@ namespace cru //-------------------------------------------------------- #include <map> -#include <list> #include <memory> //-------------------------------------------------------- @@ -1619,6 +1618,8 @@ namespace cru::ui // fill and stroke with width of border. virtual bool IsPointInside(const Point& point); + // Get the top control among all descendants (including self) in local coordinate. + Control* HitTest(const Point& point); //*************** region: graphic *************** @@ -2165,15 +2166,6 @@ namespace cru::ui void SetSizeFitContent(const Size& max_size = Size(1000, 1000)); - //*************** region: functions *************** - - //Refresh control list. - //It should be invoked every time a control is added or removed from the tree. - void RefreshControlList(); - - //Get the most top control at "point". - Control* HitTest(const Point& point); - //*************** region: focus *************** @@ -2277,8 +2269,6 @@ namespace cru::ui Window* parent_window_ = nullptr; std::shared_ptr<graph::WindowRenderTarget> render_target_{}; - std::list<Control*> control_list_{}; - Control* mouse_hover_control_ = nullptr; bool window_focus_ = false; |