Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cjs_event_context.h>
Public Types | |
enum class | Kind : uint8_t { kUnknown , kDocOpen , kDocWillPrint , kDocDidPrint , kDocWillSave , kDocDidSave , kDocWillClose , kPageOpen , kPageClose , kPageInView , kPageOutView , kFieldMouseDown , kFieldMouseUp , kFieldMouseEnter , kFieldMouseExit , kFieldFocus , kFieldBlur , kFieldKeystroke , kFieldValidate , kFieldCalculate , kFieldFormat , kExternalExec } |
Public Member Functions | |
CJS_EventContext (CJS_Runtime *pRuntime) | |
~CJS_EventContext () override | |
absl::optional< IJS_Runtime::JS_Error > | RunScript (const WideString &script) override |
void | OnDoc_Open (const WideString &strTargetName) override |
void | OnDoc_WillPrint () override |
void | OnDoc_DidPrint () override |
void | OnDoc_WillSave () override |
void | OnDoc_DidSave () override |
void | OnDoc_WillClose () override |
void | OnPage_Open () override |
void | OnPage_Close () override |
void | OnPage_InView () override |
void | OnPage_OutView () override |
void | OnField_MouseDown (bool bModifier, bool bShift, CPDF_FormField *pTarget) override |
void | OnField_MouseEnter (bool bModifier, bool bShift, CPDF_FormField *pTarget) override |
void | OnField_MouseExit (bool bModifier, bool bShift, CPDF_FormField *pTarget) override |
void | OnField_MouseUp (bool bModifier, bool bShift, CPDF_FormField *pTarget) override |
void | OnField_Focus (bool bModifier, bool bShift, CPDF_FormField *pTarget, WideString *Value) override |
void | OnField_Blur (bool bModifier, bool bShift, CPDF_FormField *pTarget, WideString *Value) override |
void | OnField_Calculate (CPDF_FormField *pSource, CPDF_FormField *pTarget, WideString *pValue, bool *pRc) override |
void | OnField_Format (CPDF_FormField *pTarget, WideString *Value) override |
void | OnField_Keystroke (WideString *strChange, const WideString &strChangeEx, bool bKeyDown, bool bModifier, int *nSelEnd, int *nSelStart, bool bShift, CPDF_FormField *pTarget, WideString *Value, bool bWillCommit, bool bFieldFull, bool *bRc) override |
void | OnField_Validate (WideString *strChange, const WideString &strChangeEx, bool bKeyDown, bool bModifier, bool bShift, CPDF_FormField *pTarget, WideString *Value, bool *bRc) override |
void | OnExternal_Exec () override |
CJS_Runtime * | GetJSRuntime () const |
CPDFSDK_FormFillEnvironment * | GetFormFillEnv () const |
CJS_Field * | SourceField () |
CJS_Field * | TargetField () |
Kind | EventKind () const |
bool | IsValid () const |
bool | IsUserGesture () const |
WideString & | Change () |
WideString | ChangeEx () const |
WideString | SourceName () const |
WideString | TargetName () const |
int | CommitKey () const |
bool | FieldFull () const |
bool | KeyDown () const |
bool | Modifier () const |
ByteStringView | Name () const |
ByteStringView | Type () const |
bool & | Rc () |
int | SelEnd () const |
int | SelStart () const |
void | SetSelEnd (int value) |
void | SetSelStart (int value) |
bool | Shift () const |
bool | HasValue () const |
WideString & | Value () |
bool | WillCommit () const |
void | SetValueForTest (WideString *pStr) |
void | SetRCForTest (bool *pRC) |
void | SetStrChangeForTest (WideString *pStrChange) |
void | ResetWillCommitForTest () |
Public Member Functions inherited from IJS_EventContext | |
virtual | ~IJS_EventContext ()=default |
Definition at line 19 of file cjs_event_context.h.
|
strong |
Definition at line 21 of file cjs_event_context.h.
|
explicit |
Definition at line 20 of file cjs_event_context.cpp.
References CJS_EventContext().
Referenced by CJS_EventContext().
|
overridedefault |
WideString & CJS_EventContext::Change | ( | ) |
Definition at line 321 of file cjs_event_context.cpp.
Referenced by CJS_PublicMethods::AFMergeChange(), CJS_PublicMethods::AFNumber_Keystroke(), CJS_PublicMethods::AFSpecial_Keystroke(), and CJS_PublicMethods::AFSpecial_KeystrokeEx().
|
inline |
Definition at line 120 of file cjs_event_context.h.
|
inline |
Definition at line 123 of file cjs_event_context.h.
|
inline |
Definition at line 116 of file cjs_event_context.h.
|
inline |
Definition at line 124 of file cjs_event_context.h.
|
inline |
Definition at line 110 of file cjs_event_context.h.
Referenced by SourceField(), and TargetField().
|
inline |
Definition at line 109 of file cjs_event_context.h.
|
inline |
Definition at line 135 of file cjs_event_context.h.
Referenced by CJS_PublicMethods::AFDate_FormatEx(), CJS_PublicMethods::AFDate_KeystrokeEx(), CJS_PublicMethods::AFMergeChange(), CJS_PublicMethods::AFNumber_Keystroke(), CJS_PublicMethods::AFRange_Validate(), CJS_PublicMethods::AFSimple_Calculate(), CJS_PublicMethods::AFSpecial_Format(), CJS_PublicMethods::AFSpecial_Keystroke(), and CJS_PublicMethods::AFSpecial_KeystrokeEx().
bool CJS_EventContext::IsUserGesture | ( | ) | const |
Definition at line 310 of file cjs_event_context.cpp.
References kFieldKeystroke, kFieldMouseDown, and kFieldMouseUp.
|
inline |
Definition at line 117 of file cjs_event_context.h.
|
inline |
Definition at line 125 of file cjs_event_context.h.
|
inline |
Definition at line 126 of file cjs_event_context.h.
ByteStringView CJS_EventContext::Name | ( | ) | const |
Definition at line 325 of file cjs_event_context.cpp.
References kDocDidPrint, kDocDidSave, kDocOpen, kDocWillClose, kDocWillPrint, kDocWillSave, kExternalExec, kFieldBlur, kFieldCalculate, kFieldFocus, kFieldFormat, kFieldKeystroke, kFieldMouseDown, kFieldMouseEnter, kFieldMouseExit, kFieldMouseUp, kFieldValidate, kPageClose, kPageInView, kPageOpen, and kPageOutView.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 109 of file cjs_event_context.cpp.
References kDocDidPrint.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 117 of file cjs_event_context.cpp.
References kDocDidSave.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 100 of file cjs_event_context.cpp.
References kDocOpen.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 121 of file cjs_event_context.cpp.
References kDocWillClose.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 105 of file cjs_event_context.cpp.
References kDocWillPrint.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 113 of file cjs_event_context.cpp.
References kDocWillSave.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 279 of file cjs_event_context.cpp.
References kExternalExec.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 189 of file cjs_event_context.cpp.
References kFieldBlur.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 255 of file cjs_event_context.cpp.
References kFieldCalculate.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 177 of file cjs_event_context.cpp.
References kFieldFocus.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 269 of file cjs_event_context.cpp.
References kFieldFormat.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 201 of file cjs_event_context.cpp.
References kFieldKeystroke.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 159 of file cjs_event_context.cpp.
References kFieldMouseDown.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 141 of file cjs_event_context.cpp.
References kFieldMouseEnter.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 150 of file cjs_event_context.cpp.
References kFieldMouseExit.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 168 of file cjs_event_context.cpp.
References kFieldMouseUp.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 234 of file cjs_event_context.cpp.
References kFieldValidate.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 129 of file cjs_event_context.cpp.
References kPageClose.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 133 of file cjs_event_context.cpp.
References kPageInView.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 125 of file cjs_event_context.cpp.
References kPageOpen.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 137 of file cjs_event_context.cpp.
References kPageOutView.
bool & CJS_EventContext::Rc | ( | ) |
Definition at line 406 of file cjs_event_context.cpp.
Referenced by CJS_PublicMethods::AFDate_KeystrokeEx(), CJS_PublicMethods::AFNumber_Keystroke(), CJS_PublicMethods::AFRange_Validate(), and CJS_PublicMethods::AFSpecial_KeystrokeEx().
|
inline |
Definition at line 144 of file cjs_event_context.h.
|
overridevirtual |
Implements IJS_EventContext.
Definition at line 25 of file cjs_event_context.cpp.
References IJS_Runtime::JS_Error::JS_Error(), JSGetStringFromID(), kBusyError, and kDuplicateEventError.
int CJS_EventContext::SelEnd | ( | ) | const |
Definition at line 410 of file cjs_event_context.cpp.
Referenced by CJS_PublicMethods::AFNumber_Keystroke().
int CJS_EventContext::SelStart | ( | ) | const |
Definition at line 414 of file cjs_event_context.cpp.
Referenced by CJS_PublicMethods::AFNumber_Keystroke().
|
inline |
Definition at line 140 of file cjs_event_context.h.
void CJS_EventContext::SetSelEnd | ( | int | value | ) |
Definition at line 418 of file cjs_event_context.cpp.
void CJS_EventContext::SetSelStart | ( | int | value | ) |
Definition at line 423 of file cjs_event_context.cpp.
|
inline |
Definition at line 141 of file cjs_event_context.h.
|
inline |
Definition at line 139 of file cjs_event_context.h.
Referenced by TEST_F().
|
inline |
Definition at line 134 of file cjs_event_context.h.
CJS_Field * CJS_EventContext::SourceField | ( | ) |
Definition at line 56 of file cjs_event_context.cpp.
References GetFormFillEnv(), and SourceName().
|
inline |
Definition at line 121 of file cjs_event_context.h.
Referenced by SourceField().
CJS_Field * CJS_EventContext::TargetField | ( | ) |
Definition at line 78 of file cjs_event_context.cpp.
References GetFormFillEnv(), and TargetName().
|
inline |
Definition at line 122 of file cjs_event_context.h.
Referenced by TargetField().
ByteStringView CJS_EventContext::Type | ( | ) | const |
Definition at line 374 of file cjs_event_context.cpp.
References kDocDidPrint, kDocDidSave, kDocOpen, kDocWillClose, kDocWillPrint, kDocWillSave, kExternalExec, kFieldBlur, kFieldCalculate, kFieldFocus, kFieldFormat, kFieldKeystroke, kFieldMouseDown, kFieldMouseEnter, kFieldMouseExit, kFieldMouseUp, kFieldValidate, kPageClose, kPageInView, kPageOpen, and kPageOutView.
|
inline |
Definition at line 136 of file cjs_event_context.h.
Referenced by CJS_PublicMethods::AFDate_FormatEx(), CJS_PublicMethods::AFDate_KeystrokeEx(), CJS_PublicMethods::AFMergeChange(), CJS_PublicMethods::AFNumber_Keystroke(), CJS_PublicMethods::AFRange_Validate(), CJS_PublicMethods::AFSimple_Calculate(), CJS_PublicMethods::AFSpecial_Format(), CJS_PublicMethods::AFSpecial_Keystroke(), and CJS_PublicMethods::AFSpecial_KeystrokeEx().
|
inline |
Definition at line 137 of file cjs_event_context.h.
Referenced by CJS_PublicMethods::AFDate_KeystrokeEx(), CJS_PublicMethods::AFMergeChange(), CJS_PublicMethods::AFNumber_Keystroke(), and CJS_PublicMethods::AFSpecial_KeystrokeEx().