MCPcopy Create free account
hub / github.com/dillo-browser/dillo / getWidgetAtPointLevel

Method getWidgetAtPointLevel

dw/oofawarewidget.cc:473–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473Widget *OOFAwareWidget::getWidgetAtPointLevel (int x, int y, int level,
474 GettingWidgetAtPointContext
475 *context)
476{
477 DBG_OBJ_ENTER ("events", 0, "OOFAwareWidget::getWidgetAtPointLevel",
478 "%d, %d, %s", x, y, stackingLevelText (level));
479
480 Widget *widgetAtPoint = NULL;
481
482 switch (level) {
483 case SL_BACKGROUND:
484 if (inAllocation (x, y))
485 widgetAtPoint = this;
486 break;
487
488 case SL_SC_BOTTOM:
489 if (stackingContextMgr)
490 widgetAtPoint =
491 stackingContextMgr->getBottomWidgetAtPoint (x, y, context);
492 break;
493
494 case SL_IN_FLOW:
495 // Should be implemented in the sub class.
496 assertNotReached ("getWidgetAtPoint (SL_IN_FLOW) for %s",
497 getClassName ());
498 break;
499
500 case SL_OOF_REF:
501 // Should be implemented in the sub class (when references are hold).
502 break;
503
504 case SL_OOF_CONT:
505 widgetAtPoint = getWidgetOOFAtPoint (x, y, context);
506 break;
507
508 case SL_SC_TOP:
509 if (stackingContextMgr)
510 widgetAtPoint =
511 stackingContextMgr->getTopWidgetAtPoint (x, y, context);
512 break;
513
514 default:
515 fprintf (stderr,
516 "OOFAwareWidget::getWidgetAtPointLevel: invalid level %s (%d)",
517 stackingLevelText (level), level);
518 break;
519 }
520
521 DBG_OBJ_MSGF ("events", 1, "=> %p", widgetAtPoint);
522 DBG_OBJ_LEAVE ();
523 return widgetAtPoint;
524}
525
526Widget *OOFAwareWidget::getWidgetOOFAtPoint (int x, int y,
527 GettingWidgetAtPointContext

Callers

nothing calls this directly

Calls 4

inAllocationFunction · 0.85
assertNotReachedFunction · 0.85
getTopWidgetAtPointMethod · 0.80

Tested by

no test coverage detected