7#ifndef FPDFSDK_CPDFSDK_WIDGET_H_
8#define FPDFSDK_CPDFSDK_WIDGET_H_
10#include "core/fpdfdoc/cpdf_aaction.h"
11#include "core/fpdfdoc/cpdf_action.h"
12#include "core/fpdfdoc/cpdf_annot.h"
13#include "core/fpdfdoc/cpdf_formfield.h"
14#include "core/fxcrt/fx_coordinates.h"
15#include "core/fxcrt/unowned_ptr.h"
16#include "core/fxcrt/widestring.h"
17#include "core/fxge/cfx_color.h"
18#include "fpdfsdk/cpdfsdk_baannot.h"
19#include "third_party/abseil-cpp/absl/types/optional.h"
21class CFFL_InteractiveFormFiller;
26class CPDFSDK_FormFillEnvironment;
27class CPDFSDK_InteractiveForm;
28class CPDFSDK_PageView;
33class CXFA_FFWidgetHandler;
35enum PDFSDK_XFAAActionType {
48 CPDFSDK_PageView* pPageView,
49 CPDFSDK_InteractiveForm* pInteractiveForm);
59 bool bDrawAnnots)
override;
60 bool DoHitTest(
const CFX_PointF& point)
override;
102 void SetValue(
const WideString& sValue);
108 CXFA_FFWidget* GetMixXFAWidget()
const;
109 bool HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT)
const;
110 bool OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
111 CFFL_FieldAction* data,
112 const CPDFSDK_PageView* pPageView);
113 void Synchronize(
bool bSynchronizeElse);
115 void ResetXFAAppearance(ValueChanged bValueChanged);
126 const CPDFSDK_PageView* pPageView);
154 const CFX_PointF& point)
override;
156 const CFX_PointF& point)
override;
158 const CFX_PointF& point)
override;
160 const CFX_PointF& point)
override;
162 const CFX_PointF& point,
163 const CFX_Vector& delta)
override;
165 const CFX_PointF& point)
override;
167 const CFX_PointF& point)
override;
168 bool OnChar(uint32_t nChar,
Mask<FWL_EVENTFLAG> nFlags)
override;
169 bool OnKeyDown(FWL_VKEYCODE nKeyCode,
Mask<FWL_EVENTFLAG> nFlags)
override;
173 CFFL_InteractiveFormFiller* GetInteractiveFormFiller();
176 CXFA_FFWidgetHandler* GetXFAWidgetHandler()
const;
177 CXFA_FFWidget* GetGroupMixXFAWidget()
const;
178 WideString GetName()
const;
179 bool HandleXFAAAction(CPDF_AAction::AActionType type,
180 CFFL_FieldAction* data,
181 CPDFSDK_FormFillEnvironment* pFormFillEnv);
184 UnownedPtr<CPDFSDK_InteractiveForm>
const m_pInteractiveForm;
185 bool m_bAppModified =
false;
186 uint32_t m_nAppearanceAge = 0;
187 uint32_t m_nValueAge = 0;
192 ?
static_cast<CPDFSDK_Widget*>(pAnnot)
CPDFSDK_Annot * GetFirstAnnot()
CPDFSDK_Annot * GetLastAnnot()
CPDFSDK_AnnotIterator(CPDFSDK_PageView *pPageView, const std::vector< CPDF_Annot::Subtype > &subtypes_to_iterate)
CPDFSDK_Annot * GetNextAnnot(CPDFSDK_Annot *pAnnot)
CPDFSDK_Annot * GetPrevAnnot(CPDFSDK_Annot *pAnnot)
virtual CPDF_Annot::Subtype GetAnnotSubtype() const =0
virtual CPDF_Annot * GetPDFAnnot() const
CPDF_Page * GetPDFPage() const
CFX_FloatRect GetRect() const
bool operator==(const char *ptr) const