1 // Copyright 2016 The PDFium Authors 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_CXFA_EVENTPARAM_H_ 8 #define XFA_FXFA_CXFA_EVENTPARAM_H_ 9 10 #include "core/fxcrt/unowned_ptr.h" 11 #include "core/fxcrt/widestring.h" 12 #include "v8/include/cppgc/macros.h" 13 #include "xfa/fxfa/fxfa_basic.h" 14 15 enum XFA_EVENTTYPE : uint8_t { 16 XFA_EVENT_Click, 17 XFA_EVENT_Change, 18 XFA_EVENT_DocClose, 19 XFA_EVENT_DocReady, 20 XFA_EVENT_Enter, 21 XFA_EVENT_Exit, 22 XFA_EVENT_Full, 23 XFA_EVENT_IndexChange, 24 XFA_EVENT_Initialize, 25 XFA_EVENT_MouseDown, 26 XFA_EVENT_MouseEnter, 27 XFA_EVENT_MouseExit, 28 XFA_EVENT_MouseUp, 29 XFA_EVENT_PostExecute, 30 XFA_EVENT_PostOpen, 31 XFA_EVENT_PostPrint, 32 XFA_EVENT_PostSave, 33 XFA_EVENT_PostSign, 34 XFA_EVENT_PostSubmit, 35 XFA_EVENT_PreExecute, 36 XFA_EVENT_PreOpen, 37 XFA_EVENT_PrePrint, 38 XFA_EVENT_PreSave, 39 XFA_EVENT_PreSign, 40 XFA_EVENT_PreSubmit, 41 XFA_EVENT_Ready, 42 XFA_EVENT_InitCalculate, 43 XFA_EVENT_InitVariables, 44 XFA_EVENT_Calculate, 45 XFA_EVENT_Validate, 46 XFA_EVENT_Unknown, 47 }; 48 49 class CXFA_EventParam { 50 public: 51 CXFA_EventParam(); 52 CXFA_EventParam(const CXFA_EventParam& other); 53 ~CXFA_EventParam(); 54 55 CXFA_EventParam& operator=(const CXFA_EventParam& other); 56 CXFA_EventParam& operator=(CXFA_EventParam&& other) noexcept; 57 58 WideString GetNewText() const; 59 60 XFA_EVENTTYPE m_eType = XFA_EVENT_Unknown; 61 bool m_bCancelAction = false; 62 bool m_bKeyDown = false; 63 bool m_bModifier = false; 64 bool m_bReenter = false; 65 bool m_bShift = false; 66 bool m_bIsFormReady = false; 67 bool m_bTargeted = true; 68 int32_t m_iCommitKey = 0; 69 int32_t m_iSelEnd = 0; 70 int32_t m_iSelStart = 0; 71 WideString m_wsResult; 72 WideString m_wsChange; 73 WideString m_wsFullText; 74 WideString m_wsNewContentType; 75 WideString m_wsPrevContentType; 76 WideString m_wsPrevText; 77 WideString m_wsSoapFaultCode; 78 WideString m_wsSoapFaultString; 79 }; 80 81 #endif // XFA_FXFA_CXFA_EVENTPARAM_H_ 82