| 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 FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "core/fxcrt/include/fx_string.h" | 13 #include "core/fxcrt/include/fx_string.h" |
| 14 #include "fpdfsdk/include/fsdk_baseform.h" | 14 #include "fpdfsdk/include/fsdk_baseform.h" |
| 15 | 15 |
| 16 class CPDFSDK_Annot; | 16 class CPDFSDK_Annot; |
| 17 class CPDFSDK_Document; | 17 class CPDFSDK_Document; |
| 18 class CPDF_Bookmark; | 18 class CPDF_Bookmark; |
| 19 class CPDF_Dictionary; | 19 class CPDF_Dictionary; |
| 20 | 20 |
| 21 class CPDFSDK_FormActionHandler { | |
| 22 public: | |
| 23 FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument); | |
| 24 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, | |
| 25 CPDFSDK_Document* pDocument); | |
| 26 FX_BOOL DoAction_ResetForm(const CPDF_Action& action, | |
| 27 CPDFSDK_Document* pDocument); | |
| 28 FX_BOOL DoAction_ImportData(const CPDF_Action& action, | |
| 29 CPDFSDK_Document* pDocument); | |
| 30 }; | |
| 31 | |
| 32 class CPDFSDK_ActionHandler { | 21 class CPDFSDK_ActionHandler { |
| 33 public: | 22 public: |
| 34 CPDFSDK_ActionHandler(); | 23 CPDFSDK_ActionHandler(); |
| 35 ~CPDFSDK_ActionHandler(); | 24 ~CPDFSDK_ActionHandler(); |
| 36 | 25 |
| 37 FX_BOOL DoAction_DocOpen(const CPDF_Action& action, | 26 FX_BOOL DoAction_DocOpen(const CPDF_Action& action, |
| 38 CPDFSDK_Document* pDocument); | 27 CPDFSDK_Document* pDocument); |
| 39 FX_BOOL DoAction_JavaScript(const CPDF_Action& JsAction, | 28 FX_BOOL DoAction_JavaScript(const CPDF_Action& JsAction, |
| 40 CFX_WideString csJSName, | 29 CFX_WideString csJSName, |
| 41 CPDFSDK_Document* pDocument); | 30 CPDFSDK_Document* pDocument); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const CFX_WideString& script); | 90 const CFX_WideString& script); |
| 102 void RunFieldJavaScript(CPDFSDK_Document* pDocument, | 91 void RunFieldJavaScript(CPDFSDK_Document* pDocument, |
| 103 CPDF_FormField* pFormField, | 92 CPDF_FormField* pFormField, |
| 104 CPDF_AAction::AActionType type, | 93 CPDF_AAction::AActionType type, |
| 105 PDFSDK_FieldAction& data, | 94 PDFSDK_FieldAction& data, |
| 106 const CFX_WideString& script); | 95 const CFX_WideString& script); |
| 107 | 96 |
| 108 FX_BOOL IsValidField(CPDFSDK_Document* pDocument, | 97 FX_BOOL IsValidField(CPDFSDK_Document* pDocument, |
| 109 CPDF_Dictionary* pFieldDict); | 98 CPDF_Dictionary* pFieldDict); |
| 110 FX_BOOL IsValidDocView(CPDFSDK_Document* pDocument); | 99 FX_BOOL IsValidDocView(CPDFSDK_Document* pDocument); |
| 111 | |
| 112 void DoAction_GoTo(CPDFSDK_Document* pDocument, const CPDF_Action& action); | |
| 113 void DoAction_GoToR(CPDFSDK_Document* pDocument, const CPDF_Action& action); | |
| 114 void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); | |
| 115 void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); | |
| 116 void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); | |
| 117 void DoAction_SetOCGState(CPDFSDK_Document* pDocument, | |
| 118 const CPDF_Action& action); | |
| 119 | |
| 120 std::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; | |
| 121 }; | 100 }; |
| 122 | 101 |
| 123 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 102 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |
| OLD | NEW |