summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-28 14:23:18 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-28 14:23:18 +0200
commitedf1c0bb8b112879433f2e31fd9750c30e2d5144 (patch)
tree9e7e3207e8e926ae1dfe47992e9055ba21fb16ed /src/gmdocument.h
parent0ccabb2c8e0e894be520c621bca8023a6d5de2e2 (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.h13
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
99iDeclareType(GmRunRange)
100
101struct Impl_GmRunRange {
102 const iGmRun *start;
103 const iGmRun *end;
104};
105
98const char * findLoc_GmRun (const iGmRun *, iInt2 pos); 106const char * findLoc_GmRun (const iGmRun *, iInt2 pos);
99 107
100iDeclareClass(GmDocument) 108iDeclareClass(GmDocument)
@@ -130,8 +138,9 @@ const iString * bannerText_GmDocument (const iGmDocument *);
130const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ 138const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */
131const iString * source_GmDocument (const iGmDocument *); 139const iString * source_GmDocument (const iGmDocument *);
132 140
133iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start); 141iRangecc findText_GmDocument (const iGmDocument *, const iString *text, const char *start);
134iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before); 142iRangecc findTextBefore_GmDocument (const iGmDocument *, const iString *text, const char *before);
143iGmRunRange findPreformattedRange_GmDocument (const iGmDocument *, const iGmRun *run);
135 144
136enum iGmLinkPart { 145enum iGmLinkPart {
137 icon_GmLinkPart, 146 icon_GmLinkPart,