diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-02 06:50:52 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-02 06:50:52 +0300 |
commit | 93eb4851d708cd152d848ed05b8f2134b0db1a2d (patch) | |
tree | 0977416692e6ac3dec722c3d6285c2578bbf1b94 /src/ui/text.h | |
parent | a29e262a7a7aeacb2f6a1e34e1efacb440022529 (diff) |
Text: Word wrapping; fixed glyph caching
Diffstat (limited to 'src/ui/text.h')
-rw-r--r-- | src/ui/text.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/text.h b/src/ui/text.h index fe42a308..26965f52 100644 --- a/src/ui/text.h +++ b/src/ui/text.h | |||
@@ -176,10 +176,16 @@ int drawWrapRange_Text (int fontId, iInt2 pos, int maxWidth, int color, | |||
176 | 176 | ||
177 | iDeclareType(WrapText) | 177 | iDeclareType(WrapText) |
178 | 178 | ||
179 | enum iWrapTextMode { | ||
180 | anyCharacter_WrapTextMode, | ||
181 | word_WrapTextMode, | ||
182 | }; | ||
183 | |||
179 | struct Impl_WrapText { | 184 | struct Impl_WrapText { |
180 | /* arguments */ | 185 | /* arguments */ |
181 | iRangecc text; | 186 | iRangecc text; |
182 | int maxWidth; | 187 | int maxWidth; |
188 | enum iWrapTextMode mode; | ||
183 | iBool (*wrapFunc)(iWrapText *, iRangecc wrappedText, int advance); | 189 | iBool (*wrapFunc)(iWrapText *, iRangecc wrappedText, int advance); |
184 | void * context; | 190 | void * context; |
185 | /* output */ | 191 | /* output */ |