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

Method invalidateBorderInParent

widget.go:440–463  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438}
439
440func (wb *WidgetBase) invalidateBorderInParent() {
441 if !wb.hasActiveGraphicsEffects() {
442 return
443 }
444
445 if wb.parent != nil && wb.parent.Layout() != nil {
446 b := wb.BoundsPixels().toRECT()
447 s := int32(wb.parent.Layout().Spacing())
448
449 hwnd := wb.parent.Handle()
450
451 rc := win.RECT{Left: b.Left - s, Top: b.Top - s, Right: b.Left, Bottom: b.Bottom + s}
452 win.InvalidateRect(hwnd, &rc, true)
453
454 rc = win.RECT{Left: b.Right, Top: b.Top - s, Right: b.Right + s, Bottom: b.Bottom + s}
455 win.InvalidateRect(hwnd, &rc, true)
456
457 rc = win.RECT{Left: b.Left, Top: b.Top - s, Right: b.Right, Bottom: b.Top}
458 win.InvalidateRect(hwnd, &rc, true)
459
460 rc = win.RECT{Left: b.Left, Top: b.Bottom, Right: b.Right, Bottom: b.Bottom + s}
461 win.InvalidateRect(hwnd, &rc, true)
462 }
463}
464
465func (wb *WidgetBase) hasActiveGraphicsEffects() bool {
466 if wb.graphicsEffects == nil {

Callers 15

onInsertedWidgetMethod · 0.80
SetEnabledMethod · 0.80
SetVisibleMethod · 0.80
WndProcMethod · 0.80
SetReadOnlyMethod · 0.80
onFocusChangedMethod · 0.80
SetReadOnlyMethod · 0.80
tableViewNormalLVWndProcFunction · 0.80
RunMethod · 0.80

Calls 6

BoundsPixelsMethod · 0.95
toRECTMethod · 0.80
LayoutMethod · 0.65
SpacingMethod · 0.65
HandleMethod · 0.65

Tested by

no test coverage detected