aboutsummaryrefslogtreecommitdiff
path: root/src/ui/layout_base.hpp
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2018-12-06 03:48:18 +0800
committerGitHub <noreply@github.com>2018-12-06 03:48:18 +0800
commitf0e2b2d3763dd100a5e9d6cda566724d2b7da965 (patch)
tree24a3c1d5d4a37b724a5a5d694894ac9c09d2e6f0 /src/ui/layout_base.hpp
parent1166da612f01172270114921eb6785998ef88476 (diff)
parenta0ddf6549313f4b81d55d3c25c724c809230967f (diff)
downloadcru-f0e2b2d3763dd100a5e9d6cda566724d2b7da965.tar.gz
cru-f0e2b2d3763dd100a5e9d6cda566724d2b7da965.tar.bz2
cru-f0e2b2d3763dd100a5e9d6cda566724d2b7da965.zip
Merge pull request #34 from crupest/dev
Improve layout.
Diffstat (limited to 'src/ui/layout_base.hpp')
-rw-r--r--src/ui/layout_base.hpp43
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_;
- };
}