diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-24 19:17:24 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-24 19:17:24 +0300 |
commit | 070c69895c5918612c4cb0f7ce82c655877b9442 (patch) | |
tree | 48ea8a34040cbdae1e0ba0b4620d80e86dcfdabf /src/gmdocument.h | |
parent | 066bb85e2169daacb52a4b7c71923de9468a1ef3 (diff) |
Added Banner
Banner will take over everything related to the page top banner.
DocumentWidget's content positioning is a bit messy, and now that the banner is no longer part of the GmDocument, it needed a bit of revising. It would still benefit from proper functions for mapping coordinates to/from the GmDocument coordinate space.
Diffstat (limited to 'src/gmdocument.h')
-rw-r--r-- | src/gmdocument.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gmdocument.h b/src/gmdocument.h index e6388fbd..e010ad43 100644 --- a/src/gmdocument.h +++ b/src/gmdocument.h | |||
@@ -120,10 +120,10 @@ enum iGmRunFlags { | |||
120 | decoration_GmRunFlag = iBit(1), /* not part of the source */ | 120 | decoration_GmRunFlag = iBit(1), /* not part of the source */ |
121 | startOfLine_GmRunFlag = iBit(2), | 121 | startOfLine_GmRunFlag = iBit(2), |
122 | endOfLine_GmRunFlag = iBit(3), | 122 | endOfLine_GmRunFlag = iBit(3), |
123 | siteBanner_GmRunFlag = iBit(4), /* area reserved for the site banner */ | 123 | // siteBanner_GmRunFlag = iBit(4), /* area reserved for the site banner */ |
124 | quoteBorder_GmRunFlag = iBit(5), | 124 | quoteBorder_GmRunFlag = iBit(5), |
125 | wide_GmRunFlag = iBit(6), /* horizontally scrollable */ | 125 | wide_GmRunFlag = iBit(6), /* horizontally scrollable */ |
126 | footer_GmRunFlag = iBit(7), | 126 | // footer_GmRunFlag = iBit(7), |
127 | altText_GmRunFlag = iBit(8), | 127 | altText_GmRunFlag = iBit(8), |
128 | }; | 128 | }; |
129 | 129 | ||
@@ -171,12 +171,13 @@ iRangecc findLoc_GmRun (const iGmRun *, iInt2 pos); | |||
171 | 171 | ||
172 | iDeclareClass(GmDocument) | 172 | iDeclareClass(GmDocument) |
173 | iDeclareObjectConstruction(GmDocument) | 173 | iDeclareObjectConstruction(GmDocument) |
174 | 174 | ||
175 | /* | ||
175 | enum iGmDocumentBanner { | 176 | enum iGmDocumentBanner { |
176 | none_GmDocumentBanner, | 177 | none_GmDocumentBanner, |
177 | siteDomain_GmDocumentBanner, | 178 | siteDomain_GmDocumentBanner, |
178 | certificateWarning_GmDocumentBanner, | 179 | certificateWarning_GmDocumentBanner, |
179 | }; | 180 | };*/ |
180 | 181 | ||
181 | enum iGmDocumentUpdate { | 182 | enum iGmDocumentUpdate { |
182 | partial_GmDocumentUpdate, /* appending more content */ | 183 | partial_GmDocumentUpdate, /* appending more content */ |
@@ -185,7 +186,7 @@ enum iGmDocumentUpdate { | |||
185 | 186 | ||
186 | void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed); | 187 | void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed); |
187 | void setFormat_GmDocument (iGmDocument *, enum iSourceFormat format); | 188 | void setFormat_GmDocument (iGmDocument *, enum iSourceFormat format); |
188 | void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type); | 189 | //void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type); |
189 | void setWidth_GmDocument (iGmDocument *, int width, int outsideMargin); | 190 | void setWidth_GmDocument (iGmDocument *, int width, int outsideMargin); |
190 | void redoLayout_GmDocument (iGmDocument *); | 191 | void redoLayout_GmDocument (iGmDocument *); |
191 | iBool updateOpenURLs_GmDocument(iGmDocument *); | 192 | iBool updateOpenURLs_GmDocument(iGmDocument *); |
@@ -213,10 +214,10 @@ const iGmRun * renderProgressive_GmDocument(const iGmDocument *d, const iGmRun | |||
213 | iRangei visRangeY, iGmDocumentRenderFunc render, | 214 | iRangei visRangeY, iGmDocumentRenderFunc render, |
214 | void *context); | 215 | void *context); |
215 | iInt2 size_GmDocument (const iGmDocument *); | 216 | iInt2 size_GmDocument (const iGmDocument *); |
216 | const iGmRun * siteBanner_GmDocument (const iGmDocument *); | 217 | //const iGmRun * siteBanner_GmDocument (const iGmDocument *); |
217 | iBool hasSiteBanner_GmDocument (const iGmDocument *); | 218 | //iBool hasSiteBanner_GmDocument (const iGmDocument *); |
218 | enum iGmDocumentBanner bannerType_GmDocument(const iGmDocument *); | 219 | //enum iGmDocumentBanner bannerType_GmDocument(const iGmDocument *); |
219 | const iString * bannerText_GmDocument (const iGmDocument *); | 220 | //const iString * bannerText_GmDocument (const iGmDocument *); |
220 | const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ | 221 | const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ |
221 | const iString * source_GmDocument (const iGmDocument *); | 222 | const iString * source_GmDocument (const iGmDocument *); |
222 | size_t memorySize_GmDocument (const iGmDocument *); /* bytes */ | 223 | size_t memorySize_GmDocument (const iGmDocument *); /* bytes */ |