Close closes the given node and updates the tree accordingly (if it is not already closed). It calls OnClose in the [Treer] interface for extensible actions.
()
| 1094 | // (if it is not already closed). It calls OnClose in the [Treer] |
| 1095 | // interface for extensible actions. |
| 1096 | func (tr *Tree) Close() { |
| 1097 | if tr.Closed { |
| 1098 | return |
| 1099 | } |
| 1100 | tr.SetClosed(true) |
| 1101 | tr.setBranchState() |
| 1102 | tr.This.(Treer).OnClose() |
| 1103 | tr.setChildrenVisibility(true) // parent closed |
| 1104 | tr.NeedsLayout() |
| 1105 | } |
| 1106 | |
| 1107 | // OnOpen is called when a node is opened. |
| 1108 | // The base version does nothing. |
no test coverage detected