dsinclair | f34518b | 2016-09-13 12:03:48 -0700 | [diff] [blame] | 1 | // Copyright 2016 PDFium Authors. All rights reserved. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Tom Sepez | c6ab172 | 2015-02-05 15:27:25 -0800 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
dsinclair | 735606d | 2016-10-05 15:47:02 -0700 | [diff] [blame] | 7 | #ifndef FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ |
| 8 | #define FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 9 | |
Dan Sinclair | 85c8e7f | 2016-11-21 13:50:32 -0500 | [diff] [blame] | 10 | #include <map> |
Lei Zhang | aa8bf7e | 2015-12-24 19:13:32 -0800 | [diff] [blame] | 11 | #include <memory> |
Dan Sinclair | 85c8e7f | 2016-11-21 13:50:32 -0500 | [diff] [blame] | 12 | #include <vector> |
Lei Zhang | 606346f | 2015-06-19 18:11:07 -0700 | [diff] [blame] | 13 | |
dsinclair | 41872fa | 2016-10-04 11:29:35 -0700 | [diff] [blame] | 14 | #include "core/fpdfapi/page/cpdf_page.h" |
dsinclair | 488b7ad | 2016-10-04 11:55:50 -0700 | [diff] [blame] | 15 | #include "core/fpdfapi/parser/cpdf_document.h" |
dsinclair | 1727aee | 2016-09-29 13:12:56 -0700 | [diff] [blame] | 16 | #include "core/fpdfdoc/cpdf_occontext.h" |
Dan Sinclair | 65ecca4 | 2017-09-21 15:25:32 -0400 | [diff] [blame] | 17 | #include "core/fxcrt/observable.h" |
dsinclair | b959010 | 2016-04-27 06:38:59 -0700 | [diff] [blame] | 18 | #include "fpdfsdk/cfx_systemhandler.h" |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 19 | #include "fpdfsdk/cpdfsdk_annot.h" |
dsinclair | 114e46a | 2016-09-29 17:18:21 -0700 | [diff] [blame] | 20 | #include "fpdfsdk/fsdk_define.h" |
Lei Zhang | b4e7f30 | 2015-11-06 15:52:32 -0800 | [diff] [blame] | 21 | #include "public/fpdf_formfill.h" |
Dan Sinclair | df5a116 | 2016-03-09 16:51:34 -0500 | [diff] [blame] | 22 | #include "public/fpdf_fwlevent.h" |
Tom Sepez | 40e9ff3 | 2015-11-30 12:39:54 -0800 | [diff] [blame] | 23 | |
dsinclair | b94d7c9 | 2016-09-21 12:07:00 -0700 | [diff] [blame] | 24 | class CFFL_InteractiveFormFiller; |
dsinclair | b959010 | 2016-04-27 06:38:59 -0700 | [diff] [blame] | 25 | class CFX_SystemHandler; |
Tom Sepez | dcbc02f | 2015-07-17 09:16:17 -0700 | [diff] [blame] | 26 | class CPDFSDK_ActionHandler; |
jaepark | 98e1019 | 2016-08-15 10:51:11 -0700 | [diff] [blame] | 27 | class CPDFSDK_AnnotHandlerMgr; |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 28 | class CPDFSDK_InterForm; |
| 29 | class CPDFSDK_PageView; |
dsinclair | 64376be | 2016-03-31 20:03:24 -0700 | [diff] [blame] | 30 | class IJS_Runtime; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 31 | |
Tom Sepez | 940967d | 2017-05-18 12:32:20 -0700 | [diff] [blame] | 32 | // The CPDFSDK_FormFillEnvironment is "owned" by the embedder across the |
| 33 | // C API as a FPDF_FormHandle, and may pop out of existence at any time, |
| 34 | // so long as the associated embedder-owned FPDF_Document outlives it. |
| 35 | // Pointers from objects in the FPDF_Document ownership hierarchy should |
| 36 | // be ObservedPtr<> so as to clear themselves when the embedder "exits" |
| 37 | // the form fill environment. Pointers from objects in this ownership |
| 38 | // heirarcy to objects in the FPDF_Document ownership hierarcy should be |
| 39 | // UnownedPtr<>, as should pointers from objects in this ownership |
| 40 | // hierarcy back to the form fill environment itself, so as to flag any |
| 41 | // lingering lifetime issues via the memory tools. |
| 42 | |
dsinclair | 3a7741a | 2016-10-11 10:39:49 -0700 | [diff] [blame] | 43 | class CPDFSDK_FormFillEnvironment |
Dan Sinclair | 65ecca4 | 2017-09-21 15:25:32 -0400 | [diff] [blame] | 44 | : public Observable<CPDFSDK_FormFillEnvironment> { |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 45 | public: |
dsinclair | 735606d | 2016-10-05 15:47:02 -0700 | [diff] [blame] | 46 | CPDFSDK_FormFillEnvironment(UnderlyingDocumentType* pDoc, |
| 47 | FPDF_FORMFILLINFO* pFFinfo); |
| 48 | ~CPDFSDK_FormFillEnvironment(); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 49 | |
Lei Zhang | 60fa2fc | 2017-07-21 17:42:19 -0700 | [diff] [blame] | 50 | static bool IsSHIFTKeyDown(uint32_t nFlag) { |
| 51 | return !!(nFlag & FWL_EVENTFLAG_ShiftKey); |
| 52 | } |
| 53 | static bool IsCTRLKeyDown(uint32_t nFlag) { |
| 54 | return !!(nFlag & FWL_EVENTFLAG_ControlKey); |
| 55 | } |
| 56 | static bool IsALTKeyDown(uint32_t nFlag) { |
| 57 | return !!(nFlag & FWL_EVENTFLAG_AltKey); |
| 58 | } |
| 59 | |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 60 | CPDFSDK_PageView* GetPageView(UnderlyingPageType* pPage, bool renew); |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 61 | CPDFSDK_PageView* GetPageView(int nIndex); |
| 62 | CPDFSDK_PageView* GetCurrentView(); |
| 63 | void RemovePageView(UnderlyingPageType* pPage); |
| 64 | void UpdateAllViews(CPDFSDK_PageView* pSender, CPDFSDK_Annot* pAnnot); |
| 65 | |
| 66 | CPDFSDK_Annot* GetFocusAnnot() { return m_pFocusAnnot.Get(); } |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 67 | bool SetFocusAnnot(CPDFSDK_Annot::ObservedPtr* pAnnot); |
| 68 | bool KillFocusAnnot(uint32_t nFlag); |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 69 | void ClearAllFocusedAnnots(); |
| 70 | |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 71 | bool ExtractPages(const std::vector<uint16_t>& arrExtraPages, |
| 72 | CPDF_Document* pDstDoc); |
| 73 | bool InsertPages(int nInsertAt, |
| 74 | const CPDF_Document* pSrcDoc, |
| 75 | const std::vector<uint16_t>& arrSrcPages); |
| 76 | bool ReplacePages(int nPage, |
| 77 | const CPDF_Document* pSrcDoc, |
| 78 | const std::vector<uint16_t>& arrSrcPages); |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 79 | |
Lei Zhang | ad0982a | 2017-06-16 19:30:38 -0700 | [diff] [blame] | 80 | int GetPageCount() const { return m_pUnderlyingDoc->GetPageCount(); } |
| 81 | bool GetPermissions(int nFlag) const; |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 82 | |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 83 | bool GetChangeMark() const { return m_bChangeMask; } |
| 84 | void SetChangeMark() { m_bChangeMask = true; } |
| 85 | void ClearChangeMark() { m_bChangeMask = false; } |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 86 | |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 87 | void ProcJavascriptFun(); |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 88 | bool ProcOpenAction(); |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 89 | |
Lei Zhang | 671630e | 2017-05-19 19:25:16 -0700 | [diff] [blame] | 90 | void Invalidate(UnderlyingPageType* page, const FX_RECT& rect); |
| 91 | void OutputSelectedRect(UnderlyingPageType* page, const CFX_FloatRect& rect); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 92 | |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 93 | void SetCursor(int nCursorType); |
| 94 | int SetTimer(int uElapse, TimerCallback lpTimerFunc); |
| 95 | void KillTimer(int nTimerID); |
| 96 | FX_SYSTEMTIME GetLocalTime() const; |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 97 | |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 98 | void OnChange(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 99 | |
Lei Zhang | 671630e | 2017-05-19 19:25:16 -0700 | [diff] [blame] | 100 | FPDF_PAGE GetCurrentPage(UnderlyingDocumentType* document); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 101 | |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 102 | void ExecuteNamedAction(const char* namedAction); |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 103 | void OnSetFieldInputFocus(FPDF_WIDESTRING focusText, |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 104 | FPDF_DWORD nTextLen, |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 105 | bool bFocus); |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 106 | void DoURIAction(const char* bsURI); |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 107 | void DoGoToAction(int nPageIndex, |
| 108 | int zoomMode, |
| 109 | float* fPosArray, |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 110 | int sizeOfArray); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 111 | |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 112 | UnderlyingDocumentType* GetUnderlyingDocument() const { |
Tom Sepez | 940967d | 2017-05-18 12:32:20 -0700 | [diff] [blame] | 113 | return m_pUnderlyingDoc.Get(); |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 114 | } |
| 115 | |
Tom Sepez | 51da093 | 2015-11-25 16:05:49 -0800 | [diff] [blame] | 116 | #ifdef PDF_ENABLE_XFA |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 117 | CPDF_Document* GetPDFDocument() const { |
| 118 | return m_pUnderlyingDoc ? m_pUnderlyingDoc->GetPDFDoc() : nullptr; |
| 119 | } |
| 120 | |
Tom Sepez | 940967d | 2017-05-18 12:32:20 -0700 | [diff] [blame] | 121 | CPDFXFA_Context* GetXFAContext() const { return m_pUnderlyingDoc.Get(); } |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 122 | void ResetXFADocument() { m_pUnderlyingDoc = nullptr; } |
| 123 | |
tsepez | 2599ff7 | 2016-11-08 14:38:59 -0800 | [diff] [blame] | 124 | int GetPageViewCount() const { return m_PageMap.size(); } |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 125 | |
Lei Zhang | 671630e | 2017-05-19 19:25:16 -0700 | [diff] [blame] | 126 | void DisplayCaret(CPDFXFA_Page* page, |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 127 | FPDF_BOOL bVisible, |
| 128 | double left, |
| 129 | double top, |
| 130 | double right, |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 131 | double bottom); |
Lei Zhang | 671630e | 2017-05-19 19:25:16 -0700 | [diff] [blame] | 132 | int GetCurrentPageIndex(CPDFXFA_Context* document); |
| 133 | void SetCurrentPage(CPDFXFA_Context* document, int iCurPage); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 134 | |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 135 | // TODO(dsinclair): This should probably change to PDFium? |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 136 | WideString FFI_GetAppName() const { return WideString(L"Acrobat"); } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 137 | |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 138 | WideString GetPlatform(); |
| 139 | void GotoURL(CPDFXFA_Context* document, const WideStringView& wsURL); |
Lei Zhang | 671630e | 2017-05-19 19:25:16 -0700 | [diff] [blame] | 140 | void GetPageViewRect(CPDFXFA_Page* page, FS_RECTF& dstRect); |
| 141 | bool PopupMenu(CPDFXFA_Page* page, |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 142 | FPDF_WIDGET hWidget, |
| 143 | int menuFlag, |
| 144 | CFX_PointF pt); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 145 | |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 146 | void Alert(FPDF_WIDESTRING Msg, FPDF_WIDESTRING Title, int Type, int Icon); |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 147 | void EmailTo(FPDF_FILEHANDLER* fileHandler, |
| 148 | FPDF_WIDESTRING pTo, |
| 149 | FPDF_WIDESTRING pSubject, |
| 150 | FPDF_WIDESTRING pCC, |
| 151 | FPDF_WIDESTRING pBcc, |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 152 | FPDF_WIDESTRING pMsg); |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 153 | void UploadTo(FPDF_FILEHANDLER* fileHandler, |
| 154 | int fileFlag, |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 155 | FPDF_WIDESTRING uploadTo); |
dsinclair | 1f24890 | 2016-09-14 10:38:17 -0700 | [diff] [blame] | 156 | FPDF_FILEHANDLER* OpenFile(int fileType, |
| 157 | FPDF_WIDESTRING wsURL, |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 158 | const char* mode); |
Dan Sinclair | 0b95042 | 2017-09-21 15:49:49 -0400 | [diff] [blame] | 159 | RetainPtr<IFX_SeekableReadStream> DownloadFromURL(const wchar_t* url); |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 160 | WideString PostRequestURL(const wchar_t* wsURL, |
| 161 | const wchar_t* wsData, |
| 162 | const wchar_t* wsContentType, |
| 163 | const wchar_t* wsEncode, |
| 164 | const wchar_t* wsHeader); |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 165 | FPDF_BOOL PutRequestURL(const wchar_t* wsURL, |
| 166 | const wchar_t* wsData, |
| 167 | const wchar_t* wsEncode); |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 168 | WideString GetLanguage(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 169 | |
dsinclair | 577ad2c | 2016-09-22 10:20:43 -0700 | [diff] [blame] | 170 | void PageEvent(int iPageCount, uint32_t dwEventType) const; |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 171 | #else // PDF_ENABLE_XFA |
Tom Sepez | 940967d | 2017-05-18 12:32:20 -0700 | [diff] [blame] | 172 | CPDF_Document* GetPDFDocument() const { return m_pUnderlyingDoc.Get(); } |
Tom Sepez | 40e9ff3 | 2015-11-30 12:39:54 -0800 | [diff] [blame] | 173 | #endif // PDF_ENABLE_XFA |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 174 | |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 175 | int JS_appAlert(const wchar_t* Msg, |
| 176 | const wchar_t* Title, |
dsinclair | 72177da | 2016-09-15 12:07:23 -0700 | [diff] [blame] | 177 | uint32_t Type, |
| 178 | uint32_t Icon); |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 179 | int JS_appResponse(const wchar_t* Question, |
| 180 | const wchar_t* Title, |
| 181 | const wchar_t* Default, |
| 182 | const wchar_t* cLabel, |
Tom Sepez | 5702859 | 2016-02-01 15:49:11 -0800 | [diff] [blame] | 183 | FPDF_BOOL bPassword, |
| 184 | void* response, |
| 185 | int length); |
| 186 | void JS_appBeep(int nType); |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 187 | WideString JS_fieldBrowse(); |
| 188 | WideString JS_docGetFilePath(); |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 189 | void JS_docSubmitForm(void* formData, int length, const wchar_t* URL); |
Tom Sepez | 5702859 | 2016-02-01 15:49:11 -0800 | [diff] [blame] | 190 | void JS_docmailForm(void* mailData, |
| 191 | int length, |
| 192 | FPDF_BOOL bUI, |
Dan Sinclair | 812e96c | 2017-03-13 16:43:37 -0400 | [diff] [blame] | 193 | const wchar_t* To, |
| 194 | const wchar_t* Subject, |
| 195 | const wchar_t* CC, |
| 196 | const wchar_t* BCC, |
| 197 | const wchar_t* Msg); |
Tom Sepez | 5702859 | 2016-02-01 15:49:11 -0800 | [diff] [blame] | 198 | void JS_docprint(FPDF_BOOL bUI, |
| 199 | int nStart, |
| 200 | int nEnd, |
| 201 | FPDF_BOOL bSilent, |
| 202 | FPDF_BOOL bShrinkToFit, |
| 203 | FPDF_BOOL bPrintAsImage, |
| 204 | FPDF_BOOL bReverse, |
| 205 | FPDF_BOOL bAnnotations); |
| 206 | void JS_docgotoPage(int nPageNum); |
| 207 | |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 208 | bool IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; } |
Ryan Harrison | 275e260 | 2017-09-18 14:23:18 -0400 | [diff] [blame] | 209 | ByteString GetAppName() const { return ""; } |
dsinclair | b959010 | 2016-04-27 06:38:59 -0700 | [diff] [blame] | 210 | CFX_SystemHandler* GetSysHandler() const { return m_pSysHandler.get(); } |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 211 | FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 212 | |
dsinclair | b94d7c9 | 2016-09-21 12:07:00 -0700 | [diff] [blame] | 213 | // Creates if not present. |
| 214 | CFFL_InteractiveFormFiller* GetInteractiveFormFiller(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 215 | CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present. |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 216 | IJS_Runtime* GetJSRuntime(); // Creates if not present. |
Lei Zhang | cddc8ed | 2017-06-20 17:26:44 -0700 | [diff] [blame] | 217 | CPDFSDK_ActionHandler* GetActionHandler(); // Creates if not present. |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 218 | CPDFSDK_InterForm* GetInterForm(); // Creates if not present. |
Tom Sepez | 2f3dfef | 2015-03-02 15:35:26 -0800 | [diff] [blame] | 219 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 220 | private: |
Lei Zhang | 60fa2fc | 2017-07-21 17:42:19 -0700 | [diff] [blame] | 221 | UnderlyingPageType* GetPage(int nIndex); |
| 222 | |
Tom Sepez | 940967d | 2017-05-18 12:32:20 -0700 | [diff] [blame] | 223 | FPDF_FORMFILLINFO* const m_pInfo; |
Lei Zhang | aa8bf7e | 2015-12-24 19:13:32 -0800 | [diff] [blame] | 224 | std::unique_ptr<CPDFSDK_AnnotHandlerMgr> m_pAnnotHandlerMgr; |
| 225 | std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; |
| 226 | std::unique_ptr<IJS_Runtime> m_pJSRuntime; |
tsepez | 2599ff7 | 2016-11-08 14:38:59 -0800 | [diff] [blame] | 227 | std::map<UnderlyingPageType*, std::unique_ptr<CPDFSDK_PageView>> m_PageMap; |
dsinclair | 7cbe68e | 2016-10-12 11:56:23 -0700 | [diff] [blame] | 228 | std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; |
| 229 | CPDFSDK_Annot::ObservedPtr m_pFocusAnnot; |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 230 | UnownedPtr<UnderlyingDocumentType> m_pUnderlyingDoc; |
dsinclair | b94d7c9 | 2016-09-21 12:07:00 -0700 | [diff] [blame] | 231 | std::unique_ptr<CFFL_InteractiveFormFiller> m_pFormFiller; |
dsinclair | b959010 | 2016-04-27 06:38:59 -0700 | [diff] [blame] | 232 | std::unique_ptr<CFX_SystemHandler> m_pSysHandler; |
dsinclair | 6c659ab | 2016-10-12 13:41:38 -0700 | [diff] [blame] | 233 | bool m_bChangeMask; |
| 234 | bool m_bBeingDestroyed; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 235 | }; |
| 236 | |
dsinclair | 735606d | 2016-10-05 15:47:02 -0700 | [diff] [blame] | 237 | #endif // FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ |