| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 /** | 305 /** |
| 306 * Causes the system to play a sound. | 306 * Causes the system to play a sound. |
| 307 * @param[in] dwType The system code for the appropriate sound.0 (Error)1 | 307 * @param[in] dwType The system code for the appropriate sound.0 (Error)1 |
| 308 * (Warning)2 (Question)3 (Status)4 (Default) | 308 * (Warning)2 (Question)3 (Status)4 (Default) |
| 309 */ | 309 */ |
| 310 virtual void Beep(uint32_t dwType) = 0; | 310 virtual void Beep(uint32_t dwType) = 0; |
| 311 | 311 |
| 312 /** | 312 /** |
| 313 * Displays a message box. | 313 * Displays a message box. |
| 314 * @param[in] dwIconType Icon type, refer to XFA_MBICON. | 314 * @param[in] wsMessage - Message string to display in box. |
| 315 * @param[in] dwButtonType Button type, refer to XFA_MESSAGEBUTTON. | 315 * @param[in] wsTitle - Title string for box. |
| 316 * @param[in] dwIconType - Icon type, refer to XFA_MBICON. |
| 317 * @param[in] dwButtonType - Button type, refer to XFA_MESSAGEBUTTON. |
| 316 * @return A valid integer representing the value of the button pressed by the | 318 * @return A valid integer representing the value of the button pressed by the |
| 317 * user, refer to XFA_ID. | 319 * user, refer to XFA_ID. |
| 318 */ | 320 */ |
| 319 virtual int32_t MsgBox(const CFX_WideStringC& wsMessage, | 321 virtual int32_t MsgBox(const CFX_WideString& wsMessage, |
| 320 const CFX_WideStringC& wsTitle = FX_WSTRC(L""), | 322 const CFX_WideString& wsTitle = L"", |
| 321 uint32_t dwIconType = 0, | 323 uint32_t dwIconType = 0, |
| 322 uint32_t dwButtonType = 0) = 0; | 324 uint32_t dwButtonType = 0) = 0; |
| 323 | 325 |
| 324 /** | 326 /** |
| 325 * Get a response from the user. | 327 * Get a response from the user. |
| 326 * @param[in] bMark - Mask the user input with * (asterisks) when true, | 328 * @param[in] wsQuestion - Message string to display in box. |
| 329 * @param[in] wsTitle - Title string for box. |
| 330 * @param[in] wsDefaultAnswer - Initial contents for answer. |
| 331 * @param[in] bMask - Mask the user input with asterisks when true, |
| 332 * @return A string containing the user's response. |
| 327 */ | 333 */ |
| 328 virtual void Response(CFX_WideString& wsAnswer, | 334 virtual CFX_WideString Response(const CFX_WideString& wsQuestion, |
| 329 const CFX_WideStringC& wsQuestion, | 335 const CFX_WideString& wsTitle = L"", |
| 330 const CFX_WideStringC& wsTitle = FX_WSTRC(L""), | 336 const CFX_WideString& wsDefaultAnswer = L"", |
| 331 const CFX_WideStringC& wsDefaultAnswer = FX_WSTRC(L""), | 337 FX_BOOL bMask = TRUE) = 0; |
| 332 FX_BOOL bMark = TRUE) = 0; | |
| 333 | 338 |
| 334 virtual int32_t GetDocumentCountInBatch() = 0; | 339 virtual int32_t GetDocumentCountInBatch() = 0; |
| 335 virtual int32_t GetCurDocumentInBatch() = 0; | 340 virtual int32_t GetCurDocumentInBatch() = 0; |
| 336 | 341 |
| 337 /** | 342 /** |
| 338 * Download something from somewhere. | 343 * Download something from somewhere. |
| 339 * @param[in] wsURL - http, ftp, such as | 344 * @param[in] wsURL - http, ftp, such as |
| 340 * "http://www.w3.org/TR/REC-xml-names/". | 345 * "http://www.w3.org/TR/REC-xml-names/". |
| 341 */ | 346 */ |
| 342 virtual IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) = 0; | 347 virtual IFX_FileRead* DownloadURL(const CFX_WideString& wsURL) = 0; |
| 343 | 348 |
| 344 /** | 349 /** |
| 345 * POST data to the given url. | 350 * POST data to the given url. |
| 346 * @param[in] wsURL the URL being uploaded. | 351 * @param[in] wsURL the URL being uploaded. |
| 347 * @param[in] wsData the data being uploaded. | 352 * @param[in] wsData the data being uploaded. |
| 348 * @param[in] wsContentType the content type of data including text/html, | 353 * @param[in] wsContentType the content type of data including text/html, |
| 349 * text/xml, text/plain, multipart/form-data, | 354 * text/xml, text/plain, multipart/form-data, |
| 350 * application/x-www-form-urlencoded, | 355 * application/x-www-form-urlencoded, |
| 351 * application/octet-stream, any valid MIME type. | 356 * application/octet-stream, any valid MIME type. |
| 352 * @param[in] wsEncode the encode of data including UTF-8, UTF-16, | 357 * @param[in] wsEncode the encode of data including UTF-8, UTF-16, |
| 353 * ISO8859-1, any recognized [IANA]character encoding | 358 * ISO8859-1, any recognized [IANA]character encoding |
| 354 * @param[in] wsHeader any additional HTTP headers to be included in the | 359 * @param[in] wsHeader any additional HTTP headers to be included in the |
| 355 * post. | 360 * post. |
| 356 * @param[out] wsResponse decoded response from server. | 361 * @param[out] wsResponse decoded response from server. |
| 357 * @return TRUE Server permitted the post request, FALSE otherwise. | 362 * @return TRUE Server permitted the post request, FALSE otherwise. |
| 358 */ | 363 */ |
| 359 virtual FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL, | 364 virtual FX_BOOL PostRequestURL(const CFX_WideString& wsURL, |
| 360 const CFX_WideStringC& wsData, | 365 const CFX_WideString& wsData, |
| 361 const CFX_WideStringC& wsContentType, | 366 const CFX_WideString& wsContentType, |
| 362 const CFX_WideStringC& wsEncode, | 367 const CFX_WideString& wsEncode, |
| 363 const CFX_WideStringC& wsHeader, | 368 const CFX_WideString& wsHeader, |
| 364 CFX_WideString& wsResponse) = 0; | 369 CFX_WideString& wsResponse) = 0; |
| 365 | 370 |
| 366 /** | 371 /** |
| 367 * PUT data to the given url. | 372 * PUT data to the given url. |
| 368 * @param[in] wsURL the URL being uploaded. | 373 * @param[in] wsURL the URL being uploaded. |
| 369 * @param[in] wsData the data being uploaded. | 374 * @param[in] wsData the data being uploaded. |
| 370 * @param[in] wsEncode the encode of data including UTF-8, UTF-16, | 375 * @param[in] wsEncode the encode of data including UTF-8, UTF-16, |
| 371 * ISO8859-1, any recognized [IANA]character encoding | 376 * ISO8859-1, any recognized [IANA]character encoding |
| 372 * @return TRUE Server permitted the post request, FALSE otherwise. | 377 * @return TRUE Server permitted the post request, FALSE otherwise. |
| 373 */ | 378 */ |
| 374 virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, | 379 virtual FX_BOOL PutRequestURL(const CFX_WideString& wsURL, |
| 375 const CFX_WideStringC& wsData, | 380 const CFX_WideString& wsData, |
| 376 const CFX_WideStringC& wsEncode) = 0; | 381 const CFX_WideString& wsEncode) = 0; |
| 377 | 382 |
| 378 virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0; | 383 virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0; |
| 379 virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; | 384 virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; |
| 380 }; | 385 }; |
| 381 | 386 |
| 382 class IXFA_DocProvider { | 387 class IXFA_DocProvider { |
| 383 public: | 388 public: |
| 384 virtual ~IXFA_DocProvider() {} | 389 virtual ~IXFA_DocProvider() {} |
| 385 | 390 |
| 386 virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0; | 391 virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 409 return FALSE; | 414 return FALSE; |
| 410 } | 415 } |
| 411 virtual int32_t CountPages(CXFA_FFDoc* hDoc) = 0; | 416 virtual int32_t CountPages(CXFA_FFDoc* hDoc) = 0; |
| 412 virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc) = 0; | 417 virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc) = 0; |
| 413 virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) = 0; | 418 virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) = 0; |
| 414 virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0; | 419 virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0; |
| 415 virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; | 420 virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; |
| 416 virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0; | 421 virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0; |
| 417 virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle) = 0; | 422 virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle) = 0; |
| 418 virtual void ExportData(CXFA_FFDoc* hDoc, | 423 virtual void ExportData(CXFA_FFDoc* hDoc, |
| 419 const CFX_WideStringC& wsFilePath, | 424 const CFX_WideString& wsFilePath, |
| 420 FX_BOOL bXDP = TRUE) = 0; | 425 FX_BOOL bXDP = TRUE) = 0; |
| 421 virtual void ImportData(CXFA_FFDoc* hDoc, | 426 virtual void ImportData(CXFA_FFDoc* hDoc, |
| 422 const CFX_WideStringC& wsFilePath) = 0; | 427 const CFX_WideString& wsFilePath) = 0; |
| 423 virtual void GotoURL(CXFA_FFDoc* hDoc, | 428 virtual void GotoURL(CXFA_FFDoc* hDoc, |
| 424 const CFX_WideStringC& bsURL, | 429 const CFX_WideString& bsURL, |
| 425 FX_BOOL bAppend = TRUE) = 0; | 430 FX_BOOL bAppend = TRUE) = 0; |
| 426 virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0; | 431 virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0; |
| 427 virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; | 432 virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; |
| 428 virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | 433 virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; |
| 429 virtual void Print(CXFA_FFDoc* hDoc, | 434 virtual void Print(CXFA_FFDoc* hDoc, |
| 430 int32_t nStartPage, | 435 int32_t nStartPage, |
| 431 int32_t nEndPage, | 436 int32_t nEndPage, |
| 432 uint32_t dwOptions) = 0; | 437 uint32_t dwOptions) = 0; |
| 433 virtual int32_t AbsPageCountInBatch(CXFA_FFDoc* hDoc) = 0; | 438 virtual int32_t AbsPageCountInBatch(CXFA_FFDoc* hDoc) = 0; |
| 434 virtual int32_t AbsPageInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | 439 virtual int32_t AbsPageInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 virtual CXFA_FFWidget* MoveToNext() = 0; | 548 virtual CXFA_FFWidget* MoveToNext() = 0; |
| 544 virtual CXFA_FFWidget* MoveToPrevious() = 0; | 549 virtual CXFA_FFWidget* MoveToPrevious() = 0; |
| 545 virtual CXFA_FFWidget* GetCurrentWidget() = 0; | 550 virtual CXFA_FFWidget* GetCurrentWidget() = 0; |
| 546 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0; | 551 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0; |
| 547 | 552 |
| 548 protected: | 553 protected: |
| 549 virtual ~IXFA_WidgetIterator() {} | 554 virtual ~IXFA_WidgetIterator() {} |
| 550 }; | 555 }; |
| 551 | 556 |
| 552 #endif // XFA_FXFA_INCLUDE_FXFA_H_ | 557 #endif // XFA_FXFA_INCLUDE_FXFA_H_ |
| OLD | NEW |