MCPcopy Create free account
hub / github.com/AshampooSystems/boden / updateLayout

Method updateLayout

framework/ui/src/View.cpp:67–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void View::updateLayout(const std::shared_ptr<Layout> &oldLayout, const std::shared_ptr<Layout> &newLayout)
68 {
69 if (oldLayout == newLayout) {
70 return;
71 }
72
73 if (oldLayout) {
74 oldLayout->unregisterView(this);
75 }
76
77 if (newLayout) {
78 newLayout->registerView(this);
79 }
80
81 if (oldLayout != newLayout) {
82 viewCore()->setLayout(newLayout);
83 }
84
85 for (const auto &child : childViews()) {
86 child->setFallbackLayout(newLayout);
87 }
88 }
89
90 std::shared_ptr<Layout> View::getLayout() { return _layout.get(); }
91

Callers

nothing calls this directly

Calls 4

unregisterViewMethod · 0.80
registerViewMethod · 0.80
setFallbackLayoutMethod · 0.80
setLayoutMethod · 0.45

Tested by

no test coverage detected