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

Method View

framework/ui/src/View.cpp:21–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 }
20
21 View::View(std::shared_ptr<ViewCoreFactory> viewCoreFactory)
22 : _viewCoreFactory(viewCoreFactory ? std::move(viewCoreFactory)
23 : UIApplicationController::ViewCoreFactoryStack::top())
24 {
25 if (!_viewCoreFactory) {
26 throw std::runtime_error("Couldn't get ViewCore Factory!");
27 }
28
29 stylesheet.onChange() += [=](auto &property) {
30 updateFromStylesheet();
31 if (auto layout = _layout.get()) {
32 layout->updateStylesheet(this);
33 }
34 };
35
36 isLayoutRoot.onChange() += [=](auto) { updateLayout(_layout.get(), _layout.get()); };
37
38 visible.onChange() += [=](auto) {
39 if (auto layout = _layout.get()) {
40 layout->updateStylesheet(this);
41 }
42 };
43
44 registerCoreCreatingProperties(this, &visible, &geometry, &stylesheet);
45 }
46
47 View::~View()
48 {

Callers

nothing calls this directly

Calls 3

updateStylesheetMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected