7#ifndef FPDFSDK_FORMFILLER_CFFL_FORMFIELD_H_
8#define FPDFSDK_FORMFILLER_CFFL_FORMFIELD_H_
13#include "core/fpdfdoc/cpdf_aaction.h"
14#include "core/fxcrt/cfx_timer.h"
15#include "core/fxcrt/mask.h"
16#include "core/fxcrt/unowned_ptr.h"
17#include "fpdfsdk/formfiller/cffl_fieldaction.h"
18#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
19#include "fpdfsdk/pwl/cpwl_wnd.h"
20#include "fpdfsdk/pwl/ipwl_fillernotify.h"
22class CFFL_PerWindowData;
23class CPDFSDK_PageView;
30 CPDFSDK_Widget* pWidget);
33 virtual void OnDraw(CPDFSDK_PageView* pPageView,
34 CPDFSDK_Widget* pWidget,
38 CPDFSDK_Widget* pWidget,
43 virtual void OnMouseExit(CPDFSDK_PageView* pPageView);
46 CPDFSDK_Widget* pAnnot,
47 Mask<FWL_EVENTFLAG> nFlags,
48 const CFX_PointF& point);
49 virtual bool OnLButtonUp(CPDFSDK_PageView* pPageView,
50 CPDFSDK_Widget* pAnnot,
51 Mask<FWL_EVENTFLAG> nFlags,
52 const CFX_PointF& point);
54 Mask<FWL_EVENTFLAG> nFlags,
55 const CFX_PointF& point);
56 virtual bool OnMouseMove(CPDFSDK_PageView* pPageView,
57 Mask<FWL_EVENTFLAG> nFlags,
58 const CFX_PointF& point);
60 Mask<FWL_EVENTFLAG> nFlags,
61 const CFX_PointF& point,
62 const CFX_Vector& delta);
64 Mask<FWL_EVENTFLAG> nFlags,
65 const CFX_PointF& point);
66 virtual bool OnRButtonUp(CPDFSDK_PageView* pPageView,
67 Mask<FWL_EVENTFLAG> nFlags,
68 const CFX_PointF& point);
70 virtual bool OnKeyDown(FWL_VKEYCODE nKeyCode,
Mask<FWL_EVENTFLAG> nFlags);
71 virtual bool OnChar(CPDFSDK_Widget* pAnnot,
73 Mask<FWL_EVENTFLAG> nFlags);
101 virtual void GetActionData(
const CPDFSDK_PageView* pPageView,
104 virtual void SetActionData(
const CPDFSDK_PageView* pPageView,
110 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) = 0;
113 const CPDFSDK_PageView* pPageView);
114 virtual bool IsDataChanged(
const CPDFSDK_PageView* pPageView);
115 virtual void SaveData(
const CPDFSDK_PageView* pPageView);
124 CFX_PointF
FFLtoPWL(
const CFX_PointF& point);
125 CFX_PointF
PWLtoFFL(
const CFX_PointF& point);
126 bool CommitData(
const CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlag);
128 void EscapeFiller(CPDFSDK_PageView* pPageView,
bool bDestroyPWLWindow);
140 CPDFSDK_Widget* pWidget,
154 CPDFSDK_Widget* pWidget,
FX_RECT GetOuterRect() const
static constexpr int32_t kInvalidTimerID
static bool OnKillFocus(ObservedPtr< CPDFSDK_Annot > &pAnnot, Mask< FWL_EVENTFLAG > nFlags)
CPDFSDK_PageView * GetPageView() const
static bool OnSetFocus(ObservedPtr< CPDFSDK_Annot > &pAnnot, Mask< FWL_EVENTFLAG > nFlags)
bool IsValidSDKAnnot(const CPDFSDK_Annot *p) const
bool IsBeingDestroyed() const
static bool IsUserInput(AActionType type)
CPDF_Dest GetDest(CPDF_Document *pDoc) const
ByteString GetURI(const CPDF_Document *pDoc) const
const CPDF_Dictionary * GetDict() const
WideString GetJavaScript() const
ByteString GetNamedAction() const
int GetDestPageIndex(CPDF_Document *pDoc) const
RetainPtr< const CPDF_Array > GetArrayFor(const ByteString &key) const
virtual void OnField_MouseEnter(bool bModifier, bool bShift, CPDF_FormField *pTarget)=0
virtual void OnField_Validate(WideString *strChange, const WideString &strChangeEx, bool bKeyDown, bool bModifier, bool bShift, CPDF_FormField *pTarget, WideString *Value, bool *bRc)=0
virtual void OnField_Keystroke(WideString *strChange, const WideString &strChangeEx, bool KeyDown, bool bModifier, int *nSelEnd, int *nSelStart, bool bShift, CPDF_FormField *pTarget, WideString *Value, bool bWillCommit, bool bFieldFull, bool *bRc)=0
virtual void OnDoc_DidSave()=0
virtual void OnDoc_WillClose()=0
virtual void OnField_MouseDown(bool bModifier, bool bShift, CPDF_FormField *pTarget)=0
virtual void OnPage_InView()=0
virtual void OnField_Focus(bool bModifier, bool bShift, CPDF_FormField *pTarget, WideString *Value)=0
virtual void OnPage_Close()=0
virtual void OnDoc_WillPrint()=0
virtual void OnDoc_WillSave()=0
virtual void OnField_MouseExit(bool bModifier, bool bShift, CPDF_FormField *pTarget)=0
virtual void OnField_MouseUp(bool bModifier, bool bShift, CPDF_FormField *pTarget)=0
virtual void OnDoc_DidPrint()=0
virtual void OnDoc_Open(const WideString &strTargetName)=0
virtual void OnPage_Open()=0
virtual void OnPage_OutView()=0
virtual void OnField_Blur(bool bModifier, bool bShift, CPDF_FormField *pTarget, WideString *Value)=0
IJS_EventContext * Get() const
ScopedEventContext(IJS_Runtime *pRuntime)
const char * c_str() const
ByteString ToUTF16LE() const