diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-28 14:23:18 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-28 14:23:18 +0200 |
commit | edf1c0bb8b112879433f2e31fd9750c30e2d5144 (patch) | |
tree | 9e7e3207e8e926ae1dfe47992e9055ba21fb16ed /src/gmdocument.h | |
parent | 0ccabb2c8e0e894be520c621bca8023a6d5de2e2 (diff) |
Scrolling wide preformatted blocks horizontally
Not entirely glitch-free but should be good enough for now.
IssueID #44
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r-- | src/gmdocument.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h index c2a4b272..6804d772 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h | |||
@@ -90,11 +90,19 @@ struct Impl_GmRun { | |||
90 | uint8_t flags; | 90 | uint8_t flags; |
91 | iRect bounds; /* used for hit testing, may extend to edges */ | 91 | iRect bounds; /* used for hit testing, may extend to edges */ |
92 | iRect visBounds; /* actual visual bounds */ | 92 | iRect visBounds; /* actual visual bounds */ |
93 | uint16_t preId; /* preformatted block ID (sequential) */ | ||
93 | iGmLinkId linkId; /* zero for non-links */ | 94 | iGmLinkId linkId; /* zero for non-links */ |
94 | uint16_t imageId; /* zero if not an image */ | 95 | uint16_t imageId; /* zero if not an image */ |
95 | uint16_t audioId; /* zero if not audio */ | 96 | uint16_t audioId; /* zero if not audio */ |
96 | }; | 97 | }; |
97 | 98 | ||
99 | iDeclareType(GmRunRange) | ||
100 | |||
101 | struct Impl_GmRunRange { | ||
102 | const iGmRun *start; | ||
103 | const iGmRun *end; | ||
104 | }; | ||
105 | |||
98 | const char * findLoc_GmRun (const iGmRun *, iInt2 pos); | 106 | const char * findLoc_GmRun (const iGmRun *, iInt2 pos); |
99 | 107 | ||
100 | iDeclareClass(GmDocument) | 108 | iDeclareClass(GmDocument) |
@@ -130,8 +138,9 @@ const iString * bannerText_GmDocument (const iGmDocument *); | |||
130 | const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ | 138 | const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ |
131 | const iString * source_GmDocument (const iGmDocument *); | 139 | const iString * source_GmDocument (const iGmDocument *); |
132 | 140 | ||
133 | iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start); | 141 | iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start); |
134 | iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before); | 142 | iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before); |
143 | iGmRunRange findPreformattedRange_GmDocument (const iGmDocument *, const iGmRun *run); | ||
135 | 144 | ||
136 | enum iGmLinkPart { | 145 | enum iGmLinkPart { |
137 | icon_GmLinkPart, | 146 | icon_GmLinkPart, |