Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPDFSDK_InteractiveForm Class Referencefinal

#include <cpdfsdk_interactiveform.h>

Inheritance diagram for CPDFSDK_InteractiveForm:
Collaboration diagram for CPDFSDK_InteractiveForm:

Public Member Functions

 CPDFSDK_InteractiveForm (CPDFSDK_FormFillEnvironment *pFormFillEnv)
 ~CPDFSDK_InteractiveForm () override
CPDF_InteractiveFormGetInteractiveForm () const
CPDFSDK_WidgetGetWidget (CPDF_FormControl *pControl) const
void GetWidgets (const WideString &sFieldName, std::vector< ObservedPtr< CPDFSDK_Widget > > *widgets) const
void GetWidgets (CPDF_FormField *pField, std::vector< ObservedPtr< CPDFSDK_Widget > > *widgets) const
void AddMap (CPDF_FormControl *pControl, CPDFSDK_Widget *pWidget)
void RemoveMap (CPDF_FormControl *pControl)
void EnableCalculate (bool bEnabled)
bool IsCalculateEnabled () const
bool OnKeyStrokeCommit (CPDF_FormField *pFormField, const WideString &csValue)
bool OnValidate (CPDF_FormField *pFormField, const WideString &csValue)
void OnCalculate (CPDF_FormField *pFormField)
std::optional< WideStringOnFormat (CPDF_FormField *pFormField)
void ResetFieldAppearance (CPDF_FormField *pFormField, std::optional< WideString > sValue)
void UpdateField (CPDF_FormField *pFormField)
bool DoAction_Hide (const CPDF_Action &action)
bool DoAction_SubmitForm (const CPDF_Action &action)
void DoAction_ResetForm (const CPDF_Action &action)
std::vector< CPDF_FormField * > GetFieldFromObjects (const std::vector< RetainPtr< const CPDF_Object > > &objects) const
bool SubmitFields (const WideString &csDestination, const std::vector< CPDF_FormField * > &fields, bool bIncludeOrExclude, bool bUrlEncoded)
bool SubmitForm (const WideString &sDestination)
ByteString ExportFormToFDFTextBuf ()
ByteString ExportFieldsToFDFTextBuf (const std::vector< CPDF_FormField * > &fields, bool bIncludeOrExclude)
bool IsNeedHighLight (FormFieldType fieldType) const
void RemoveAllHighLights ()
void SetHighlightAlpha (uint8_t alpha)
uint8_t GetHighlightAlpha ()
void SetHighlightColor (FX_COLORREF clr, FormFieldType fieldType)
void SetAllHighlightColors (FX_COLORREF clr)
FX_COLORREF GetHighlightColor (FormFieldType fieldType)
Public Member Functions inherited from CPDF_InteractiveForm::NotifierIface
virtual ~NotifierIface ()=default

Private Member Functions

bool BeforeValueChange (CPDF_FormField *pField, const WideString &csValue) override
void AfterValueChange (CPDF_FormField *pField) override
bool BeforeSelectionChange (CPDF_FormField *pField, const WideString &csValue) override
void AfterSelectionChange (CPDF_FormField *pField) override
void AfterCheckedStatusChange (CPDF_FormField *pField) override
void AfterFormReset (CPDF_InteractiveForm *pForm) override

Detailed Description

Definition at line 29 of file cpdfsdk_interactiveform.h.

Constructor & Destructor Documentation

◆ CPDFSDK_InteractiveForm()

CPDFSDK_InteractiveForm::CPDFSDK_InteractiveForm ( CPDFSDK_FormFillEnvironment * pFormFillEnv)
explicit

Definition at line 109 of file cpdfsdk_interactiveform.cpp.

References CPDFSDK_InteractiveForm(), and RemoveAllHighLights().

Referenced by CPDFSDK_InteractiveForm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CPDFSDK_InteractiveForm()

CPDFSDK_InteractiveForm::~CPDFSDK_InteractiveForm ( )
overridedefault

Member Function Documentation

◆ AddMap()

void CPDFSDK_InteractiveForm::AddMap ( CPDF_FormControl * pControl,
CPDFSDK_Widget * pWidget )

