OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ | |
8 #define XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ | |
9 | |
10 #include "fxjs/include/cfxjse_arguments.h" | |
11 #include "xfa/fxfa/parser/xfa_object.h" | |
12 | |
13 enum class XFA_Event { | |
14 Change = 0, | |
15 CommitKey, | |
16 FullText, | |
17 Keydown, | |
18 Modifier, | |
19 NewContentType, | |
20 NewText, | |
21 PreviousContentType, | |
22 PreviousText, | |
23 Reenter, | |
24 SelectionEnd, | |
25 SelectionStart, | |
26 Shift, | |
27 SoapFaultCode, | |
28 SoapFaultString, | |
29 Target, | |
30 CancelAction | |
31 }; | |
32 | |
33 class CScript_EventPseudoModel : public CXFA_Object { | |
34 public: | |
35 explicit CScript_EventPseudoModel(CXFA_Document* pDocument); | |
36 ~CScript_EventPseudoModel() override; | |
37 | |
38 void Change(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute); | |
39 void CommitKey(CFXJSE_Value* pValue, | |
40 FX_BOOL bSetting, | |
41 XFA_ATTRIBUTE eAttribute); | |
42 void FullText(CFXJSE_Value* pValue, | |
43 FX_BOOL bSetting, | |
44 XFA_ATTRIBUTE eAttribute); | |
45 void KeyDown(CFXJSE_Value* pValue, | |
46 FX_BOOL bSetting, | |
47 XFA_ATTRIBUTE eAttribute); | |
48 void Modifier(CFXJSE_Value* pValue, | |
49 FX_BOOL bSetting, | |
50 XFA_ATTRIBUTE eAttribute); | |
51 void NewContentType(CFXJSE_Value* pValue, | |
52 FX_BOOL bSetting, | |
53 XFA_ATTRIBUTE eAttribute); | |
54 void NewText(CFXJSE_Value* pValue, | |
55 FX_BOOL bSetting, | |
56 XFA_ATTRIBUTE eAttribute); | |
57 void PrevContentType(CFXJSE_Value* pValue, | |
58 FX_BOOL bSetting, | |
59 XFA_ATTRIBUTE eAttribute); | |
60 void PrevText(CFXJSE_Value* pValue, | |
61 FX_BOOL bSetting, | |
62 XFA_ATTRIBUTE eAttribute); | |
63 void Reenter(CFXJSE_Value* pValue, | |
64 FX_BOOL bSetting, | |
65 XFA_ATTRIBUTE eAttribute); | |
66 void SelEnd(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute); | |
67 void SelStart(CFXJSE_Value* pValue, | |
68 FX_BOOL bSetting, | |
69 XFA_ATTRIBUTE eAttribute); | |
70 void Shift(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute); | |
71 void SoapFaultCode(CFXJSE_Value* pValue, | |
72 FX_BOOL bSetting, | |
73 XFA_ATTRIBUTE eAttribute); | |
74 void SoapFaultString(CFXJSE_Value* pValue, | |
75 FX_BOOL bSetting, | |
76 XFA_ATTRIBUTE eAttribute); | |
77 void Target(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute); | |
78 | |
79 void Emit(CFXJSE_Arguments* pArguments); | |
80 void Reset(CFXJSE_Arguments* pArguments); | |
81 | |
82 protected: | |
83 void Property(CFXJSE_Value* pValue, XFA_Event dwFlag, FX_BOOL bSetting); | |
84 }; | |
85 | |
86 #endif // XFA_FXFA_PARSER_XFA_SCRIPT_EVENTPSEUDOMODEL_H_ | |
OLD | NEW |