summaryrefslogtreecommitdiff
path: root/dw/oofawarewidget.hh
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-09-13 00:23:00 +0200
committerSebastian Geerken <devnull@localhost>2014-09-13 00:23:00 +0200
commitacedc140e545b34b46df551d79b4ef90638b36b6 (patch)
tree34621686c09f45a0df62706531e69ffc3cdc2ef2 /dw/oofawarewidget.hh
parentf543038f3b597c34f67a4ca63efc2bbe59a78b05 (diff)
OOFAwareWidgetIterator: extended and applied to TextblockIterator.
Diffstat (limited to 'dw/oofawarewidget.hh')
-rw-r--r--dw/oofawarewidget.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/dw/oofawarewidget.hh b/dw/oofawarewidget.hh
index 50332487..e21124c1 100644
--- a/dw/oofawarewidget.hh
+++ b/dw/oofawarewidget.hh
@@ -59,20 +59,26 @@ protected:
int sectionIndex; // 0 means in flow, otherwise OOFM index + 1
int index;
- int numParts (int sectionIndex);
+ int numParts (int sectionIndex, int numContentsInFlow = -1);
void getPart (int sectionIndex, int index, core::Content *content);
protected:
virtual int numContentsInFlow () = 0;
virtual void getContentInFlow (int index, core::Content *content) = 0;
+ void setValues (int sectionIndex, int index);
+ inline void cloneValues (OOFAwareWidgetIterator *other)
+ { other->setValues (sectionIndex, index); }
+
+ inline bool inFlow () { return sectionIndex == 0; }
+ inline bool getInFlowIndex () { assert (inFlow ()); return index; }
void highlightOOF (int start, int end, core::HighlightLayer layer);
void unhighlightOOF (int direction, core::HighlightLayer layer);
void getAllocationOOF (int start, int end, core::Allocation *allocation);
public:
OOFAwareWidgetIterator (OOFAwareWidget *widget, core::Content::Type mask,
- bool atEnd);
+ bool atEnd, int numContentsInFlow);
int compareTo(lout::object::Comparable *other);