| 18 | Notifier<const ClickEvent &> &Checkbox::onClick() { return _onClick; } |
| 19 | |
| 20 | void Checkbox::bindViewCore() |
| 21 | { |
| 22 | View::bindViewCore(); |
| 23 | auto checkBoxCore = core<Checkbox::Core>(); |
| 24 | checkBoxCore->label.bind(label); |
| 25 | checkBoxCore->state.bind(state); |
| 26 | |
| 27 | _clickCallbackReceiver = checkBoxCore->_clickCallback.set([=]() { |
| 28 | ClickEvent evt(shared_from_this()); |
| 29 | onClick().notify(evt); |
| 30 | }); |
| 31 | } |
| 32 | } |