7#ifndef CORE_FPDFDOC_CPDF_FORMFIELD_H_
8#define CORE_FPDFDOC_CPDF_FORMFIELD_H_
16#include "core/fpdfdoc/cpdf_aaction.h"
17#include "core/fxcrt/fx_string.h"
18#include "core/fxcrt/retain_ptr.h"
19#include "core/fxcrt/unowned_ptr.h"
52constexpr size_t kFormFieldTypeCount = 16;
78 const CPDF_Dictionary* pFieldDict,
79 const ByteString& name);
81 CPDF_Dictionary* pFieldDict,
82 const ByteString& name);
123 int FindOption(
const WideString& csOptValue)
const;
143 WideString GetValue(
bool bDefault)
const;
144 bool SetValue(
const WideString& value,
147 void InitFieldFlags();
148 int FindListSel(CPDF_String* str);
149 WideString GetOptionText(
int index,
int sub_index)
const;
150 bool SetCheckValue(
const WideString& value,
153 void SetItemSelectionSelected(
int index,
const WideString& opt_value);
154 bool NotifyListOrComboBoxBeforeChange(
const WideString& value);
155 void NotifyListOrComboBoxAfterChange();
158 const ByteString& name)
const;
159 const CPDF_Dictionary* GetFieldDictInternal()
const;
170 const std::vector<UnownedPtr<CPDF_FormControl>>& GetControls()
const;
173 bool m_bRequired =
false;
174 bool m_bNoExport =
false;
175 bool m_bIsMultiSelectListBox =
false;
176 bool m_bIsUnison =
false;
177 bool m_bUseSelectedIndices =
false;
179 RetainPtr<CPDF_Dictionary>
const m_pDict;
constexpr CFX_FloatRect(float l, float b, float r, float t)
void Translate(float e, float f)
CPDF_Annot * GetAt(size_t index) const
bool Contains(const CPDF_Annot *pAnnot) const
void DisplayAnnots(CPDF_Page *pPage, CFX_RenderDevice *pDevice, CPDF_RenderContext *pContext, bool bPrinting, const CFX_Matrix &mtUser2Device, bool bShowWidget)
~CPDF_AnnotList() override
CPDF_AnnotList(CPDF_Page *pPage)
Subtype GetSubtype() const
const CPDF_Dictionary * GetAnnotDict() const
void SetPopupAnnot(CPDF_Annot *pAnnot)
bool KeyExist(const ByteString &key) const
ByteString GetByteStringFor(const ByteString &key) const
CFX_FloatRect GetRectFor(const ByteString &key) const
static void GenerateFormAP(CPDF_Document *pDoc, CPDF_Dictionary *pAnnotDict, FormType type)
float GetPageWidth() const override
bool operator==(const char *ptr) const
bool operator!=(const char *ptr) const