• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
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 _FXFA_FFNOTIFY_H_
8 #define _FXFA_FFNOTIFY_H_
9 class CXFA_FFNotify : public IXFA_Notify {
10  public:
11   CXFA_FFNotify(CXFA_FFDoc* pDoc);
12   ~CXFA_FFNotify();
13 
14   virtual void OnPageEvent(IXFA_LayoutPage* pSender,
15                            XFA_PAGEEVENT eEvent,
16                            void* pParam = NULL);
17 
18   virtual void OnNodeEvent(CXFA_Node* pSender,
19                            XFA_NODEEVENT eEvent,
20                            void* pParam = NULL,
21                            void* pParam2 = NULL,
22                            void* pParam3 = NULL,
23                            void* pParam4 = NULL);
24   virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender,
25                                  FX_DWORD dwEvent,
26                                  void* pParam = NULL,
27                                  void* pAdditional = NULL,
28                                  void* pAdditional2 = NULL);
29   virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode);
30   virtual void OnLayoutEvent(IXFA_DocLayout* pLayout,
31                              CXFA_LayoutItem* pSender,
32                              XFA_LAYOUTEVENT eEvent,
33                              void* pParam = NULL,
34                              void* pParam2 = NULL);
35 
36   virtual void StartFieldDrawLayout(CXFA_Node* pItem,
37                                     FX_FLOAT& fCalcWidth,
38                                     FX_FLOAT& fCalcHeight);
39   virtual FX_BOOL FindSplitPos(CXFA_Node* pItem,
40                                int32_t iBlockIndex,
41                                FX_FLOAT& fCalcHeightPos);
42   virtual FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);
43   virtual int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode,
44                                        XFA_EVENTTYPE eEventType,
45                                        FX_BOOL bIsFormReady = FALSE,
46                                        FX_BOOL bRecursive = TRUE,
47                                        CXFA_WidgetAcc* pExclude = NULL);
48   virtual void AddCalcValidate(CXFA_Node* pNode);
49   virtual IXFA_Doc* GetHDOC();
50   virtual IXFA_DocProvider* GetDocProvider();
51   virtual IXFA_AppProvider* GetAppProvider();
52   virtual IXFA_WidgetHandler* GetWidgetHandler();
53   virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem);
54   virtual void OpenDropDownList(IXFA_Widget* hWidget);
55   virtual CFX_WideString GetCurrentDateTime();
56   virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL);
57   virtual int32_t GetLayoutStatus();
58   virtual void RunNodeInitialize(CXFA_Node* pNode);
59   virtual void RunSubformIndexChange(CXFA_Node* pSubformNode);
60   virtual CXFA_Node* GetFocusWidgetNode();
61   virtual void SetFocusWidgetNode(CXFA_Node* pNode);
62 
63  protected:
64   void OnNodeReady(CXFA_Node* pNode);
65   void OnValueChanging(CXFA_Node* pSender, void* pParam, void* pParam2);
66   void OnValueChanged(CXFA_Node* pSender,
67                       void* pParam,
68                       void* pParam2,
69                       void* pParam3,
70                       void* pParam4);
71   void OnChildAdded(CXFA_Node* pSender, void* pParam, void* pParam2);
72   void OnChildRemoved(CXFA_Node* pSender, void* pParam, void* pParam2);
73   void OnLayoutItemAdd(CXFA_FFDocView* pDocView,
74                        IXFA_DocLayout* pLayout,
75                        CXFA_LayoutItem* pSender,
76                        void* pParam,
77                        void* pParam2);
78   void OnLayoutItemRemoving(CXFA_FFDocView* pDocView,
79                             IXFA_DocLayout* pLayout,
80                             CXFA_LayoutItem* pSender,
81                             void* pParam,
82                             void* pParam2);
83   void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView,
84                                IXFA_DocLayout* pLayout,
85                                CXFA_LayoutItem* pSender,
86                                void* pParam,
87                                void* pParam2);
88   void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView,
89                                   IXFA_DocLayout* pLayout,
90                                   CXFA_LayoutItem* pSender,
91                                   void* pParam,
92                                   void* pParam2);
93   CXFA_FFDoc* m_pDoc;
94 };
95 #endif
96