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_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ |
8 #define XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ | 8 #define XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ |
9 | 9 |
10 #include "xfa/fxfa/parser/xfa_object.h" | 10 #include "xfa/fxfa/parser/xfa_object.h" |
11 #include "xfa/fxjse/cfxjse_arguments.h" | 11 #include "xfa/fxjse/cfxjse_arguments.h" |
12 | 12 |
13 #define XFA_EVENT_CHANGE 0 | 13 enum class XFA_Event { |
14 #define XFA_EVENT_COMMITKEY 1 | 14 Change = 0, |
15 #define XFA_EVENT_FULLTEXT 2 | 15 CommitKey, |
16 #define XFA_EVENT_KEYDOWN 3 | 16 FullText, |
17 #define XFA_EVENT_MODIFIER 4 | 17 Keydown, |
18 #define XFA_EVENT_NEWCONTENTTYPE 5 | 18 Modifier, |
19 #define XFA_EVENT_NEWTEXT 6 | 19 NewContentType, |
20 #define XFA_EVENT_PREVCONTENTTYPE 7 | 20 NewText, |
21 #define XFA_EVENT_PREVTEXT 8 | 21 PreviousContentType, |
22 #define XFA_EVENT_REENTER 9 | 22 PreviousText, |
23 #define XFA_EVENT_SELEND 10 | 23 Reenter, |
24 #define XFA_EVENT_SELSTART 11 | 24 SelectionEnd, |
25 #define XFA_EVENT_SHIFT 12 | 25 SelectionStart, |
26 #define XFA_EVENT_SOAPFAULTCODE 13 | 26 Shift, |
27 #define XFA_EVENT_SOAPFAULTSTRING 14 | 27 SoapFaultCode, |
28 #define XFA_EVENT_TARGET 15 | 28 SoapFaultString, |
29 #define XFA_EVENT_CANCELACTION 16 | 29 Target, |
| 30 CancelAction |
| 31 }; |
30 | 32 |
31 class CScript_EventPseudoModel : public CXFA_OrdinaryObject { | 33 class CScript_EventPseudoModel : public CXFA_OrdinaryObject { |
32 public: | 34 public: |
33 explicit CScript_EventPseudoModel(CXFA_Document* pDocument); | 35 explicit CScript_EventPseudoModel(CXFA_Document* pDocument); |
34 virtual ~CScript_EventPseudoModel(); | 36 virtual ~CScript_EventPseudoModel(); |
35 | 37 |
36 void Script_EventPseudoModel_Change(FXJSE_HVALUE hValue, | 38 void Script_EventPseudoModel_Change(FXJSE_HVALUE hValue, |
37 FX_BOOL bSetting, | 39 FX_BOOL bSetting, |
38 XFA_ATTRIBUTE eAttribute); | 40 XFA_ATTRIBUTE eAttribute); |
39 void Script_EventPseudoModel_CommitKey(FXJSE_HVALUE hValue, | 41 void Script_EventPseudoModel_CommitKey(FXJSE_HVALUE hValue, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 XFA_ATTRIBUTE eAttribute); | 82 XFA_ATTRIBUTE eAttribute); |
81 void Script_EventPseudoModel_Target(FXJSE_HVALUE hValue, | 83 void Script_EventPseudoModel_Target(FXJSE_HVALUE hValue, |
82 FX_BOOL bSetting, | 84 FX_BOOL bSetting, |
83 XFA_ATTRIBUTE eAttribute); | 85 XFA_ATTRIBUTE eAttribute); |
84 | 86 |
85 void Script_EventPseudoModel_Emit(CFXJSE_Arguments* pArguments); | 87 void Script_EventPseudoModel_Emit(CFXJSE_Arguments* pArguments); |
86 void Script_EventPseudoModel_Reset(CFXJSE_Arguments* pArguments); | 88 void Script_EventPseudoModel_Reset(CFXJSE_Arguments* pArguments); |
87 | 89 |
88 protected: | 90 protected: |
89 void Script_EventPseudoModel_Property(FXJSE_HVALUE hValue, | 91 void Script_EventPseudoModel_Property(FXJSE_HVALUE hValue, |
90 uint32_t dwFlag, | 92 XFA_Event dwFlag, |
91 FX_BOOL bSetting); | 93 FX_BOOL bSetting); |
92 }; | 94 }; |
93 | 95 |
94 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ | 96 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ |
OLD | NEW |