Slide 60
Slide 60 text
class ComposePPTApplier(
root: ComposePPTNode
) : AbstractApplier(root) {
override fun insertTopDown(index: Int, instance: ComposePPTNode) {
current.children.add(index, instance)
}
override fun insertBottomUp(index: Int, instance: ComposePPTNode) {
// Ignored as the tree is built top-down.
}
override fun remove(index: Int, count: Int) {
current.children.remove(index, count)
}
override fun move(from: Int, to: Int, count: Int) {
current.children.move(from, to, count)
}
override fun onClear() {
root.children.clear()
}
}
Applier
ComposePPTApplier.kt