MCPcopy
hub / github.com/lxn/walk / InitWrapperWindow

Function InitWrapperWindow

window.go:716–734  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
716func 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
736func (wb *WindowBase) MustRegisterProperty(name string, property Property) {
737 if property == nil {

Callers 3

newNumberLineEditFunction · 0.85
NewImageViewFunction · 0.85

Calls 2

AsWindowBaseMethod · 0.65
ChildrenMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…