From 356751ca1ee7df3819dfcfcece24cfbdb37fba7c Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Sun, 19 Oct 2014 00:29:52 +0200 Subject: Changes in drawing process: is now interruptable. (Some errors left.) --- dw/oofpositionedmgr.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'dw/oofpositionedmgr.cc') diff --git a/dw/oofpositionedmgr.cc b/dw/oofpositionedmgr.cc index 449ea322..07bc45aa 100644 --- a/dw/oofpositionedmgr.cc +++ b/dw/oofpositionedmgr.cc @@ -168,20 +168,26 @@ bool OOFPositionedMgr::haveExtremesChanged () } -void OOFPositionedMgr::draw (View *view, Rectangle *area) +Widget *OOFPositionedMgr::draw (View *view, Rectangle *area, + lout::container::untyped::Stack *iterator, + int *index) { - DBG_OBJ_ENTER ("draw", 0, "draw", "%d, %d, %d * %d", - area->x, area->y, area->width, area->height); + DBG_OBJ_ENTER ("draw", 0, "draw", "(%d, %d, %d * %d), [%d]", + area->x, area->y, area->width, area->height, *index); - for (int i = 0; i < children->size(); i++) { - Widget *childWidget = children->get(i)->widget; + Widget *retWidget = NULL; + + for (; retWidget == NULL && *index < children->size(); (*index)++) { + Widget *childWidget = children->get(*index)->widget; Rectangle childArea; if (!StackingContextMgr::handledByStackingContextMgr (childWidget) && childWidget->intersects (area, &childArea)) - childWidget->draw (view, &childArea); + retWidget = childWidget->drawTotal (view, &childArea, iterator); } + DBG_OBJ_MSGF ("draw", 1, "=> %p", retWidget); DBG_OBJ_LEAVE (); + return retWidget; } void OOFPositionedMgr::addWidgetInFlow (OOFAwareWidget *widget, -- cgit v1.2.3