diff options
Diffstat (limited to 'src/ui/control.hpp')
-rw-r--r-- | src/ui/control.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/control.hpp b/src/ui/control.hpp index 6c5b0ea5..1ce4afe3 100644 --- a/src/ui/control.hpp +++ b/src/ui/control.hpp @@ -32,7 +32,7 @@ namespace cru::ui friend class Window; friend class LayoutManager; - private: + protected: struct GeometryInfo { Microsoft::WRL::ComPtr<ID2D1Geometry> border_geometry = nullptr; @@ -309,7 +309,12 @@ namespace cru::ui void RaisePositionChangedEvent(events::PositionChangedEventArgs& args); void RaiseSizeChangedEvent(events::SizeChangedEventArgs& args); - void RegenerateGeometries(); + void RegenerateGeometryInfo(); + + const GeometryInfo& GetGeometryInfo() const + { + return geometry_info_; + } //*************** region: mouse event *************** virtual void OnMouseEnter(events::MouseEventArgs& args); @@ -366,6 +371,9 @@ namespace cru::ui virtual Size OnMeasureContent(const Size& available_size); virtual void OnLayoutContent(const Rect& rect); + // Called by Layout after set position and size. + virtual void AfterLayoutSelf(); + private: // Only for layout manager to use. // Check if the old position is updated to current position. |