InitWrapperWindow initializes a window that wraps (embeds) another window. Calling this method is necessary, if you want to be able to override the WndProc method of the embedded window. The embedded window should only be used as inseparable part of the wrapper window to avoid undefined behavior.
(window Window)
| 714 | // WndProc method of the embedded window. The embedded window should only be |
| 715 | // used as inseparable part of the wrapper window to avoid undefined behavior. |
| 716 | func InitWrapperWindow(window Window) error { |
| 717 | wb := window.AsWindowBase() |
| 718 | |
| 719 | wb.window = window |
| 720 | |
| 721 | if container, ok := window.(Container); ok { |
| 722 | children := container.Children() |
| 723 | |
| 724 | if wlo, ok := window.(widgetListObserver); ok { |
| 725 | children.observer = wlo |
| 726 | } |
| 727 | |
| 728 | for _, child := range children.items { |
| 729 | child.parent = container |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | return nil |
| 734 | } |
| 735 | |
| 736 | func (wb *WindowBase) MustRegisterProperty(name string, property Property) { |
| 737 | if property == nil { |
no test coverage detected
searching dependent graphs…