OnAdd is called when the node is added to a parent. It will be called only once in the lifetime of the node, unless the node is moved. It will not be called on root nodes, as they are never added to a parent. It does nothing by default, but it can be implemented by higher-level types that want to do
()
| 44 | // It does nothing by default, but it can be implemented |
| 45 | // by higher-level types that want to do something. |
| 46 | OnAdd() |
| 47 | |
| 48 | // Destroy recursively deletes and destroys the node, all of its children, |
| 49 | // and all of its children's children, etc. Node types can implement this |