OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_INCLUDE_FXFA_H_ | 7 #ifndef XFA_FXFA_INCLUDE_FXFA_H_ |
8 #define XFA_FXFA_INCLUDE_FXFA_H_ | 8 #define XFA_FXFA_INCLUDE_FXFA_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 class IXFA_AppProvider { | 175 class IXFA_AppProvider { |
176 public: | 176 public: |
177 virtual ~IXFA_AppProvider() {} | 177 virtual ~IXFA_AppProvider() {} |
178 | 178 |
179 /** | 179 /** |
180 * Specifies the name of the client application in which a form currently | 180 * Specifies the name of the client application in which a form currently |
181 * exists. Such as Exchange-Pro. | 181 * exists. Such as Exchange-Pro. |
182 */ | 182 */ |
183 virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0; | 183 virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0; |
184 virtual void GetAppType(CFX_WideString& wsAppType) = 0; | 184 virtual void GetAppType(CFX_WideString& wsAppType) = 0; |
185 virtual void SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) {} | 185 virtual void SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) = 0; |
186 virtual void GetFoxitAppType(CFX_WideString& wsFoxitAppType) { | 186 virtual void GetFoxitAppType(CFX_WideString& wsFoxitAppType) = 0; |
187 wsFoxitAppType.clear(); | |
188 } | |
189 | 187 |
190 /** | 188 /** |
191 * Returns the language of the running host application. Such as zh_CN | 189 * Returns the language of the running host application. Such as zh_CN |
192 */ | 190 */ |
193 virtual void GetLanguage(CFX_WideString& wsLanguage) = 0; | 191 virtual void GetLanguage(CFX_WideString& wsLanguage) = 0; |
194 | 192 |
195 /** | 193 /** |
196 * Returns the platform of the machine running the script. Such as WIN | 194 * Returns the platform of the machine running the script. Such as WIN |
197 */ | 195 */ |
198 virtual void GetPlatform(CFX_WideString& wsPlatform) = 0; | 196 virtual void GetPlatform(CFX_WideString& wsPlatform) = 0; |
199 | 197 |
200 /** | 198 /** |
201 * Indicates the packaging of the application that is running the script. Such | 199 * Indicates the packaging of the application that is running the script. Such |
202 * as Full | 200 * as Full |
203 */ | 201 */ |
204 virtual void GetVariation(CFX_WideString& wsVariation) = 0; | 202 virtual void GetVariation(CFX_WideString& wsVariation) = 0; |
205 | 203 |
206 /** | 204 /** |
207 * Indicates the version number of the current application. Such as 9 | 205 * Indicates the version number of the current application. Such as 9 |
208 */ | 206 */ |
209 virtual void GetVersion(CFX_WideString& wsVersion) = 0; | 207 virtual void GetVersion(CFX_WideString& wsVersion) = 0; |
210 virtual void GetFoxitVersion(CFX_WideString& wsFoxitVersion) { | 208 virtual void GetFoxitVersion(CFX_WideString& wsFoxitVersion) = 0; |
211 wsFoxitVersion.clear(); | |
212 } | |
213 | 209 |
214 /** | 210 /** |
215 * Get application name, such as Phantom. | 211 * Get application name, such as Phantom. |
216 */ | 212 */ |
217 virtual void GetAppName(CFX_WideString& wsName) = 0; | 213 virtual void GetAppName(CFX_WideString& wsName) = 0; |
218 virtual void GetFoxitAppName(CFX_WideString& wsFoxitName) { | 214 virtual void GetFoxitAppName(CFX_WideString& wsFoxitName) = 0; |
219 wsFoxitName.clear(); | |
220 } | |
221 | 215 |
222 /** | 216 /** |
223 * Causes the system to play a sound. | 217 * Causes the system to play a sound. |
224 * @param[in] dwType The system code for the appropriate sound.0 (Error)1 | 218 * @param[in] dwType The system code for the appropriate sound.0 (Error)1 |
225 * (Warning)2 (Question)3 (Status)4 (Default) | 219 * (Warning)2 (Question)3 (Status)4 (Default) |
226 */ | 220 */ |
227 virtual void Beep(uint32_t dwType) = 0; | 221 virtual void Beep(uint32_t dwType) = 0; |
228 | 222 |
229 /** | 223 /** |
230 * Displays a message box. | 224 * Displays a message box. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 CFX_PointF ptPopup, | 315 CFX_PointF ptPopup, |
322 const CFX_RectF* pRectExclude = NULL) = 0; | 316 const CFX_RectF* pRectExclude = NULL) = 0; |
323 virtual void PageViewEvent(CXFA_FFPageView* pPageView, uint32_t dwFlags) = 0; | 317 virtual void PageViewEvent(CXFA_FFPageView* pPageView, uint32_t dwFlags) = 0; |
324 virtual void WidgetPostAdd(CXFA_FFWidget* hWidget, | 318 virtual void WidgetPostAdd(CXFA_FFWidget* hWidget, |
325 CXFA_WidgetAcc* pWidgetData) = 0; | 319 CXFA_WidgetAcc* pWidgetData) = 0; |
326 virtual void WidgetPreRemove(CXFA_FFWidget* hWidget, | 320 virtual void WidgetPreRemove(CXFA_FFWidget* hWidget, |
327 CXFA_WidgetAcc* pWidgetData) = 0; | 321 CXFA_WidgetAcc* pWidgetData) = 0; |
328 virtual FX_BOOL RenderCustomWidget(CXFA_FFWidget* hWidget, | 322 virtual FX_BOOL RenderCustomWidget(CXFA_FFWidget* hWidget, |
329 CFX_Graphics* pGS, | 323 CFX_Graphics* pGS, |
330 CFX_Matrix* pMatrix, | 324 CFX_Matrix* pMatrix, |
331 const CFX_RectF& rtUI) { | 325 const CFX_RectF& rtUI) = 0; |
332 return FALSE; | 326 |
333 } | |
334 virtual int32_t CountPages(CXFA_FFDoc* hDoc) = 0; | 327 virtual int32_t CountPages(CXFA_FFDoc* hDoc) = 0; |
335 virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc) = 0; | 328 virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc) = 0; |
336 virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) = 0; | 329 virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) = 0; |
337 virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0; | 330 virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0; |
338 virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; | 331 virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; |
339 virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0; | 332 virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0; |
340 virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle) = 0; | 333 virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle) = 0; |
341 virtual void ExportData(CXFA_FFDoc* hDoc, | 334 virtual void ExportData(CXFA_FFDoc* hDoc, |
342 const CFX_WideString& wsFilePath, | 335 const CFX_WideString& wsFilePath, |
343 FX_BOOL bXDP = TRUE) = 0; | 336 FX_BOOL bXDP = TRUE) = 0; |
344 virtual void ImportData(CXFA_FFDoc* hDoc, | 337 virtual void ImportData(CXFA_FFDoc* hDoc, |
345 const CFX_WideString& wsFilePath) = 0; | 338 const CFX_WideString& wsFilePath) = 0; |
346 virtual void GotoURL(CXFA_FFDoc* hDoc, | 339 virtual void GotoURL(CXFA_FFDoc* hDoc, |
347 const CFX_WideString& bsURL, | 340 const CFX_WideString& bsURL, |
348 FX_BOOL bAppend = TRUE) = 0; | 341 FX_BOOL bAppend = TRUE) = 0; |
349 virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0; | 342 virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0; |
350 virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; | 343 virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; |
351 virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | 344 virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; |
352 virtual void Print(CXFA_FFDoc* hDoc, | 345 virtual void Print(CXFA_FFDoc* hDoc, |
353 int32_t nStartPage, | 346 int32_t nStartPage, |
354 int32_t nEndPage, | 347 int32_t nEndPage, |
355 uint32_t dwOptions) = 0; | 348 uint32_t dwOptions) = 0; |
356 virtual int32_t AbsPageCountInBatch(CXFA_FFDoc* hDoc) = 0; | 349 virtual int32_t AbsPageCountInBatch(CXFA_FFDoc* hDoc) = 0; |
357 virtual int32_t AbsPageInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | 350 virtual int32_t AbsPageInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; |
358 virtual int32_t SheetCountInBatch(CXFA_FFDoc* hDoc) = 0; | 351 virtual int32_t SheetCountInBatch(CXFA_FFDoc* hDoc) = 0; |
359 virtual int32_t SheetInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | 352 virtual int32_t SheetInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; |
360 virtual int32_t Verify(CXFA_FFDoc* hDoc, | 353 virtual int32_t Verify(CXFA_FFDoc* hDoc, |
361 CXFA_Node* pSigNode, | 354 CXFA_Node* pSigNode, |
362 FX_BOOL bUsed = TRUE) { | 355 FX_BOOL bUsed = TRUE) = 0; |
363 return 0; | |
364 } | |
365 virtual FX_BOOL Sign(CXFA_FFDoc* hDoc, | 356 virtual FX_BOOL Sign(CXFA_FFDoc* hDoc, |
366 CXFA_NodeList* pNodeList, | 357 CXFA_NodeList* pNodeList, |
367 const CFX_WideStringC& wsExpression, | 358 const CFX_WideStringC& wsExpression, |
368 const CFX_WideStringC& wsXMLIdent, | 359 const CFX_WideStringC& wsXMLIdent, |
369 const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), | 360 const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), |
370 FX_BOOL bUsed = TRUE) { | 361 FX_BOOL bUsed = TRUE) = 0; |
371 return 0; | 362 virtual CXFA_NodeList* Enumerate(CXFA_FFDoc* hDoc) = 0; |
372 } | |
373 virtual CXFA_NodeList* Enumerate(CXFA_FFDoc* hDoc) { return 0; } | |
374 virtual FX_BOOL Clear(CXFA_FFDoc* hDoc, | 363 virtual FX_BOOL Clear(CXFA_FFDoc* hDoc, |
375 CXFA_Node* pSigNode, | 364 CXFA_Node* pSigNode, |
376 FX_BOOL bCleared = TRUE) { | 365 FX_BOOL bCleared = TRUE) = 0; |
377 return 0; | |
378 } | |
379 virtual void GetURL(CXFA_FFDoc* hDoc, CFX_WideString& wsDocURL) = 0; | 366 virtual void GetURL(CXFA_FFDoc* hDoc, CFX_WideString& wsDocURL) = 0; |
380 virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) = 0; | 367 virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) = 0; |
381 | 368 |
382 virtual FX_BOOL SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0; | 369 virtual FX_BOOL SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0; |
383 virtual FX_BOOL CheckWord(CXFA_FFDoc* hDoc, const CFX_ByteStringC& sWord) = 0; | 370 virtual FX_BOOL CheckWord(CXFA_FFDoc* hDoc, const CFX_ByteStringC& sWord) = 0; |
384 virtual FX_BOOL GetSuggestWords(CXFA_FFDoc* hDoc, | 371 virtual FX_BOOL GetSuggestWords(CXFA_FFDoc* hDoc, |
385 const CFX_ByteStringC& sWord, | 372 const CFX_ByteStringC& sWord, |
386 std::vector<CFX_ByteString>& sSuggest) = 0; | 373 std::vector<CFX_ByteString>& sSuggest) = 0; |
387 virtual FX_BOOL GetPDFScriptObject(CXFA_FFDoc* hDoc, | 374 virtual FX_BOOL GetPDFScriptObject(CXFA_FFDoc* hDoc, |
388 const CFX_ByteStringC& utf8Name, | 375 const CFX_ByteStringC& utf8Name, |
389 CFXJSE_Value* pValue) = 0; | 376 CFXJSE_Value* pValue) = 0; |
390 virtual FX_BOOL GetGlobalProperty(CXFA_FFDoc* hDoc, | 377 virtual FX_BOOL GetGlobalProperty(CXFA_FFDoc* hDoc, |
391 const CFX_ByteStringC& szPropName, | 378 const CFX_ByteStringC& szPropName, |
392 CFXJSE_Value* pValue) = 0; | 379 CFXJSE_Value* pValue) = 0; |
393 virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc, | 380 virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc, |
394 const CFX_ByteStringC& szPropName, | 381 const CFX_ByteStringC& szPropName, |
395 CFXJSE_Value* pValue) = 0; | 382 CFXJSE_Value* pValue) = 0; |
396 virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc, | 383 virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc, |
397 IFX_FileRead* pFile, | 384 IFX_FileRead* pFile, |
398 FX_BOOL bTakeOverFile) = 0; | 385 FX_BOOL bTakeOverFile) = 0; |
399 virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc, | 386 virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc, |
400 const CFX_WideString& wsLink) = 0; | 387 const CFX_WideString& wsLink) = 0; |
401 }; | 388 }; |
402 | 389 |
403 class CXFA_RenderOptions { | |
404 public: | |
405 CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {} | |
406 FX_BOOL m_bPrint; | |
407 FX_BOOL m_bHighlight; | |
408 }; | |
409 | |
410 class IXFA_WidgetIterator { | 390 class IXFA_WidgetIterator { |
411 public: | 391 public: |
412 virtual ~IXFA_WidgetIterator() {} | 392 virtual ~IXFA_WidgetIterator() {} |
413 | 393 |
414 virtual void Reset() = 0; | 394 virtual void Reset() = 0; |
415 virtual CXFA_FFWidget* MoveToFirst() = 0; | 395 virtual CXFA_FFWidget* MoveToFirst() = 0; |
416 virtual CXFA_FFWidget* MoveToLast() = 0; | 396 virtual CXFA_FFWidget* MoveToLast() = 0; |
417 virtual CXFA_FFWidget* MoveToNext() = 0; | 397 virtual CXFA_FFWidget* MoveToNext() = 0; |
418 virtual CXFA_FFWidget* MoveToPrevious() = 0; | 398 virtual CXFA_FFWidget* MoveToPrevious() = 0; |
419 virtual CXFA_FFWidget* GetCurrentWidget() = 0; | 399 virtual CXFA_FFWidget* GetCurrentWidget() = 0; |
420 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0; | 400 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0; |
421 }; | 401 }; |
422 | 402 |
423 #endif // XFA_FXFA_INCLUDE_FXFA_H_ | 403 #endif // XFA_FXFA_INCLUDE_FXFA_H_ |
OLD | NEW |