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

Method bindViewCore

framework/ui/src/Button.cpp:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 Notifier<const ClickEvent &> &Button::onClick() { return _onClick; }
27
28 void Button::bindViewCore()
29 {
30 View::bindViewCore();
31 auto buttonCore = core<Button::Core>();
32
33 buttonCore->label.bind(label);
34 buttonCore->imageURL.bind(imageURL);
35
36 _clickCallbackReceiver = buttonCore->_clickCallback.set([=]() {
37 ClickEvent evt(shared_from_this());
38 _onClick.notify(evt);
39 });
40 }
41
42 void Button::updateFromStylesheet() { View::updateFromStylesheet(); }
43}

Callers

nothing calls this directly

Calls 3

bindMethod · 0.45
setMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected