diff options
author | crupest <crupest@outlook.com> | 2018-12-05 16:37:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-12-05 16:37:58 +0800 |
commit | 8898aee6c70bde922ee5de2a6213a44798525a16 (patch) | |
tree | 90b6fc6eb526e2421458f942f390906d6a48a628 /src/ui/layout_base.hpp | |
parent | 01b0378ed32eb2011863393892717483004cc375 (diff) | |
download | cru-8898aee6c70bde922ee5de2a6213a44798525a16.tar.gz cru-8898aee6c70bde922ee5de2a6213a44798525a16.tar.bz2 cru-8898aee6c70bde922ee5de2a6213a44798525a16.zip |
...
Diffstat (limited to 'src/ui/layout_base.hpp')
-rw-r--r-- | src/ui/layout_base.hpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/ui/layout_base.hpp b/src/ui/layout_base.hpp index 2ae21837..527d9f98 100644 --- a/src/ui/layout_base.hpp +++ b/src/ui/layout_base.hpp @@ -3,16 +3,10 @@ // ReSharper disable once CppUnusedIncludeDirective #include "pre.hpp" -#include <unordered_set> - -#include "base.hpp" #include "ui_base.hpp" namespace cru::ui { - class Control; - class Window; - enum class Alignment { Center, @@ -105,41 +99,4 @@ namespace cru::ui Thickness padding; Thickness margin; }; - - - class LayoutManager : public Object - { - public: - static LayoutManager* GetInstance(); - private: - LayoutManager() = default; - public: - LayoutManager(const LayoutManager& other) = delete; - LayoutManager(LayoutManager&& other) = delete; - LayoutManager& operator=(const LayoutManager& other) = delete; - LayoutManager& operator=(LayoutManager&& other) = delete; - ~LayoutManager() override = default; - - - //*************** region: position cache *************** - - //Mark position cache of the control and its descendants invalid, - //(which is saved as an auto-managed list internal) - //and send a message to refresh them. - void InvalidateControlPositionCache(Control* control); - - //Refresh position cache of the control and its descendants whose cache - //has been marked as invalid. - void RefreshInvalidControlPositionCache(); - - //Refresh position cache of the control and its descendants immediately. - static void RefreshControlPositionCache(Control* control); - - private: - static void RefreshControlPositionCacheInternal(Control* control, const Point& parent_lefttop_absolute); - - private: - std::unordered_set<Control*> cache_invalid_controls_; - std::unordered_set<Window*> layout_invalid_windows_; - }; } |