aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2016-04-03 00:10:50 +0200
committerSebastian Geerken <devnull@localhost>2016-04-03 00:10:50 +0200
commitae8b2b7492d2166358fa8aadaa2ef17aedb28b6b (patch)
tree1a0a5427f8ccd02c358886f7b161c5138b3d4ac6 /dw
parent70b9f2b70d9f0c0f48d2ae649023ea3ae5271367 (diff)
WidgetReference: RTFL.
Diffstat (limited to 'dw')
-rw-r--r--dw/textblock.hh38
1 files changed, 27 insertions, 11 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh
index f78be2df..faf65d0a 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -926,34 +926,48 @@ public:
.getPenalty (i)); \
} D_STMT_END
+#ifdef DBG_RTFL
+#define DBG_OBJ_ARRATTRSET_PTR_NUM(var, ind, attr, val1, val2) \
+ RTFL_OBJ_PRINT ("set", "p:s.d.s:p (d)", this, var, ind, attr, val1, val2)
+#else
+#define DBG_OBJ_ARRATTRSET_PTR_NUM(var, ind, attr, val1, val2) STMT_NOP
+#endif
+
#define DBG_SET_WORD(n) \
D_STMT_START { \
switch (words->getRef(n)->content.type) { \
case ::dw::core::Content::TEXT: \
DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "TEXT"); \
- DBG_OBJ_ARRATTRSET_STR ("words", n, "text/widget/breakSpace", \
+ DBG_OBJ_ARRATTRSET_STR ("words", n, \
+ "text/widget/widgetReference/breakSpace", \
words->getRef(n)->content.text); \
break; \
case ::dw::core::Content::WIDGET_IN_FLOW: \
DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "WIDGET_IN_FLOW"); \
- DBG_OBJ_ARRATTRSET_PTR ("words", n, "text/widget/breakSpace", \
+ DBG_OBJ_ARRATTRSET_PTR ("words", n, \
+ "text/widget/widgetReference/breakSpace", \
words->getRef(n)->content.widget); \
break; \
case ::dw::core::Content::WIDGET_OOF_REF: \
- /* It would be nice to show also parentRef. */ \
DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "WIDGET_OOF_REF"); \
- DBG_OBJ_ARRATTRSET_PTR ("words", n, "text/widget/breakSpace", \
- words->getRef(n) \
- ->content.widgetReference->widget); \
+ DBG_OBJ_ARRATTRSET_PTR_NUM ("words", n, \
+ "text/widget/widgetReference/breakSpace", \
+ words->getRef(n) \
+ ->content.widgetReference->widget, \
+ words->getRef(n) \
+ ->content.widgetReference->parentRef); \
break; \
case ::dw::core::Content::BREAK: \
DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "BREAK"); \
- DBG_OBJ_ARRATTRSET_NUM ("words", n, "text/widget/breakSpace", \
+ DBG_OBJ_ARRATTRSET_NUM ("words", n, \
+ "text/widget/widgetReference/breakSpace", \
words->getRef(n)->content.breakSpace); \
break; \
default: \
DBG_OBJ_ARRATTRSET_SYM ("words", n, "type", "???"); \
- DBG_OBJ_ARRATTRSET_SYM ("words", n, "text/widget/breakSpace", "???"); \
+ DBG_OBJ_ARRATTRSET_SYM ("words", n, \
+ "text/widget/widgetReference/breakSpace", \
+ "???"); \
} \
DBG_SET_WORD_PENALTY (n, 0, "0"); \
DBG_SET_WORD_PENALTY (n, 1, "1"); \
@@ -984,9 +998,11 @@ public:
words->getRef(n)->content.widget); \
break; \
case ::dw::core::Content::WIDGET_OOF_REF: \
- /* It would be nice to show also parentRef. */ \
- DBG_OBJ_MSGF (aspect, prio, prefix "WIDGET_OOF_REF / %p" suffix, \
- words->getRef(n)->content.widgetReference->widget); \
+ DBG_OBJ_MSGF (aspect, prio, \
+ prefix "WIDGET_OOF_REF / %p (%d)" suffix,\
+ words->getRef(n)->content.widgetReference->widget, \
+ words->getRef(n)->content.widgetReference \
+ ->parentRef); \
break; \
case ::dw::core::Content::BREAK: \
DBG_OBJ_MSGF (aspect, prio, prefix "BREAK / %d" suffix, \