summaryrefslogtreecommitdiff
path: root/src/gmdocument.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-24 19:17:24 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-24 19:17:24 +0300
commit070c69895c5918612c4cb0f7ce82c655877b9442 (patch)
tree48ea8a34040cbdae1e0ba0b4620d80e86dcfdabf /src/gmdocument.h
parent066bb85e2169daacb52a4b7c71923de9468a1ef3 (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.h19
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
172iDeclareClass(GmDocument) 172iDeclareClass(GmDocument)
173iDeclareObjectConstruction(GmDocument) 173iDeclareObjectConstruction(GmDocument)
174 174
175/*
175enum iGmDocumentBanner { 176enum iGmDocumentBanner {
176 none_GmDocumentBanner, 177 none_GmDocumentBanner,
177 siteDomain_GmDocumentBanner, 178 siteDomain_GmDocumentBanner,
178 certificateWarning_GmDocumentBanner, 179 certificateWarning_GmDocumentBanner,
179}; 180};*/
180 181
181enum iGmDocumentUpdate { 182enum iGmDocumentUpdate {
182 partial_GmDocumentUpdate, /* appending more content */ 183 partial_GmDocumentUpdate, /* appending more content */
@@ -185,7 +186,7 @@ enum iGmDocumentUpdate {
185 186
186void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed); 187void setThemeSeed_GmDocument (iGmDocument *, const iBlock *seed);
187void setFormat_GmDocument (iGmDocument *, enum iSourceFormat format); 188void setFormat_GmDocument (iGmDocument *, enum iSourceFormat format);
188void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type); 189//void setBanner_GmDocument (iGmDocument *, enum iGmDocumentBanner type);
189void setWidth_GmDocument (iGmDocument *, int width, int outsideMargin); 190void setWidth_GmDocument (iGmDocument *, int width, int outsideMargin);
190void redoLayout_GmDocument (iGmDocument *); 191void redoLayout_GmDocument (iGmDocument *);
191iBool updateOpenURLs_GmDocument(iGmDocument *); 192iBool 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);
215iInt2 size_GmDocument (const iGmDocument *); 216iInt2 size_GmDocument (const iGmDocument *);
216const iGmRun * siteBanner_GmDocument (const iGmDocument *); 217//const iGmRun * siteBanner_GmDocument (const iGmDocument *);
217iBool hasSiteBanner_GmDocument (const iGmDocument *); 218//iBool hasSiteBanner_GmDocument (const iGmDocument *);
218enum iGmDocumentBanner bannerType_GmDocument(const iGmDocument *); 219//enum iGmDocumentBanner bannerType_GmDocument(const iGmDocument *);
219const iString * bannerText_GmDocument (const iGmDocument *); 220//const iString * bannerText_GmDocument (const iGmDocument *);
220const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */ 221const iArray * headings_GmDocument (const iGmDocument *); /* array of GmHeadings */
221const iString * source_GmDocument (const iGmDocument *); 222const iString * source_GmDocument (const iGmDocument *);
222size_t memorySize_GmDocument (const iGmDocument *); /* bytes */ 223size_t memorySize_GmDocument (const iGmDocument *); /* bytes */