aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ContentControl.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-24 19:14:19 +0800
committercrupest <crupest@outlook.com>2021-03-24 19:14:19 +0800
commit7f15a1ff9a2007e119798053083a0a87d042990a (patch)
treecb35c01a7eaee867376d959b96c9bbd15df939e5 /src/ui/ContentControl.cpp
parent74956951ee663012df0c3fe4ebe29799cb2f7732 (diff)
parent7703063a5816b089483e78ccd74bb9902ccfbea8 (diff)
downloadcru-7f15a1ff9a2007e119798053083a0a87d042990a.tar.gz
cru-7f15a1ff9a2007e119798053083a0a87d042990a.tar.bz2
cru-7f15a1ff9a2007e119798053083a0a87d042990a.zip
Merge branch 'master' of https://github.com/crupest/CruUI
Diffstat (limited to 'src/ui/ContentControl.cpp')
-rw-r--r--src/ui/ContentControl.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/ui/ContentControl.cpp b/src/ui/ContentControl.cpp
deleted file mode 100644
index 8d1a17d2..00000000
--- a/src/ui/ContentControl.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "cru/ui/ContentControl.hpp"
-
-#include "cru/ui/Window.hpp"
-
-namespace cru::ui {
-ContentControl::ContentControl()
- : child_vector_{nullptr}, child_(child_vector_[0]) {}
-
-ContentControl::~ContentControl() { delete child_; }
-
-void ContentControl::SetChild(Control* child) {
- Expects(!dynamic_cast<Window*>(child)); // Can't add a window as child.
- if (child == child_) return;
-
- const auto host = GetUiHost();
- const auto old_child = child_;
- child_ = child;
- if (old_child) {
- old_child->_SetParent(nullptr);
- old_child->_SetDescendantUiHost(nullptr);
- }
- if (child) {
- child->_SetParent(this);
- child->_SetDescendantUiHost(host);
- }
- OnChildChanged(old_child, child);
-}
-
-void ContentControl::OnChildChanged(Control* old_child, Control* new_child) {
- CRU_UNUSED(old_child)
- CRU_UNUSED(new_child)
-}
-} // namespace cru::ui