aboutsummaryrefslogtreecommitdiff
path: root/CruUI/ui/window.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-20 22:50:37 +0800
committercrupest <crupest@outlook.com>2018-09-20 22:50:37 +0800
commit5f7d3268e3d2ea84a1afc97c209b703bf4092c76 (patch)
tree8cab3c7457420b55376e5825f0cdfefd47551c00 /CruUI/ui/window.cpp
parent6cd7b4e168fdda6bf83187cda9269cad5f9ee0ed (diff)
downloadcru-5f7d3268e3d2ea84a1afc97c209b703bf4092c76.tar.gz
cru-5f7d3268e3d2ea84a1afc97c209b703bf4092c76.tar.bz2
cru-5f7d3268e3d2ea84a1afc97c209b703bf4092c76.zip
Improve linear layout.
Diffstat (limited to 'CruUI/ui/window.cpp')
-rw-r--r--CruUI/ui/window.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/CruUI/ui/window.cpp b/CruUI/ui/window.cpp
index 926fd77a..21528d9d 100644
--- a/CruUI/ui/window.cpp
+++ b/CruUI/ui/window.cpp
@@ -77,6 +77,14 @@ namespace cru
return find_result->second;
}
+ Vector<Window*> WindowManager::GetAllWindows() const
+ {
+ Vector<Window*> windows;
+ for (auto [key, value] : window_map_)
+ windows.push_back(value);
+ return std::move(windows);
+ }
+
inline Point PiToDip(const POINT& pi_point)
{
return Point(
@@ -401,6 +409,17 @@ namespace cru
}
}
+#ifdef CRU_DEBUG_DRAW_CONTROL_BORDER
+ void Window::SetDebugDrawControlBorder(const bool value)
+ {
+ if (debug_draw_control_border_ != value)
+ {
+ debug_draw_control_border_ = value;
+ Repaint();
+ }
+ }
+#endif
+
RECT Window::GetClientRectPixel() {
RECT rect{ };
GetClientRect(hwnd_, &rect);