ctrlutil.go
func ControlInRect(c Control, x int, y int, w int, h int) bool {
	xx, yy := c.Pos()
	ww, hh := c.Size()

	return xx >= x && ww <= x+w && yy <= y+h &&
		yy+hh <= y+h && yy >= y && yy+h >= y
}
func ControlInRect(c Control, x int, y int, w int, h int) bool {
	xx, yy := c.Pos()
	ww, hh := c.Size()

	return xx >= x && ww <= x+w && yy <= y+h &&
		yy+hh <= y+h && yy >= y && yy+h >= y
}
// ControlInRect returns true if c is within a given rect