Definition at line 198 of file cpdfsdk_interactiveform.cpp.

◆ AfterCheckedStatusChange()

void CPDFSDK_InteractiveForm::AfterCheckedStatusChange ( CPDF_FormField * pField)
overrideprivatevirtual

Implements CPDF_InteractiveForm::NotifierIface.

Definition at line 561 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::GetFieldType(), kCheckBox, kRadioButton, OnCalculate(), and UpdateField().

Here is the call graph for this function:

◆ AfterFormReset()

void CPDFSDK_InteractiveForm::AfterFormReset ( CPDF_InteractiveForm * pForm)
overrideprivatevirtual

Implements CPDF_InteractiveForm::NotifierIface.

Definition at line 571 of file cpdfsdk_interactiveform.cpp.

References OnCalculate().

Here is the call graph for this function:

◆ AfterSelectionChange()

void CPDFSDK_InteractiveForm::AfterSelectionChange ( CPDF_FormField * pField)
overrideprivatevirtual

Implements CPDF_InteractiveForm::NotifierIface.

Definition at line 552 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::GetFieldType(), kListBox, OnCalculate(), ResetFieldAppearance(), and UpdateField().

Here is the call graph for this function:

◆ AfterValueChange()

void CPDFSDK_InteractiveForm::AfterValueChange ( CPDF_FormField * pField)
overrideprivatevirtual

Implements CPDF_InteractiveForm::NotifierIface.

Definition at line 529 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::GetFieldType(), OnCalculate(), and UpdateField().

Here is the call graph for this function:

◆ BeforeSelectionChange()

bool CPDFSDK_InteractiveForm::BeforeSelectionChange ( CPDF_FormField * pField,
const WideString & csValue )
overrideprivatevirtual

Implements CPDF_InteractiveForm::NotifierIface.

Definition at line 543 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::GetFieldType(), kListBox, OnKeyStrokeCommit(), and OnValidate().

Here is the call graph for this function:

◆ BeforeValueChange()

bool CPDFSDK_InteractiveForm::BeforeValueChange ( CPDF_FormField * pField,
const WideString & csValue )
overrideprivatevirtual

Implements CPDF_InteractiveForm::NotifierIface.

Definition at line 519 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::GetFieldType(), OnKeyStrokeCommit(), and OnValidate().

Here is the call graph for this function:

◆ DoAction_Hide()

bool CPDFSDK_InteractiveForm::DoAction_Hide ( const CPDF_Action & action)

Definition at line 387 of file cpdfsdk_interactiveform.cpp.

References CPDF_Action::GetHideStatus().

Referenced by CPDFSDK_FormFillEnvironment::DoActionHide().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoAction_ResetForm()

void CPDFSDK_InteractiveForm::DoAction_ResetForm ( const CPDF_Action & action)

Definition at line 492 of file cpdfsdk_interactiveform.cpp.

References CPDF_Action::GetFlags(), and CPDF_Action::HasFields().

Referenced by CPDFSDK_FormFillEnvironment::DoActionResetForm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoAction_SubmitForm()

bool CPDFSDK_InteractiveForm::DoAction_SubmitForm ( const CPDF_Action & action)

Definition at line 417 of file cpdfsdk_interactiveform.cpp.

References CPDF_Action::GetFilePath(), CPDF_Action::GetFlags(), CPDF_Action::HasFields(), and SubmitForm().

Referenced by CPDFSDK_FormFillEnvironment::DoActionSubmitForm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnableCalculate()

void CPDFSDK_InteractiveForm::EnableCalculate ( bool bEnabled)

Definition at line 209 of file cpdfsdk_interactiveform.cpp.

◆ ExportFieldsToFDFTextBuf()

ByteString CPDFSDK_InteractiveForm::ExportFieldsToFDFTextBuf ( const std::vector< CPDF_FormField * > & fields,
bool bIncludeOrExclude )

Definition at line 459 of file cpdfsdk_interactiveform.cpp.

References fxcrt::ByteString::ByteString().

Here is the call graph for this function:

◆ ExportFormToFDFTextBuf()

ByteString CPDFSDK_InteractiveForm::ExportFormToFDFTextBuf ( )

