OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_APP_XFA_FFNOTIFY_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FFNOTIFY_H_ |
8 #define XFA_FXFA_APP_XFA_FFNOTIFY_H_ | 8 #define XFA_FXFA_APP_XFA_FFNOTIFY_H_ |
9 | 9 |
10 #include "xfa/fxfa/parser/xfa_document.h" | 10 #include "xfa/fxfa/parser/xfa_document.h" |
11 | 11 |
12 class CXFA_FFNotify : public IXFA_Notify { | 12 class CXFA_FFWidgetHandler; |
| 13 |
| 14 class CXFA_FFNotify { |
13 public: | 15 public: |
14 CXFA_FFNotify(CXFA_FFDoc* pDoc); | 16 CXFA_FFNotify(CXFA_FFDoc* pDoc); |
15 ~CXFA_FFNotify(); | 17 ~CXFA_FFNotify(); |
16 | 18 |
17 virtual void OnPageEvent(IXFA_LayoutPage* pSender, | 19 void OnPageEvent(CXFA_ContainerLayoutItem* pSender, |
18 XFA_PAGEEVENT eEvent, | 20 XFA_PAGEEVENT eEvent, |
19 void* pParam = NULL); | 21 void* pParam = NULL); |
20 | 22 |
21 virtual void OnNodeEvent(CXFA_Node* pSender, | 23 void OnNodeEvent(CXFA_Node* pSender, |
22 XFA_NODEEVENT eEvent, | 24 XFA_NODEEVENT eEvent, |
23 void* pParam = NULL, | 25 void* pParam = NULL, |
24 void* pParam2 = NULL, | 26 void* pParam2 = NULL, |
25 void* pParam3 = NULL, | 27 void* pParam3 = NULL, |
26 void* pParam4 = NULL); | 28 void* pParam4 = NULL); |
27 virtual void OnWidgetDataEvent(CXFA_WidgetData* pSender, | 29 void OnWidgetDataEvent(CXFA_WidgetData* pSender, |
28 uint32_t dwEvent, | 30 uint32_t dwEvent, |
29 void* pParam = NULL, | 31 void* pParam = NULL, |
30 void* pAdditional = NULL, | 32 void* pAdditional = NULL, |
31 void* pAdditional2 = NULL); | 33 void* pAdditional2 = NULL); |
32 virtual CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode); | 34 CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode); |
33 virtual void OnLayoutEvent(IXFA_DocLayout* pLayout, | 35 void OnLayoutEvent(CXFA_LayoutProcessor* pLayout, |
34 CXFA_LayoutItem* pSender, | 36 CXFA_LayoutItem* pSender, |
35 XFA_LAYOUTEVENT eEvent, | 37 XFA_LAYOUTEVENT eEvent, |
36 void* pParam = NULL, | 38 void* pParam = NULL, |
37 void* pParam2 = NULL); | 39 void* pParam2 = NULL); |
38 | 40 |
39 virtual void StartFieldDrawLayout(CXFA_Node* pItem, | 41 void StartFieldDrawLayout(CXFA_Node* pItem, |
40 FX_FLOAT& fCalcWidth, | 42 FX_FLOAT& fCalcWidth, |
41 FX_FLOAT& fCalcHeight); | 43 FX_FLOAT& fCalcHeight); |
42 virtual FX_BOOL FindSplitPos(CXFA_Node* pItem, | 44 FX_BOOL FindSplitPos(CXFA_Node* pItem, |
43 int32_t iBlockIndex, | 45 int32_t iBlockIndex, |
44 FX_FLOAT& fCalcHeightPos); | 46 FX_FLOAT& fCalcHeightPos); |
45 virtual FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem); | 47 FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem); |
46 virtual int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, | 48 int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, |
47 XFA_EVENTTYPE eEventType, | 49 XFA_EVENTTYPE eEventType, |
48 FX_BOOL bIsFormReady = FALSE, | 50 FX_BOOL bIsFormReady = FALSE, |
49 FX_BOOL bRecursive = TRUE, | 51 FX_BOOL bRecursive = TRUE, |
50 CXFA_WidgetAcc* pExclude = NULL); | 52 CXFA_WidgetAcc* pExclude = NULL); |
51 virtual void AddCalcValidate(CXFA_Node* pNode); | 53 void AddCalcValidate(CXFA_Node* pNode); |
52 virtual IXFA_Doc* GetHDOC(); | 54 CXFA_FFDoc* GetHDOC(); |
53 virtual IXFA_DocProvider* GetDocProvider(); | 55 IXFA_DocProvider* GetDocProvider(); |
54 virtual IXFA_AppProvider* GetAppProvider(); | 56 IXFA_AppProvider* GetAppProvider(); |
55 virtual IXFA_WidgetHandler* GetWidgetHandler(); | 57 CXFA_FFWidgetHandler* GetWidgetHandler(); |
56 virtual IXFA_Widget* GetHWidget(CXFA_LayoutItem* pLayoutItem); | 58 CXFA_FFWidget* GetHWidget(CXFA_LayoutItem* pLayoutItem); |
57 virtual void OpenDropDownList(IXFA_Widget* hWidget); | 59 void OpenDropDownList(CXFA_FFWidget* hWidget); |
58 virtual CFX_WideString GetCurrentDateTime(); | 60 CFX_WideString GetCurrentDateTime(); |
59 virtual void ResetData(CXFA_WidgetData* pWidgetData = NULL); | 61 void ResetData(CXFA_WidgetData* pWidgetData = NULL); |
60 virtual int32_t GetLayoutStatus(); | 62 int32_t GetLayoutStatus(); |
61 virtual void RunNodeInitialize(CXFA_Node* pNode); | 63 void RunNodeInitialize(CXFA_Node* pNode); |
62 virtual void RunSubformIndexChange(CXFA_Node* pSubformNode); | 64 void RunSubformIndexChange(CXFA_Node* pSubformNode); |
63 virtual CXFA_Node* GetFocusWidgetNode(); | 65 CXFA_Node* GetFocusWidgetNode(); |
64 virtual void SetFocusWidgetNode(CXFA_Node* pNode); | 66 void SetFocusWidgetNode(CXFA_Node* pNode); |
65 | 67 |
66 protected: | 68 protected: |
67 void OnNodeReady(CXFA_Node* pNode); | 69 void OnNodeReady(CXFA_Node* pNode); |
68 void OnValueChanging(CXFA_Node* pSender, void* pParam, void* pParam2); | 70 void OnValueChanging(CXFA_Node* pSender, void* pParam, void* pParam2); |
69 void OnValueChanged(CXFA_Node* pSender, | 71 void OnValueChanged(CXFA_Node* pSender, |
70 void* pParam, | 72 void* pParam, |
71 void* pParam2, | 73 void* pParam2, |
72 void* pParam3, | 74 void* pParam3, |
73 void* pParam4); | 75 void* pParam4); |
74 void OnChildAdded(CXFA_Node* pSender, void* pParam, void* pParam2); | 76 void OnChildAdded(CXFA_Node* pSender, void* pParam, void* pParam2); |
75 void OnChildRemoved(CXFA_Node* pSender, void* pParam, void* pParam2); | 77 void OnChildRemoved(CXFA_Node* pSender, void* pParam, void* pParam2); |
76 void OnLayoutItemAdd(CXFA_FFDocView* pDocView, | 78 void OnLayoutItemAdd(CXFA_FFDocView* pDocView, |
77 IXFA_DocLayout* pLayout, | 79 CXFA_LayoutProcessor* pLayout, |
78 CXFA_LayoutItem* pSender, | 80 CXFA_LayoutItem* pSender, |
79 void* pParam, | 81 void* pParam, |
80 void* pParam2); | 82 void* pParam2); |
81 void OnLayoutItemRemoving(CXFA_FFDocView* pDocView, | 83 void OnLayoutItemRemoving(CXFA_FFDocView* pDocView, |
82 IXFA_DocLayout* pLayout, | 84 CXFA_LayoutProcessor* pLayout, |
83 CXFA_LayoutItem* pSender, | 85 CXFA_LayoutItem* pSender, |
84 void* pParam, | 86 void* pParam, |
85 void* pParam2); | 87 void* pParam2); |
86 void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, | 88 void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, |
87 IXFA_DocLayout* pLayout, | 89 CXFA_LayoutProcessor* pLayout, |
88 CXFA_LayoutItem* pSender, | 90 CXFA_LayoutItem* pSender, |
89 void* pParam, | 91 void* pParam, |
90 void* pParam2); | 92 void* pParam2); |
91 void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, | 93 void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, |
92 IXFA_DocLayout* pLayout, | 94 CXFA_LayoutProcessor* pLayout, |
93 CXFA_LayoutItem* pSender, | 95 CXFA_LayoutItem* pSender, |
94 void* pParam, | 96 void* pParam, |
95 void* pParam2); | 97 void* pParam2); |
96 CXFA_FFDoc* m_pDoc; | 98 CXFA_FFDoc* m_pDoc; |
97 }; | 99 }; |
98 | 100 |
99 #endif // XFA_FXFA_APP_XFA_FFNOTIFY_H_ | 101 #endif // XFA_FXFA_APP_XFA_FFNOTIFY_H_ |
OLD | NEW |