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

Method Publish

event.go:52–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52func (p *EventPublisher) Publish() {
53 // This is a kludge to find the form that the event publisher is
54 // affiliated with. It's only necessary because the event publisher
55 // doesn't keep a pointer to the form on its own, and the call
56 // to Publish isn't providing it either.
57 if form := App().ActiveForm(); form != nil {
58 fb := form.AsFormBase()
59 fb.inProgressEventCount++
60 defer func() {
61 fb.inProgressEventCount--
62 if fb.inProgressEventCount == 0 && fb.layoutScheduled {
63 fb.layoutScheduled = false
64 fb.startLayout()
65 }
66 }()
67 }
68
69 for i, h := range p.event.handlers {
70 if h.handler != nil {
71 h.handler()
72
73 if h.once {
74 p.event.Detach(i)
75 }
76 }
77 }
78}

Callers 15

raiseClickedMethod · 0.45
SetDateMethod · 0.45
SetFormatMethod · 0.45
WndProcMethod · 0.45
clipboardWndProcFunction · 0.45
SetToolTipTextMethod · 0.45
DisposeMethod · 0.45
SetEnabledMethod · 0.45
SetVisibleMethod · 0.45
publishMouseEventMethod · 0.45

Calls 5

AppFunction · 0.85
startLayoutMethod · 0.80
AsFormBaseMethod · 0.65
ActiveFormMethod · 0.45
DetachMethod · 0.45

Tested by

no test coverage detected