diff options
author | Sebastian Geerken <devnull@localhost> | 2014-06-17 00:00:18 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-06-17 00:00:18 +0200 |
commit | aaec2616c189d863a0a23d1c96165335dd0bad7a (patch) | |
tree | 4d2f4aa3f7aa457f9bf6a152a19aaa82701873cd | |
parent | d23346d250cd18718f0540cfca49e2204fb40767 (diff) |
Some RTFL.
-rw-r--r-- | dw/layout.cc | 12 | ||||
-rw-r--r-- | dw/widget.cc | 20 |
2 files changed, 26 insertions, 6 deletions
diff --git a/dw/layout.cc b/dw/layout.cc index bd519042..3cc13980 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -1268,8 +1268,9 @@ void Layout::scrollPosChanged (View *view, int x, int y) */ void Layout::viewportSizeChanged (View *view, int width, int height) { - _MSG("Layout::viewportSizeChanged w=%d h=%d new_w=%d new_h=%d\n", - viewportWidth, viewportHeight, width, height); + DBG_OBJ_MSGF ("resize", 0, "<b>viewportSizeChanged</b> (%p, %d, %d)", + view, width, height); + DBG_OBJ_MSG_START (); /* If the width has become higher, we test again, whether the vertical * scrollbar (so to speak) can be hidden again. */ @@ -1296,14 +1297,21 @@ void Layout::viewportSizeChanged (View *view, int width, int height) DBG_OBJ_SET_NUM ("viewportHeight", viewportHeight); containerSizeChanged (); + + DBG_OBJ_MSG_END (); } void Layout::containerSizeChanged () { + DBG_OBJ_MSG ("resize", 0, "<b>containerSizeChanged</b> ()"); + DBG_OBJ_MSG_START (); + if (topLevel) { topLevel->containerSizeChanged (); queueResize (true); } + + DBG_OBJ_MSG_END (); } } // namespace core diff --git a/dw/widget.cc b/dw/widget.cc index c24f58db..eee7ae6e 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -197,8 +197,9 @@ void Widget::queueDrawArea (int x, int y, int width, int height) */ void Widget::queueResize (int ref, bool extremesChanged, bool fast) { - DBG_OBJ_MSGF ("resize", 0, "<b>queueResize</b> (%d, %s)", - ref, extremesChanged ? "true" : "false"); + DBG_OBJ_MSGF ("resize", 0, "<b>queueResize</b> (%d, %s, %s)", + ref, extremesChanged ? "true" : "false", + fast ? "true" : "false"); DBG_OBJ_MSG_START (); // queueResize() can be called recursively; calls are queued, so @@ -228,8 +229,9 @@ void Widget::actualQueueResize (int ref, bool extremesChanged, bool fast) { assert (!queueResizeEntered ()); - DBG_OBJ_MSGF ("resize", 0, "<b>actualQueueResize</b> (%d, %s)", - ref, extremesChanged ? "true" : "false"); + DBG_OBJ_MSGF ("resize", 0, "<b>actualQueueResize</b> (%d, %s, %s)", + ref, extremesChanged ? "true" : "false", + fast ? "true" : "false"); DBG_OBJ_MSG_START (); enterQueueResize (); @@ -286,13 +288,21 @@ void Widget::actualQueueResize (int ref, bool extremesChanged, bool fast) void Widget::containerSizeChanged () { + DBG_OBJ_MSG ("resize", 0, "<b>containerSizeChanged</b> ()"); + DBG_OBJ_MSG_START (); + // TODO Can be largely optimized. queueResizeFast (0, true); containerSizeChangedForChildren (); + + DBG_OBJ_MSG_END (); } void Widget::containerSizeChangedForChildren () { + DBG_OBJ_MSG ("resize", 0, "<b>containerSizeChangedForChildren</b> ()"); + DBG_OBJ_MSG_START (); + // Working, but inefficient standard implementation. Iterator *it = iterator ((Content::Type)(Content::WIDGET_IN_FLOW | Content::WIDGET_OOF_CONT), @@ -300,6 +310,8 @@ void Widget::containerSizeChangedForChildren () while (it->next ()) it->getContent()->widget->containerSizeChanged (); it->unref (); + + DBG_OBJ_MSG_END (); } /** |