diff options
Diffstat (limited to 'src/ui/window.hpp')
-rw-r--r-- | src/ui/window.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/ui/window.hpp b/src/ui/window.hpp index 963bff78..b2b8cde0 100644 --- a/src/ui/window.hpp +++ b/src/ui/window.hpp @@ -162,6 +162,13 @@ namespace cru::ui //The lefttop of the rect is relative to screen lefttop. void SetWindowRect(const Rect& rect); + //Set the lefttop of the window relative to screen. + void SetWindowPosition(const Point& position); + + Point PointToScreen(const Point& point); + + Point PointFromScreen(const Point& point); + //Handle the raw window message. //Return true if the message is handled and get the result through "result" argument. //Return false if the message is not handled. @@ -192,8 +199,12 @@ namespace cru::ui //*************** region: layout *************** + void WindowInvalidateLayout(); + void Relayout(); + void SetSizeFitContent(const Size& max_size = Size(1000, 1000)); + //*************** region: functions *************** //Refresh control list. @@ -250,11 +261,6 @@ namespace cru::ui void SetCursorInternal(HCURSOR cursor); - //*************** region: layout *************** - - Size OnMeasureContent(const Size& available_size) override; - - //*************** region: native messages *************** void OnDestroyInternal(); @@ -319,7 +325,9 @@ namespace cru::ui Control* focus_control_ = this; // "focus_control_" can't be nullptr Control* mouse_capture_control_ = nullptr; - + + bool is_layout_invalid_ = false; + #ifdef CRU_DEBUG_LAYOUT bool debug_layout_ = false; #endif |