1 // Copyright 2017 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 FXJS_XFA_CJX_EVENTPSEUDOMODEL_H_ 8 #define FXJS_XFA_CJX_EVENTPSEUDOMODEL_H_ 9 10 #include "fxjs/CJX_Define.h" 11 #include "fxjs/xfa/cjx_object.h" 12 13 class CFXJSE_Value; 14 class CScript_EventPseudoModel; 15 16 enum class XFA_Event { 17 Change = 0, 18 CommitKey, 19 FullText, 20 Keydown, 21 Modifier, 22 NewContentType, 23 NewText, 24 PreviousContentType, 25 PreviousText, 26 Reenter, 27 SelectionEnd, 28 SelectionStart, 29 Shift, 30 SoapFaultCode, 31 SoapFaultString, 32 Target, 33 CancelAction 34 }; 35 36 class CJX_EventPseudoModel : public CJX_Object { 37 public: 38 explicit CJX_EventPseudoModel(CScript_EventPseudoModel* model); 39 ~CJX_EventPseudoModel() override; 40 41 JS_METHOD(emit, CJX_EventPseudoModel); 42 JS_METHOD(reset, CJX_EventPseudoModel); 43 44 JS_PROP(change); 45 JS_PROP(commitKey); 46 JS_PROP(fullText); 47 JS_PROP(keyDown); 48 JS_PROP(modifier); 49 JS_PROP(newContentType); 50 JS_PROP(newText); 51 JS_PROP(prevContentType); 52 JS_PROP(prevText); 53 JS_PROP(reenter); 54 JS_PROP(selEnd); 55 JS_PROP(selStart); 56 JS_PROP(shift); 57 JS_PROP(soapFaultCode); 58 JS_PROP(soapFaultString); 59 JS_PROP(target); 60 61 private: 62 void Property(CFXJSE_Value* pValue, XFA_Event dwFlag, bool bSetting); 63 64 static const CJX_MethodSpec MethodSpecs[]; 65 }; 66 67 #endif // FXJS_XFA_CJX_EVENTPSEUDOMODEL_H_ 68