diff options
author | crupest <crupest@outlook.com> | 2018-11-13 22:24:17 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-13 22:24:17 +0800 |
commit | 38a523be0085a9b529043bddc61e4aee04a6768d (patch) | |
tree | 4003c4795f111631f1df07e0b1fdd1c2b626b608 /src/ui/control.hpp | |
parent | 91dda866a0919f9e6cfb5e7857ac0466572d96d8 (diff) | |
download | cru-38a523be0085a9b529043bddc61e4aee04a6768d.tar.gz cru-38a523be0085a9b529043bddc61e4aee04a6768d.tar.bz2 cru-38a523be0085a9b529043bddc61e4aee04a6768d.zip |
Add enhanced bound check.
Diffstat (limited to 'src/ui/control.hpp')
-rw-r--r-- | src/ui/control.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/control.hpp b/src/ui/control.hpp index 7afc0c4e..75c10c04 100644 --- a/src/ui/control.hpp +++ b/src/ui/control.hpp @@ -117,6 +117,8 @@ namespace cru::ui //Absolute point to local point. Point WindowToControl(const Point& point) const; + // Default implement in Control is test point in border geometry's + // fill and stroke with width of border. virtual bool IsPointInside(const Point& point); @@ -264,6 +266,8 @@ namespace cru::ui void RaisePositionChangedEvent(events::PositionChangedEventArgs& args); void RaiseSizeChangedEvent(events::SizeChangedEventArgs& args); + void RegenerateBorderGeometry(); + //*************** region: mouse event *************** virtual void OnMouseEnter(events::MouseEventArgs& args); virtual void OnMouseLeave(events::MouseEventArgs& args); @@ -368,6 +372,8 @@ namespace cru::ui bool is_bordered_ = false; BorderProperty border_property_; + Microsoft::WRL::ComPtr<ID2D1RoundedRectangleGeometry> border_geometry_ = nullptr; + AnyMap additional_property_map_{}; bool is_focus_on_pressed_ = true; |