#include "fpdfsdk/formfiller/cffl_formfield.h"
#include <utility>
#include "constants/form_flags.h"
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fxcrt/check.h"
#include "core/fxge/cfx_renderdevice.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/cpdfsdk_widget.h"
#include "fpdfsdk/formfiller/cffl_perwindowdata.h"
CFFL_FormField::CFFL_FormField(CFFL_InteractiveFormFiller* pFormFiller,
CPDFSDK_Widget* pWidget)
: … { … }
CFFL_FormField::~CFFL_FormField() { … }
void CFFL_FormField::DestroyWindows() { … }
FX_RECT CFFL_FormField::GetViewBBox(const CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Widget* pWidget,
CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device) { … }
void CFFL_FormField::OnDrawDeactive(CPDFSDK_PageView* pPageView,
CPDFSDK_Widget* pWidget,
CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device) { … }
void CFFL_FormField::OnMouseEnter(CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::OnMouseExit(CPDFSDK_PageView* pPageView) { … }
bool CFFL_FormField::OnLButtonDown(CPDFSDK_PageView* pPageView,
CPDFSDK_Widget* pWidget,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point) { … }
bool CFFL_FormField::OnLButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Widget* pWidget,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point) { … }
bool CFFL_FormField::OnLButtonDblClk(CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point) { … }
bool CFFL_FormField::OnMouseMove(CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point) { … }
bool CFFL_FormField::OnMouseWheel(CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point,
const CFX_Vector& delta) { … }
bool CFFL_FormField::OnRButtonDown(CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point) { … }
bool CFFL_FormField::OnRButtonUp(CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlags,
const CFX_PointF& point) { … }
bool CFFL_FormField::OnKeyDown(FWL_VKEYCODE nKeyCode,
Mask<FWL_EVENTFLAG> nFlags) { … }
bool CFFL_FormField::OnChar(CPDFSDK_Widget* pWidget,
uint32_t nChar,
Mask<FWL_EVENTFLAG> nFlags) { … }
bool CFFL_FormField::SetIndexSelected(int index, bool selected) { … }
bool CFFL_FormField::IsIndexSelected(int index) { … }
WideString CFFL_FormField::GetText() { … }
WideString CFFL_FormField::GetSelectedText() { … }
void CFFL_FormField::ReplaceAndKeepSelection(const WideString& text) { … }
void CFFL_FormField::ReplaceSelection(const WideString& text) { … }
bool CFFL_FormField::SelectAllText() { … }
bool CFFL_FormField::CanUndo() { … }
bool CFFL_FormField::CanRedo() { … }
bool CFFL_FormField::Undo() { … }
bool CFFL_FormField::Redo() { … }
void CFFL_FormField::SetFocusForAnnot(CPDFSDK_Widget* pWidget,
Mask<FWL_EVENTFLAG> nFlag) { … }
void CFFL_FormField::KillFocusForAnnot(Mask<FWL_EVENTFLAG> nFlag) { … }
bool CFFL_FormField::IsValid() const { … }
CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() { … }
CPWL_Wnd* CFFL_FormField::GetPWLWindow(
const CPDFSDK_PageView* pPageView) const { … }
CPWL_Wnd* CFFL_FormField::CreateOrUpdatePWLWindow(
const CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::DestroyPWLWindow(const CPDFSDK_PageView* pPageView) { … }
CFX_Matrix CFFL_FormField::GetWindowMatrix(
const IPWL_FillerNotify::PerWindowData* pAttached) { … }
void CFFL_FormField::OnSetFocusForEdit(CPWL_Edit* pEdit) { … }
CFX_Matrix CFFL_FormField::GetCurMatrix() { … }
CFX_FloatRect CFFL_FormField::GetPDFAnnotRect() const { … }
CPDFSDK_PageView* CFFL_FormField::GetCurPageView() { … }
CFX_FloatRect CFFL_FormField::GetFocusBox(const CPDFSDK_PageView* pPageView) { … }
CFX_FloatRect CFFL_FormField::FFLtoPWL(const CFX_FloatRect& rect) { … }
CFX_FloatRect CFFL_FormField::PWLtoFFL(const CFX_FloatRect& rect) { … }
CFX_PointF CFFL_FormField::FFLtoPWL(const CFX_PointF& point) { … }
CFX_PointF CFFL_FormField::PWLtoFFL(const CFX_PointF& point) { … }
bool CFFL_FormField::CommitData(const CPDFSDK_PageView* pPageView,
Mask<FWL_EVENTFLAG> nFlag) { … }
bool CFFL_FormField::IsDataChanged(const CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::SaveData(const CPDFSDK_PageView* pPageView) { … }
#ifdef PDF_ENABLE_XFA
bool CFFL_FormField::IsFieldFull(const CPDFSDK_PageView* pPageView) { … }
#endif
void CFFL_FormField::SetChangeMark() { … }
void CFFL_FormField::GetActionData(const CPDFSDK_PageView* pPageView,
CPDF_AAction::AActionType type,
CFFL_FieldAction& fa) { … }
void CFFL_FormField::SetActionData(const CPDFSDK_PageView* pPageView,
CPDF_AAction::AActionType type,
const CFFL_FieldAction& fa) { … }
void CFFL_FormField::SavePWLWindowState(const CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::RecreatePWLWindowFromSavedState(
const CPDFSDK_PageView* pPageView) { … }
CFFL_PerWindowData* CFFL_FormField::GetPerPWLWindowData(
const CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::ResetPWLWindowForValueAge(
const CPDFSDK_PageView* pPageView,
CPDFSDK_Widget* pWidget,
uint32_t nValueAge) { … }
CPWL_Wnd* CFFL_FormField::ResetPWLWindowForValueAgeInternal(
const CPDFSDK_PageView* pPageView,
CPDFSDK_Widget* pWidget,
uint32_t nValueAge) { … }
CPWL_Wnd* CFFL_FormField::ResetPWLWindow(const CPDFSDK_PageView* pPageView) { … }
CPWL_Wnd* CFFL_FormField::RestorePWLWindow(const CPDFSDK_PageView* pPageView) { … }
void CFFL_FormField::OnTimerFired() { … }
void CFFL_FormField::EscapeFiller(CPDFSDK_PageView* pPageView,
bool bDestroyPWLWindow) { … }
void CFFL_FormField::InvalidateRect(const FX_RECT& rect) { … }