Definition at line 485 of file cpdfsdk_interactiveform.cpp.

References fxcrt::ByteString::ByteString().

Here is the call graph for this function:

◆ GetFieldFromObjects()

std::vector< CPDF_FormField * > CPDFSDK_InteractiveForm::GetFieldFromObjects ( const std::vector< RetainPtr< const CPDF_Object > > & objects) const

Definition at line 504 of file cpdfsdk_interactiveform.cpp.

◆ GetHighlightAlpha()

uint8_t CPDFSDK_InteractiveForm::GetHighlightAlpha ( )
inline

Definition at line 87 of file cpdfsdk_interactiveform.h.

◆ GetHighlightColor()

FX_COLORREF CPDFSDK_InteractiveForm::GetHighlightColor ( FormFieldType fieldType)

Definition at line 612 of file cpdfsdk_interactiveform.cpp.

References kUnknown.

◆ GetInteractiveForm()

CPDF_InteractiveForm * CPDFSDK_InteractiveForm::GetInteractiveForm ( ) const
inline

Definition at line 35 of file cpdfsdk_interactiveform.h.

Referenced by CPDFSDK_PageView::CPDFSDK_PageView(), CJS_PublicMethods::AFSimple_Calculate(), CJS_Field::AttachField(), FPDFAnnot_GetFormControlIndex(), FPDFAnnot_GetFormFieldAtPoint(), FPDFPage_FormFieldZOrderAtPoint(), and FPDFPage_HasFormFieldAtPoint().

Here is the caller graph for this function:

◆ GetWidget()

CPDFSDK_Widget * CPDFSDK_InteractiveForm::GetWidget ( CPDF_FormControl * pControl) const

Definition at line 120 of file cpdfsdk_interactiveform.cpp.

References CPDFSDK_PageView::GetAnnotByDict(), and CPDF_Document::GetPageIndex().

Referenced by GetWidgets(), ResetFieldAppearance(), and UpdateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWidgets() [1/2]

void CPDFSDK_InteractiveForm::GetWidgets ( const WideString & sFieldName,
std::vector< ObservedPtr< CPDFSDK_Widget > > * widgets ) const

Definition at line 151 of file cpdfsdk_interactiveform.cpp.

◆ GetWidgets() [2/2]

void CPDFSDK_InteractiveForm::GetWidgets ( CPDF_FormField * pField,
std::vector< ObservedPtr< CPDFSDK_Widget > > * widgets ) const

Definition at line 162 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::CountControls(), CPDF_FormField::GetControl(), and GetWidget().

Here is the call graph for this function:

◆ IsCalculateEnabled()

bool CPDFSDK_InteractiveForm::IsCalculateEnabled ( ) const

Definition at line 213 of file cpdfsdk_interactiveform.cpp.

Referenced by OnCalculate().

Here is the caller graph for this function:

◆ IsNeedHighLight()

bool CPDFSDK_InteractiveForm::IsNeedHighLight ( FormFieldType fieldType) const

Definition at line 575 of file cpdfsdk_interactiveform.cpp.

References kUnknown.

◆ OnCalculate()

void CPDFSDK_InteractiveForm::OnCalculate ( CPDF_FormField * pFormField)

Definition at line 242 of file cpdfsdk_interactiveform.cpp.

References IJS_Runtime::ScopedEventContext::ScopedEventContext(), CPDF_AAction::ActionExist(), CPDF_AAction::GetAction(), CPDF_FormField::GetAdditionalAction(), CPDF_FormField::GetFieldType(), CPDF_Action::GetJavaScript(), CPDF_FormField::GetValue(), CPDF_Action::HasDict(), IsCalculateEnabled(), CPDF_AAction::kCalculate, kNotify, IJS_EventContext::OnField_Calculate(), fxcrt::WideString::operator!=(), IJS_Runtime::ScopedEventContext::operator->(), and CPDF_FormField::SetValue().

Referenced by AfterCheckedStatusChange(), AfterFormReset(), AfterSelectionChange(), and AfterValueChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnFormat()

◆ OnKeyStrokeCommit()

