7#ifndef XFA_FXFA_CXFA_FFAPP_H_
8#define XFA_FXFA_CXFA_FFAPP_H_
10#include "core/fxcrt/unowned_ptr.h"
11#include "core/fxcrt/widestring.h"
12#include "fxjs/gc/heap.h"
13#include "v8/include/cppgc/garbage-collected.h"
14#include "v8/include/cppgc/member.h"
15#include "xfa/fwl/cfwl_app.h"
19class CXFA_FWLAdapterWidgetMgr;
24class CXFA_FFApp
final :
public cppgc::GarbageCollected<CXFA_FFApp>,
32
33
37
38
42
43
47
48
52
53
54
55
56 virtual void Beep(uint32_t dwType) = 0;
59
60
61
62
63
64
65
66
67 virtual int32_t
MsgBox(
const WideString& wsMessage,
68 const WideString& wsTitle,
70 uint32_t dwButtonType) = 0;
73
74
75
76
77
78
79
80
81 virtual WideString
Response(
const WideString& wsQuestion,
82 const WideString& wsTitle,
83 const WideString& wsDefaultAnswer,
87
88
89
90
92 const WideString& wsURL) = 0;
95
96
97
98
99
100
101
102
103
104
105
106
107
108
110 const WideString& wsData,
111 const WideString& wsContentType,
112 const WideString& wsEncode,
113 const WideString& wsHeader,
114 WideString& wsResponse) = 0;
117
118
119
120
121
122
123
125 const WideString& wsData,
126 const WideString& wsEncode) = 0;
136 void Trace(cppgc::Visitor* visitor)
const override;
152 cppgc::Member<CXFA_FontMgr> m_pXFAFontMgr;
153 cppgc::Member<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr;
154 cppgc::Member<CXFA_FWLTheme> m_pFWLTheme;
155 cppgc::Member<CFWL_App> m_pFWLApp;
void BC_Library_Destroy()
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
void SendPostSaveToXFADoc()
WideString GetAppName() override
bool SaveFormPackage(const RetainPtr< IFX_SeekableStream > &pStream)
CFX_Timer::HandlerIface * GetTimerHandler() const override
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
CPDFSDK_Annot * GetLastXFAAnnot(CPDFSDK_PageView *page_view) 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)
virtual WideString GetAppName()=0
virtual ~CallbackIface()=default
virtual WideString GetAppTitle() const =0
virtual WideString GetPlatform()=0
virtual void Beep(uint32_t dwType)=0
virtual int32_t MsgBox(const WideString &wsMessage, const WideString &wsTitle, uint32_t dwIconType, uint32_t dwButtonType)=0
virtual CFX_Timer::HandlerIface * GetTimerHandler() const =0
virtual bool PostRequestURL(const WideString &wsURL, const WideString &wsData, const WideString &wsContentType, const WideString &wsEncode, const WideString &wsHeader, WideString &wsResponse)=0
virtual bool PutRequestURL(const WideString &wsURL, const WideString &wsData, const WideString &wsEncode)=0
virtual RetainPtr< IFX_SeekableReadStream > DownloadURL(const WideString &wsURL)=0
virtual WideString Response(const WideString &wsQuestion, const WideString &wsTitle, const WideString &wsDefaultAnswer, bool bMask)=0
virtual WideString GetLanguage()=0
virtual cppgc::Heap * GetGCHeap() const =0
CallbackIface * GetAppProvider() const
void Trace(cppgc::Visitor *visitor) const override
bool LoadFWLTheme(CXFA_FFDoc *doc)
CFWL_WidgetMgr * GetFWLWidgetMgr() const
CFX_Timer::HandlerIface * GetTimerHandler() override
CFWL_App * GetFWLApp() const
CFWL_WidgetMgr::AdapterIface * GetWidgetMgrAdapter() override
IFWL_ThemeProvider * GetThemeProvider() override
CXFA_FontMgr * GetXFAFontMgr() const
cppgc::Heap * GetHeap() override
CXFA_FFWidgetHandler * GetWidgetHandler()
CXFA_FFDoc * GetDoc() const
CXFA_Node * GetRootSubform()
bool SavePackage(CXFA_Node *pNode, const RetainPtr< IFX_SeekableStream > &pFile)
CXFA_Document * GetXFADoc() const
CXFA_ReadyNodeIterator(CXFA_Node *pTravelRoot)
static void InitializeGlobals()
static void DestroyGlobals()
static WideString FromUTF16LE(pdfium::span< const uint8_t > data)
void CPDFXFA_ModuleInit()
void CPDFXFA_ModuleDestroy()
CXFA_Node * ToNode(CXFA_Object *pObj)
FXGCScopedHeap FXGC_CreateHeap()
void FXGC_Initialize(v8::Platform *platform, v8::Isolate *isolate)
void FXGC_ForceGarbageCollection(cppgc::Heap *heap)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
#define CONSTRUCT_VIA_MAKE_RETAIN
void operator()(cppgc::Heap *heap)