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

Method BoundsPixels

widget.go:189–203  ·  view source on GitHub ↗

BoundsPixels returns the outer bounding box rectangle of the WidgetBase, including decorations. The coordinates are relative to the parent of the Widget.

()

Source from the content-addressed store, hash-verified

187//
188// The coordinates are relative to the parent of the Widget.
189func (wb *WidgetBase) BoundsPixels() Rectangle {
190 b := wb.WindowBase.BoundsPixels()
191
192 if wb.parent != nil {
193 p := b.Location().toPOINT()
194 if !win.ScreenToClient(wb.parent.Handle(), &p) {
195 newError("ScreenToClient failed")
196 return Rectangle{}
197 }
198 b.X = int(p.X)
199 b.Y = int(p.Y)
200 }
201
202 return b
203}
204
205// BringToTop moves the WidgetBase to the top of the keyboard focus order.
206func (wb *WidgetBase) BringToTop() error {

Callers 3

BoundsMethod · 0.95
SetParentMethod · 0.95

Calls 5

newErrorFunction · 0.85
toPOINTMethod · 0.80
LocationMethod · 0.80
BoundsPixelsMethod · 0.65
HandleMethod · 0.65

Tested by

no test coverage detected