aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-01-05 12:33:01 +0100
committerSebastian Geerken <devnull@localhost>2013-01-05 12:33:01 +0100
commitd9f1239bade6a1781ebc5626bbd405ecbe5ff253 (patch)
tree866d008726956d81ad85126b6a397d093883d5a3 /dw
parent824cd84f321d358ab878b99cbaaef936823d8c8b (diff)
More debugging stuff.
Diffstat (limited to 'dw')
-rw-r--r--dw/iterator.cc12
-rw-r--r--dw/iterator.hh2
-rw-r--r--dw/textblock.hh1
-rw-r--r--dw/textblock_iterator.cc7
-rw-r--r--dw/types.cc4
-rw-r--r--dw/widget.cc4
6 files changed, 25 insertions, 5 deletions
diff --git a/dw/iterator.cc b/dw/iterator.cc
index 019d8e07..78ac55f6 100644
--- a/dw/iterator.cc
+++ b/dw/iterator.cc
@@ -507,14 +507,25 @@ DeepIterator::DeepIterator (Iterator *it)
// \todo There may be a faster way instead of iterating through the
// parent widgets.
+ //printf ("STARTING WITH: ");
+ //it->print ();
+ //printf ("\n");
+
// Construct the iterators.
int thisLevel = it->getWidget()->getLevel (), level;
Widget *w;
for (w = it->getWidget (), level = thisLevel; w->getParent() != NULL;
w = w->getParent (), level--) {
Iterator *it = w->getParent()->iterator (mask, false);
+
+ //printf (" parent: %s %p\n", w->getClassName (), w);
+
stack.put (it, level - 1);
while (true) {
+ //printf (" ");
+ //it->print ();
+ //printf ("\n");
+
bool hasNext = it->next();
assert (hasNext);
@@ -522,6 +533,7 @@ DeepIterator::DeepIterator (Iterator *it)
it->getContent()->widget == w)
break;
}
+
}
stack.put (it, thisLevel);
diff --git a/dw/iterator.hh b/dw/iterator.hh
index 12c3d4ac..3b2fa6c2 100644
--- a/dw/iterator.hh
+++ b/dw/iterator.hh
@@ -86,7 +86,7 @@ public:
static void scrollTo (Iterator *it1, Iterator *it2, int start, int end,
HPosition hpos, VPosition vpos);
- void print ();
+ virtual void print ();
};
diff --git a/dw/textblock.hh b/dw/textblock.hh
index ad3fe865..879ff75e 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -385,6 +385,7 @@ protected:
void highlight (int start, int end, core::HighlightLayer layer);
void unhighlight (int direction, core::HighlightLayer layer);
void getAllocation (int start, int end, core::Allocation *allocation);
+ void print ();
};
friend class TextblockIterator;
diff --git a/dw/textblock_iterator.cc b/dw/textblock_iterator.cc
index 9af98137..8944b8db 100644
--- a/dw/textblock_iterator.cc
+++ b/dw/textblock_iterator.cc
@@ -299,4 +299,11 @@ void Textblock::TextblockIterator::getAllocation (int start, int end,
}
}
+void Textblock::TextblockIterator::print ()
+{
+ Iterator::print ();
+ printf (", oofm = %s, index = %d", oofm ? "true" : "false", index);
+
+}
+
} // namespace dw
diff --git a/dw/types.cc b/dw/types.cc
index 4835f95b..70433456 100644
--- a/dw/types.cc
+++ b/dw/types.cc
@@ -304,8 +304,8 @@ void Content::print (Content *content)
printf ("<break>");
break;
default:
- printf ("<?>");
- break;
+ printf ("<%d?>", content->type);
+ break;
}
}
diff --git a/dw/widget.cc b/dw/widget.cc
index 4018c069..1ac3787e 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -111,8 +111,8 @@ void Widget::setParent (Widget *parent)
notifySetParent();
//DBG_OBJ_ASSOC (widget, parent);
- //printf ("The %s %p becomes a child of the %s %p\n",
- // getClassName(), this, parent->getClassName(), parent);
+ printf ("The %s %p becomes a child of the %s %p\n",
+ getClassName(), this, parent->getClassName(), parent);
}
void Widget::queueDrawArea (int x, int y, int width, int height)