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

Method createNavPage

examples/KeyboardTest/source/MainViewController.cpp:62–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62std::shared_ptr<bdn::ui::View> MainViewController::createNavPage()
63{
64 auto navView = std::make_shared<bdn::ui::NavigationView>();
65
66 auto btn = std::make_shared<bdn::ui::Button>();
67
68 btn->label = "NavigationView + Scroll Test";
69 btn->onClick() += [this, navView](auto) {
70 auto scrollView = std::make_shared<bdn::ui::ScrollView>();
71 scrollView->stylesheet = FlexJsonStringify({"flexGrow" : 1});
72
73 auto content = createContent(50, nullptr);
74 scrollView->contentView = content;
75
76 navView->pushView(scrollView, "NavigationView + Scroll");
77 };
78
79 navView->pushView(createContent(10, btn), "NavigationView");
80 navView->stylesheet = FlexJsonStringify({"flexGrow" : 1});
81
82 return navView;
83}
84
85std::shared_ptr<bdn::ui::View> MainViewController::createScrollPage()
86{

Callers

nothing calls this directly

Calls 2

onClickMethod · 0.45
pushViewMethod · 0.45

Tested by

no test coverage detected