| 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 | } |