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
cpdfxfa_page.h
Go to the documentation of this file.
1// Copyright 2014 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 FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_
8#define FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_
9
10#include "core/fpdfapi/page/cpdf_page.h"
11#include "core/fpdfapi/page/ipdf_page.h"
12#include "core/fxcrt/fx_coordinates.h"
13#include "core/fxcrt/retain_ptr.h"
14#include "core/fxcrt/unowned_ptr.h"
15#include "third_party/abseil-cpp/absl/types/optional.h"
16
18class CPDF_Dictionary;
19class CPDF_Document;
20class CPDFSDK_Annot;
21class CPDFSDK_PageView;
22class CXFA_FFPageView;
23
24class CPDFXFA_Page final : public IPDF_Page {
25 public:
27
28 // IPDF_Page:
29 CPDF_Page* AsPDFPage() override;
30 CPDFXFA_Page* AsXFAPage() override;
31 CPDF_Document* GetDocument() const override;
32 float GetPageWidth() const override;
33 float GetPageHeight() const override;
34 CFX_Matrix GetDisplayMatrix(const FX_RECT& rect, int iRotate) const override;
36 const FX_RECT& rect,
37 int rotate,
38 const CFX_PointF& device_point) const override;
40 const FX_RECT& rect,
41 int rotate,
42 const CFX_PointF& page_point) const override;
43
44 bool LoadPage();
45 void LoadPDFPageFromDict(RetainPtr<CPDF_Dictionary> pPageDict);
46 int GetPageIndex() const { return m_iPageIndex; }
47 void SetXFAPageViewIndex(int index) { m_iPageIndex = index; }
48 CXFA_FFPageView* GetXFAPageView() const;
51 CPDFSDK_Annot* GetFirstXFAAnnot(CPDFSDK_PageView* page_view) const;
52 CPDFSDK_Annot* GetLastXFAAnnot(CPDFSDK_PageView* page_view) const;
53 int HasFormFieldAtPoint(const CFX_PointF& point) const;
54 void DrawFocusAnnot(CFX_RenderDevice* pDevice,
55 CPDFSDK_Annot* pAnnot,
56 const CFX_Matrix& mtUser2Device,
57 const FX_RECT& rtClip);
58
59 private:
60 // Refcounted class.
61 CPDFXFA_Page(CPDF_Document* pDocument, int page_index);
62 ~CPDFXFA_Page() override;
63
64 bool LoadPDFPage();
65
66 RetainPtr<CPDF_Page> m_pPDFPage; // Backing page, if any.
67 UnownedPtr<CPDF_Document> const m_pDocument;
68 int m_iPageIndex;
69};
70
71#endif // FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_
void BC_Library_Init()
void BC_Library_Destroy()
static void Destroy()
static void Create()
WideString GetPlatform() override
RetainPtr< IFX_SeekableReadStream > DownloadURL(const WideString &wsURL) override
bool PostRequestURL(const WideString &wsURL, const WideString &wsData, const WideString &wsContentType, const WideString &wsEncode, const WideString &wsHeader, WideString &wsResponse) override
RetainPtr< CPDFXFA_Page > GetXFAPage(CXFA_FFPageView *pPage) const
void SetOriginalPageCount(int count)
FormType GetFormType() const
WideString GetAppTitle() const override
WideString Response(const WideString &wsQuestion, const WideString &wsTitle, const WideString &wsDefaultAnswer, bool bMark) override
bool SaveDatasetsPackage(const RetainPtr< IFX_SeekableStream > &pStream)
~CPDFXFA_Context() override
void SetFormFillEnv(CPDFSDK_FormFillEnvironment *pFormFillEnv)
bool PutRequestURL(const WideString &wsURL, const WideString &wsData, const WideString &wsEncode) override
void SendPreSaveToXFADoc(std::vector< RetainPtr< IFX_SeekableStream > > *fileList)
CPDFSDK_FormFillEnvironment * GetFormFillEnv() const
CXFA_FFDocView * GetXFADocView() const
WideString GetAppName() override
bool SaveFormPackage(const RetainPtr< IFX_SeekableStream > &pStream)
CFX_Timer::HandlerIface * GetTimerHandler() const override
CXFA_FFDoc * GetXFADoc()
void Beep(uint32_t dwType) override
bool ContainsExtensionForegroundForm() const override
CPDFXFA_Context(CPDF_Document *pPDFDoc)
RetainPtr< CPDFXFA_Page > GetOrCreateXFAPage(int page_index)
bool ContainsExtensionForm() const override
int GetOriginalPageCount() const
WideString GetLanguage() override
RetainPtr< CPDFXFA_Page > GetXFAPage(int page_index)
void DeletePage(int page_index) override
LoadStatus GetLoadStatus() const
bool ContainsExtensionFullForm() const override
int GetPageCount() const override
cppgc::Heap * GetGCHeap() const override
CFX_XMLDocument * GetXMLDoc()
int32_t MsgBox(const WideString &wsMessage, const WideString &wsTitle, uint32_t dwIconType, uint32_t dwButtonType) override
CPDF_Document * GetPDFDoc() const
absl::optional< CFX_PointF > PageToDevice(const FX_RECT &rect, int rotate, const CFX_PointF &page_point) const override
CXFA_FFPageView * GetXFAPageView() const
CPDF_Document * GetDocument() const override
CFX_Matrix GetDisplayMatrix(const FX_RECT &rect, int iRotate) const override
CPDFXFA_Page * AsXFAPage() override
CPDF_Page * AsPDFPage() override
float GetPageWidth() const override
~CPDFXFA_Page() override
CPDFSDK_Annot * GetLastXFAAnnot(CPDFSDK_PageView *page_view) const
int GetPageIndex() const
void SetXFAPageViewIndex(int index)
CPDFSDK_Annot * GetPrevXFAAnnot(CPDFSDK_Annot *pSDKAnnot) const
CPDFSDK_Annot * GetFirstXFAAnnot(CPDFSDK_PageView *page_view) const
CPDFSDK_Annot * GetNextXFAAnnot(CPDFSDK_Annot *pSDKAnnot) const
absl::optional< CFX_PointF > DeviceToPage(const FX_RECT &rect, int rotate, const CFX_PointF &device_point) const override
void DrawFocusAnnot(CFX_RenderDevice *pDevice, CPDFSDK_Annot *pAnnot, const CFX_Matrix &mtUser2Device, const FX_RECT &rtClip)
int HasFormFieldAtPoint(const CFX_PointF &point) const
float GetPageHeight() const override
void LoadPDFPageFromDict(RetainPtr< CPDF_Dictionary > pPageDict)
const CPDF_Dictionary * GetRoot() const
CXFA_Object * GetXFAObject(XFA_HashCode wsNodeNameHash)
CXFA_EventParam(XFA_EVENTTYPE type)
CXFA_FFWidgetHandler * GetWidgetHandler()
CXFA_FFDoc * GetDoc() const
CXFA_Node * GetRootSubform()
bool SavePackage(CXFA_Node *pNode, const RetainPtr< IFX_SeekableStream > &pFile)
CXFA_Document * GetXFADoc() const
Definition cxfa_ffdoc.h:167
XFA_EventError ProcessEvent(CXFA_Node *pNode, CXFA_EventParam *pParam)
CXFA_ReadyNodeIterator(CXFA_Node *pTravelRoot)
static WideString FromUTF16LE(pdfium::span< const uint8_t > data)
void CPDFXFA_ModuleInit()
void CPDFXFA_ModuleDestroy()
@ XFA_EVENT_PostSave
@ XFA_EVENT_PreSave
CXFA_Node * ToNode(CXFA_Object *pObj)
#define JSPLATFORM_ALERT_BUTTON_DEFAULT
#define JSPLATFORM_ALERT_ICON_ASTERISK
#define JSPLATFORM_ALERT_BUTTON_OKCANCEL
#define JSPLATFORM_ALERT_ICON_ERROR
#define JSPLATFORM_ALERT_BUTTON_YESNO
#define JSPLATFORM_ALERT_ICON_DEFAULT
#define JSPLATFORM_ALERT_ICON_WARNING
#define JSPLATFORM_ALERT_BUTTON_OK
#define JSPLATFORM_ALERT_ICON_QUESTION
#define JSPLATFORM_ALERT_ICON_STATUS
#define JSPLATFORM_ALERT_BUTTON_YESNOCANCEL
FormType
Definition fxfa.h:38
@ kXFAForeground
XFA_HashCode
Definition fxfa_basic.h:12
@ XFA_HASHCODE_Datasets
Definition fxfa_basic.h:19
@ XFA_HASHCODE_Form
Definition fxfa_basic.h:22
Definition heap.h:12
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224