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
cpdf_defaultappearance.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFDOC_CPDF_DEFAULTAPPEARANCE_H_
8#define CORE_FPDFDOC_CPDF_DEFAULTAPPEARANCE_H_
9
10#include "core/fxcrt/bytestring.h"
11#include "core/fxge/cfx_color.h"
12#include "third_party/abseil-cpp/absl/types/optional.h"
13
15
17 public:
19 explicit CPDF_DefaultAppearance(const ByteString& csDA);
22
23 absl::optional<ByteString> GetFont(float* fFontSize) const;
24
27
29 ByteStringView token,
30 int nParams);
31
32 private:
33 const ByteString m_csDA;
34};
35
36#endif // CORE_FPDFDOC_CPDF_DEFAULTAPPEARANCE_H_
constexpr CFX_FloatRect(float l, float b, float r, float t)
float Width() const
float Height() const
void Translate(float e, float f)
CPDF_Annot * GetAt(size_t index) const
size_t Count() 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
Definition cpdf_annot.h:83
void SetPopupAnnot(CPDF_Annot *pAnnot)
Definition cpdf_annot.h:103
CPDF_DefaultAppearance(const ByteString &csDA)
absl::optional< ByteString > GetFont(float *fFontSize) const
static bool FindTagParamFromStartForTesting(CPDF_SimpleParser *parser, ByteStringView token, int nParams)
absl::optional< CFX_Color > GetColor() const
CPDF_DefaultAppearance(const CPDF_DefaultAppearance &cDA)
absl::optional< CFX_Color::TypeAndARGB > GetColorARGB() const
bool KeyExist(const ByteString &key) const
ByteString GetByteStringFor(const ByteString &key) const
CFX_FloatRect GetRectFor(const ByteString &key) const
RetainPtr< const CPDF_Object > GetFieldAttr(const ByteString &name) const
int GetSelectedIndex(int index) const
bool IsSelectedIndex(int iOptIndex) const
bool UseSelectedIndicesObject() const
static WideString GetFullNameForDict(const CPDF_Dictionary *pFieldDict)
int CountOptions() const
int GetDefaultSelectedItem() const
bool IsSelectedOption(const WideString &wsOptValue) const
void SelectOption(int iOptIndex)
WideString GetMappingName() const
WideString GetValue() const
WideString GetFullName() const
static RetainPtr< const CPDF_Object > GetFieldAttrForDict(const CPDF_Dictionary *pFieldDict, const ByteString &name)
int CountControls() const
int FindOption(const WideString &csOptValue) const
uint32_t GetFieldFlags() const
bool IsRequired() const
WideString GetAlternateName() const
bool ClearSelection(NotificationOption notify)
int GetControlIndex(const CPDF_FormControl *pControl) const
int GetSelectedOptionIndex(int index) const
bool SetItemSelection(int index, NotificationOption notify)
int GetMaxLen() const
bool IsItemSelected(int index) const
static RetainPtr< CPDF_Object > GetMutableFieldAttrForDict(CPDF_Dictionary *pFieldDict, const ByteString &name)
WideString GetOptionLabel(int index) const
static absl::optional< FormFieldType > IntToFormFieldType(int value)
bool IsNoExport() const
int CountSelectedOptions() const
int CountSelectedItems() const
WideString GetCheckValue(bool bDefault) const
CPDF_FormControl * GetControl(int index) const
int GetTopVisibleIndex() const
Type GetType() const
FormFieldType GetFieldType() const
WideString GetOptionValue(int index) const
CPDF_AAction GetAdditionalAction() const
RetainPtr< const CPDF_Dictionary > GetFieldDict() const
WideString GetDefaultValue() const
CPDF_FormField(CPDF_InteractiveForm *pForm, RetainPtr< CPDF_Dictionary > pDict)
bool CheckControl(int iControlIndex, bool bChecked, NotificationOption notify)
void SetFieldFlags(uint32_t dwFlags)
bool SetValue(const WideString &value, NotificationOption notify)
static void GenerateFormAP(CPDF_Document *pDoc, CPDF_Dictionary *pAnnotDict, FormType type)
virtual bool BeforeSelectionChange(CPDF_FormField *pField, const WideString &csValue)=0
virtual void AfterCheckedStatusChange(CPDF_FormField *pField)=0
virtual bool BeforeValueChange(CPDF_FormField *pField, const WideString &csValue)=0
virtual void AfterValueChange(CPDF_FormField *pField)=0
virtual void AfterFormReset(CPDF_InteractiveForm *pForm)=0
virtual void AfterSelectionChange(CPDF_FormField *pField)=0
RetainPtr< CPDF_Font > GetFontForElement(RetainPtr< CPDF_Dictionary > pElement) const
CPDF_FormField * GetFieldInCalculationOrder(int index)
bool NotifyBeforeSelectionChange(CPDF_FormField *pField, const WideString &csValue)
bool NotifyBeforeValueChange(CPDF_FormField *pField, const WideString &csValue)
void SetNotifierIface(NotifierIface *pNotify)
static void SetUpdateAP(bool bUpdateAP)
bool CheckRequiredFields(const std::vector< CPDF_FormField * > *fields, bool bIncludeOrExclude) const
size_t CountFields(const WideString &csFieldName) const
std::unique_ptr< CFDF_Document > ExportToFDF(const WideString &pdf_path) const
const CPDF_FormControl * GetControlAtPoint(const CPDF_Page *pPage, const CFX_PointF &point, int *z_order) const
std::unique_ptr< CFDF_Document > ExportToFDF(const WideString &pdf_path, const std::vector< CPDF_FormField * > &fields, bool bIncludeOrExclude) const
void NotifyAfterSelectionChange(CPDF_FormField *pField)
CPDF_InteractiveForm(CPDF_Document *pDocument)
void NotifyAfterValueChange(CPDF_FormField *pField)
int FindFieldInCalculationOrder(const CPDF_FormField *pField)
CPDF_FormControl * GetControlByDict(const CPDF_Dictionary *pWidgetDict) const
void FixPageFields(CPDF_Page *pPage)
static RetainPtr< CPDF_Font > AddNativeInteractiveFormFont(CPDF_Document *pDocument, ByteString *csNameTag)
CPDF_FormField * GetField(size_t index, const WideString &csFieldName) const
const std::vector< UnownedPtr< CPDF_FormControl > > & GetControlsForField(const CPDF_FormField *pField)
CPDF_DefaultAppearance GetDefaultAppearance() const
CPDF_FormField * GetFieldByDict(const CPDF_Dictionary *pFieldDict) const
void ResetForm(pdfium::span< CPDF_FormField * > fields, bool bIncludeOrExclude)
RetainPtr< CPDF_Font > GetFormFont(ByteString csNameTag) const
void NotifyAfterCheckedStatusChange(CPDF_FormField *pField)
float GetPageWidth() const override
Definition cpdf_page.cpp:55
bool operator==(const char *ptr) const
bool operator!=(const char *ptr) const
Definition bytestring.h:130
NotificationOption
FormFieldType
constexpr size_t kFormFieldTypeCount
constexpr uint32_t kChoiceDoNotSpellCheck
Definition form_flags.h:40
constexpr uint32_t kReadOnly
Definition form_flags.h:13
constexpr uint32_t kChoiceEdit
Definition form_flags.h:37
constexpr uint32_t kButtonPushbutton
Definition form_flags.h:21
constexpr uint32_t kTextFileSelect
Definition form_flags.h:28
constexpr uint32_t kButtonRadiosInUnison
Definition form_flags.h:22
constexpr uint32_t kChoiceSort
Definition form_flags.h:38
constexpr uint32_t kChoiceCombo
Definition form_flags.h:36
constexpr uint32_t kTextPassword
Definition form_flags.h:27
constexpr uint32_t kTextDoNotSpellCheck
Definition form_flags.h:29
constexpr uint32_t kRequired
Definition form_flags.h:14
constexpr uint32_t kButtonNoToggleToOff
Definition form_flags.h:19
constexpr uint32_t kChoiceCommitOnSelChange
Definition form_flags.h:41
constexpr uint32_t kButtonRadio
Definition form_flags.h:20
constexpr uint32_t kChoiceMultiSelect
Definition form_flags.h:39
constexpr uint32_t kNoExport
Definition form_flags.h:15
constexpr uint32_t kTextDoNotScroll
Definition form_flags.h:30
constexpr uint32_t kTextRichText
Definition form_flags.h:32
constexpr uint32_t kTextComb
Definition form_flags.h:31
constexpr uint32_t kTextMultiline
Definition form_flags.h:26