onMouse receives mouse button events over the tree node panel
(evname string, ev interface{})
| 328 | |
| 329 | // onMouse receives mouse button events over the tree node panel |
| 330 | func (n *TreeNode) onMouse(evname string, ev interface{}) { |
| 331 | |
| 332 | switch evname { |
| 333 | case OnMouseDown: |
| 334 | n.expanded = !n.expanded |
| 335 | n.update() |
| 336 | n.recalc() |
| 337 | n.updateItems() |
| 338 | } |
| 339 | |
| 340 | n.litem.onMouse(evname, ev) |
| 341 | } |
| 342 | |
| 343 | // level returns the level of this node from the start of the tree |
| 344 | func (n *TreeNode) level() int { |
nothing calls this directly
no test coverage detected