MCPcopy Create free account
hub / github.com/ZDoom/Raze / MapToGlobal

Method MapToGlobal

libraries/ZWidget/src/core/widget.cpp:513–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511}
512
513Point Widget::MapToGlobal(const Point& pos) const
514{
515 Point p = pos;
516 for (const Widget* cur = this; cur != nullptr; cur = cur->Parent())
517 {
518 if (cur->DispWindow)
519 {
520 return cur->GetFrameGeometry().topLeft() + p;
521 }
522 p += cur->ContentGeometry.topLeft();
523 }
524 throw std::runtime_error("MapFromGlobal: no window widget found");
525}
526
527void Widget::OnWindowPaint()
528{

Callers

nothing calls this directly

Calls 3

ParentMethod · 0.80
topLeftMethod · 0.80
GetFrameGeometryMethod · 0.80

Tested by

no test coverage detected