diff options
author | crupest <crupest@outlook.com> | 2018-11-05 15:38:46 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-05 15:38:46 +0800 |
commit | 252519effe30881825dd02e26dc41bd9cde34782 (patch) | |
tree | 091a0b2e150d58ec640b981be74b274db609848c /src/ui/control.h | |
parent | a2922811243f276217d1546a1c55d85a8552c05a (diff) | |
download | cru-252519effe30881825dd02e26dc41bd9cde34782.tar.gz cru-252519effe30881825dd02e26dc41bd9cde34782.tar.bz2 cru-252519effe30881825dd02e26dc41bd9cde34782.zip |
...
Diffstat (limited to 'src/ui/control.h')
-rw-r--r-- | src/ui/control.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/ui/control.h b/src/ui/control.h index 666d7f69..e88228d0 100644 --- a/src/ui/control.h +++ b/src/ui/control.h @@ -12,6 +12,7 @@ #include "layout_base.h" #include "events/ui_event.h" #include "border_property.h" +#include "cursor.h" namespace cru { @@ -231,6 +232,18 @@ namespace cru additional_properties_[key] = std::make_any<T>(std::move(value)); } + + //*************** region: cursor *************** + Cursor::Ptr GetCursor() const + { + return cursor_; + } + + void SetCursor(const Cursor::Ptr& cursor); + + Cursor::Ptr GetCursorInherit(); + + //*************** region: events *************** //Raised when mouse enter the control. events::MouseEvent mouse_enter_event; @@ -346,10 +359,6 @@ namespace cru virtual Size OnMeasureContent(const Size& available_size); virtual void OnLayoutContent(const Rect& rect); - - //*************** region: cursor *************** - //TODO! - private: // Only for layout manager to use. // Check if the old position is updated to current position. @@ -408,6 +417,8 @@ namespace cru Microsoft::WRL::ComPtr<ID2D1Geometry> margin_geometry_; Microsoft::WRL::ComPtr<ID2D1Geometry> padding_geometry_; #endif + + Cursor::Ptr cursor_{}; }; // Find the lowest common ancestor. |