diff options
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r-- | src/PositionCache.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h index 10afbd972..a0b805743 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -134,6 +134,15 @@ public: void Clear(); }; +struct TextSegment { + int start; + int length; + Representation *repr; + TextSegment(int start_=0, int length_=0, Representation *repr_=0) : + start(start_), length(length_), repr(repr_) { + } +}; + // Class to break a line of text into shorter runs at sensible places. class BreakFinder { LineLayout *ll; @@ -146,6 +155,7 @@ class BreakFinder { int saeNext; int subBreak; Document *pdoc; + EncodingFamily encodingFamily; SpecialRepresentations *preprs; void Insert(int val); // Private so BreakFinder objects can not be copied @@ -159,8 +169,8 @@ public: BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, int xStart, bool breakForSelection, Document *pdoc_, SpecialRepresentations *preprs_); ~BreakFinder(); - int First() const; - int Next(); + TextSegment Next(); + bool More() const; }; class PositionCache { |