bool CPDFSDK_InteractiveForm::OnKeyStrokeCommit ( CPDF_FormField * pFormField,
const WideString & csValue )

Definition at line 349 of file cpdfsdk_interactiveform.cpp.

References CPDF_AAction::ActionExist(), CFFL_FieldAction::bModifier, CFFL_FieldAction::bRC, CFFL_FieldAction::bShift, CPDF_AAction::GetAction(), CPDF_FormField::GetAdditionalAction(), CPDF_Action::HasDict(), and CPDF_AAction::kKeyStroke.

Referenced by BeforeSelectionChange(), and BeforeValueChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnValidate()

bool CPDFSDK_InteractiveForm::OnValidate ( CPDF_FormField * pFormField,
const WideString & csValue )

Definition at line 368 of file cpdfsdk_interactiveform.cpp.

References CPDF_AAction::ActionExist(), CFFL_FieldAction::bModifier, CFFL_FieldAction::bRC, CFFL_FieldAction::bShift, CPDF_AAction::GetAction(), CPDF_FormField::GetAdditionalAction(), CPDF_Action::HasDict(), and CPDF_AAction::kValidate.

Referenced by BeforeSelectionChange(), and BeforeValueChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveAllHighLights()

void CPDFSDK_InteractiveForm::RemoveAllHighLights ( )

Definition at line 590 of file cpdfsdk_interactiveform.cpp.

Referenced by CPDFSDK_InteractiveForm(), and FPDF_RemoveFormFieldHighlight().

Here is the caller graph for this function:

◆ RemoveMap()

void CPDFSDK_InteractiveForm::RemoveMap ( CPDF_FormControl * pControl)

Definition at line 203 of file cpdfsdk_interactiveform.cpp.

◆ ResetFieldAppearance()

void CPDFSDK_InteractiveForm::ResetFieldAppearance ( CPDF_FormField * pFormField,
std::optional< WideString > sValue )

Definition at line 321 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::CountControls(), CPDF_FormField::GetControl(), GetWidget(), CPDFSDK_Widget::kValueChanged, and CPDFSDK_Widget::ResetAppearance().

Referenced by AfterSelectionChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAllHighlightColors()

void CPDFSDK_InteractiveForm::SetAllHighlightColors ( FX_COLORREF clr)

Definition at line 605 of file cpdfsdk_interactiveform.cpp.

Referenced by FPDF_SetFormFieldHighlightColor().

Here is the caller graph for this function:

◆ SetHighlightAlpha()

void CPDFSDK_InteractiveForm::SetHighlightAlpha ( uint8_t alpha)
inline

Definition at line 86 of file cpdfsdk_interactiveform.h.

Referenced by FPDF_SetFormFieldHighlightAlpha().

Here is the caller graph for this function:

◆ SetHighlightColor()

void CPDFSDK_InteractiveForm::SetHighlightColor ( FX_COLORREF clr,
FormFieldType fieldType )

Definition at line 596 of file cpdfsdk_interactiveform.cpp.

References kUnknown.

Referenced by FPDF_SetFormFieldHighlightColor().

Here is the caller graph for this function:

◆ SubmitFields()

bool CPDFSDK_InteractiveForm::SubmitFields ( const WideString & csDestination,
const std::vector< CPDF_FormField * > & fields,
bool bIncludeOrExclude,
bool bUrlEncoded )

Definition at line 440 of file cpdfsdk_interactiveform.cpp.

References fxcrt::ByteString::operator=().

Here is the call graph for this function:

◆ SubmitForm()

bool CPDFSDK_InteractiveForm::SubmitForm ( const WideString & sDestination)

Definition at line 468 of file cpdfsdk_interactiveform.cpp.

Referenced by DoAction_SubmitForm().

Here is the caller graph for this function:

◆ UpdateField()

void CPDFSDK_InteractiveForm::UpdateField ( CPDF_FormField * pFormField)

Definition at line 332 of file cpdfsdk_interactiveform.cpp.

References CPDF_FormField::CountControls(), CPDF_FormField::GetControl(), CPDFSDK_Annot::GetPage(), and GetWidget().

Referenced by AfterCheckedStatusChange(), AfterSelectionChange(), and AfterValueChange().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: