diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_page.cpp | 1 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_page/include/cpdf_page.h | 14 | ||||
-rw-r--r-- | core/fpdfdoc/include/fpdf_doc.h | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_page.cpp b/core/fpdfapi/fpdf_page/cpdf_page.cpp index 6b0609ff00..441bbfe28b 100644 --- a/core/fpdfapi/fpdf_page/cpdf_page.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_page.cpp @@ -21,6 +21,7 @@ CPDF_Page::CPDF_Page(CPDF_Document* pDocument, bool bPageCache) : m_PageWidth(100), m_PageHeight(100), + m_pView(nullptr), m_pPageRender(bPageCache ? new CPDF_PageRenderCache(this) : nullptr) { m_pFormDict = pPageDict; m_pDocument = pDocument; diff --git a/core/fpdfapi/fpdf_page/include/cpdf_page.h b/core/fpdfapi/fpdf_page/include/cpdf_page.h index 7f4430187a..99734889af 100644 --- a/core/fpdfapi/fpdf_page/include/cpdf_page.h +++ b/core/fpdfapi/fpdf_page/include/cpdf_page.h @@ -19,8 +19,10 @@ class CPDF_Document; class CPDF_Object; class CPDF_PageRenderCache; -class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData { +class CPDF_Page : public CPDF_PageObjectHolder { public: + class View {}; // Caller implements as desired, empty here due to layering. + CPDF_Page(CPDF_Document* pDocument, CPDF_Dictionary* pPageDict, bool bPageCache); @@ -42,6 +44,14 @@ class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData { CPDF_Object* GetPageAttr(const CFX_ByteString& name) const; CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender.get(); } + CFX_Deletable* GetRenderContext() const { return m_pRenderContext.get(); } + void SetRenderContext(std::unique_ptr<CFX_Deletable> pContext) { + m_pRenderContext = std::move(pContext); + } + + View* GetView() const { return m_pView; } + void SetView(View* pView) { m_pView = pView; } + protected: friend class CPDF_ContentParser; @@ -50,7 +60,9 @@ class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData { FX_FLOAT m_PageWidth; FX_FLOAT m_PageHeight; CFX_Matrix m_PageMatrix; + View* m_pView; std::unique_ptr<CPDF_PageRenderCache> m_pPageRender; + std::unique_ptr<CFX_Deletable> m_pRenderContext; }; #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGE_H_ diff --git a/core/fpdfdoc/include/fpdf_doc.h b/core/fpdfdoc/include/fpdf_doc.h index 3ee583d778..8c7ce4eeab 100644 --- a/core/fpdfdoc/include/fpdf_doc.h +++ b/core/fpdfdoc/include/fpdf_doc.h @@ -317,7 +317,7 @@ class CPDF_Link { #define ANNOTFLAG_LOCKED 0x0080 #define ANNOTFLAG_TOGGLENOVIEW 0x0100 -class CPDF_Annot : public CFX_PrivateData { +class CPDF_Annot { public: enum AppearanceMode { Normal, Rollover, Down }; |