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

Method bindViewCore

framework/ui/src/ListView.cpp:33–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void ListView::bindViewCore()
34 {
35 View::bindViewCore();
36 auto listCore = core<ListView::Core>();
37 listCore->dataSource.bind(dataSource);
38 listCore->selectedRowIndex.bind(selectedRowIndex);
39 listCore->enableRefresh.bind(enableRefresh);
40 listCore->enableSwipeToDelete.bind(enableSwipeToDelete);
41 listCore->listView = std::static_pointer_cast<ListView>(shared_from_this());
42
43 _refreshCallback = listCore->_refreshCallback.set([this]() { onRefresh().notify(); });
44 _deleteCallback = listCore->_deleteCallback.set([this](int index) { onDelete().notify(index); });
45 }
46
47 Notifier<> &ListView::onRefresh() { return _refreshNotifier; }
48}

Callers

nothing calls this directly

Calls 3

bindMethod · 0.45
setMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected