| 3422 | void ViewNode::setOnDragEndCallback(Ref<ValueFunction> onDragEndCallback) { |
| 3423 | getOrCreateScrollState().setOnDragEndCallback(std::move(onDragEndCallback)); |
| 3424 | } |
| 3425 | |
| 3426 | void ViewNode::setOnContentSizeChangeCallback(Ref<ValueFunction> onContentSizeChangeCallback) { |
| 3427 | auto& scrollState = getOrCreateScrollState(); |
| 3428 | scrollState.setOnContentSizeChangeCallback(std::move(onContentSizeChangeCallback)); |
| 3429 | } |
| 3430 | |
| 3431 | std::vector<SharedViewNode> ViewNode::copyChildren() const { |
| 3432 | std::vector<SharedViewNode> out; |
| 3433 | out.reserve(static_cast<size_t>(getChildCount())); |
| 3434 | |
| 3435 | for (ViewNode* viewNode : *this) { |
| 3436 | out.emplace_back(strongSmallRef(viewNode)); |
| 3437 | }; |