diff options
author | Sebastian Geerken <devnull@localhost> | 2012-10-08 11:29:14 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2012-10-08 11:29:14 +0200 |
commit | d3c0fe575e06cfce5b595ba615e885fd189cd75a (patch) | |
tree | 868feff5a0a77c5d7b60067f02b21bf31547816a | |
parent | b51b9f79bf0f2f964507905bdeb9f38621407451 (diff) |
Work on iterators: finding text works (in a temporal way).
-rw-r--r-- | dw/findtext.cc | 6 | ||||
-rw-r--r-- | dw/iterator.cc | 4 | ||||
-rw-r--r-- | dw/types.hh | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/dw/findtext.cc b/dw/findtext.cc index 9e9076dc..ad136431 100644 --- a/dw/findtext.cc +++ b/dw/findtext.cc @@ -91,7 +91,8 @@ FindtextState::Result FindtextState::search (const char *key, bool caseSens, if (iterator) delete iterator; - iterator = new CharIterator (widget, true); + /** \todo Reactivate followReferences = true, as soon as it works. */ + iterator = new CharIterator (widget, false); if (backwards) { /* Go to end */ @@ -123,7 +124,8 @@ FindtextState::Result FindtextState::search (const char *key, bool caseSens, } else { // Nothing found anymore, reset the state for the next trial. delete iterator; - iterator = new CharIterator (widget, true); + /** \todo Reactivate followReferences = true, as soon as it works. */ + iterator = new CharIterator (widget, false); if (backwards) { /* Go to end */ while (iterator->next ()) ; diff --git a/dw/iterator.cc b/dw/iterator.cc index 73beca6f..d42bdae3 100644 --- a/dw/iterator.cc +++ b/dw/iterator.cc @@ -456,6 +456,10 @@ Iterator *DeepIterator::searchSideward (Iterator *it, Content::Type mask, */ DeepIterator::DeepIterator (Iterator *it) { + // Handling widget references will be a bit more complicated, so we + // prohibit it at this point. + assert ((it->getMask() & Content::WIDGET_OOF_REF) == 0); + //DEBUG_MSG (1, "a_Dw_ext_iterator_new: %s\n", a_Dw_iterator_text (it)); // Clone input iterator, so the iterator passed as parameter diff --git a/dw/types.hh b/dw/types.hh index 61136673..bc78f406 100644 --- a/dw/types.hh +++ b/dw/types.hh @@ -197,14 +197,14 @@ struct Content /** \brief widget out of flow (OOF); _this_ widget (containing this content) is only the container (parent), but _not_ generator */ - WIDGET_OOF_CONT, + WIDGET_OOF_CONT = 1 << 4, /** \brief reference to a widget out of flow (OOF); _this_ widget (containing this content) is only the generator (parent), but _not_ container */ - WIDGET_OOF_REF = 1 << 4, + WIDGET_OOF_REF = 1 << 5, - BREAK = 1 << 5, + BREAK = 1 << 6, ALL = 0xff, REAL_CONTENT = 0xff ^ (START | END), SELECTION_CONTENT = TEXT | BREAK, // WIDGET_* must be set additionally |