aboutsummaryrefslogtreecommitdiff
path: root/src/ui/window.hpp
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2018-11-10 22:39:26 +0800
committerGitHub <noreply@github.com>2018-11-10 22:39:26 +0800
commit8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df (patch)
tree2d00b4f6a7af93a13d271d78e6ef682c335c91c7 /src/ui/window.hpp
parent7c2fb4578b6997b5ab0d98121cda253f734139c1 (diff)
parentb2eced8d9719eb00796c2674fc2c23ab0c9bbdbf (diff)
downloadcru-8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df.tar.gz
cru-8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df.tar.bz2
cru-8b04c0dd788be75c2dd7d8f58aebc7d6bf6752df.zip
Merge pull request #11 from crupest/listitem
Add ListItem.
Diffstat (limited to 'src/ui/window.hpp')
-rw-r--r--src/ui/window.hpp20
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