MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuViewAdjustAux

Function PiuViewAdjustAux

modules/piu/PC/win/piuView.cpp:460–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458};
459
460BOOL CALLBACK PiuViewAdjustAux(HWND window, LPARAM lParam)
461{
462 PiuView* self = (PiuView*)lParam;
463 if (GetParent(window) == (*self)->window) {
464 PiuContent* content = (PiuContent*)GetWindowLongPtr(window, 0);
465 PiuRectangleRecord bounds = (*content)->bounds;
466 PiuRectangleRecord clipBounds = bounds;
467 PiuContainer* container = (*content)->container;
468 while (container) {
469 bounds.x += (*container)->bounds.x;
470 bounds.y += (*container)->bounds.y;
471 clipBounds.x += (*container)->bounds.x;
472 clipBounds.y += (*container)->bounds.y;
473 if ((*container)->flags & piuClip)
474 PiuRectangleIntersect(&clipBounds, &clipBounds, &(*container)->bounds);
475 container = (*container)->container;
476 }
477 MoveWindow(window, clipBounds.x, clipBounds.y, clipBounds.width, clipBounds.height, TRUE);
478 window = GetWindow(window, GW_CHILD);
479 MoveWindow(window, bounds.x - clipBounds.x, bounds.y - clipBounds.y, bounds.width, bounds.height, TRUE);
480 }
481 return TRUE;
482}
483
484void PiuViewAdjust(PiuView* self)
485{

Callers

nothing calls this directly

Calls 1

PiuRectangleIntersectFunction · 0.85

Tested by

no test coverage detected