(from tree.Node)
| 312 | } |
| 313 | |
| 314 | func (wb *WidgetBase) CopyFieldsFrom(from tree.Node) { |
| 315 | wb.NodeBase.CopyFieldsFrom(from) |
| 316 | frm := AsWidget(from) |
| 317 | |
| 318 | n := len(wb.ContextMenus) |
| 319 | if len(frm.ContextMenus) > n { |
| 320 | wb.ContextMenus = append(wb.ContextMenus, frm.ContextMenus[n:]...) |
| 321 | } |
| 322 | |
| 323 | wb.Stylers.DoWith(&frm.Stylers, func(to, from *[]func(s *styles.Style)) { |
| 324 | n := len(*to) |
| 325 | if len(*from) > n { |
| 326 | *to = append(*to, (*from)[n:]...) |
| 327 | } |
| 328 | }) |
| 329 | |
| 330 | wb.Listeners.DoWith(&frm.Listeners, func(to, from *events.Listeners) { |
| 331 | to.CopyFromExtra(*from) |
| 332 | }) |
| 333 | } |
| 334 | |
| 335 | func (wb *WidgetBase) Destroy() { |
| 336 | wb.deleteParts() |
nothing calls this directly
no test coverage detected