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_FFWidgetHandler; | 12 class CXFA_FFWidgetHandler; |
13 | 13 |
14 class CXFA_FFNotify { | 14 class CXFA_FFNotify { |
15 public: | 15 public: |
16 CXFA_FFNotify(CXFA_FFDoc* pDoc); | 16 CXFA_FFNotify(CXFA_FFDoc* pDoc); |
17 ~CXFA_FFNotify(); | 17 ~CXFA_FFNotify(); |
18 | 18 |
19 void OnPageEvent(CXFA_ContainerLayoutItem* pSender, | 19 void OnPageEvent(CXFA_ContainerLayoutItem* pSender, uint32_t dwEvent); |
20 XFA_PAGEEVENT eEvent, | |
21 void* pParam = NULL); | |
22 | 20 |
23 void OnNodeEvent(CXFA_Node* pSender, | 21 // Node events |
24 XFA_NODEEVENT eEvent, | 22 void OnNodeReady(CXFA_Node* pNode); |
25 void* pParam = NULL, | 23 void OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr); |
26 void* pParam2 = NULL, | 24 void OnValueChanged(CXFA_Node* pSender, |
27 void* pParam3 = NULL, | 25 XFA_ATTRIBUTE eAttr, |
28 void* pParam4 = NULL); | 26 CXFA_Node* pParentNode, |
| 27 CXFA_Node* pWidgetNode); |
| 28 void OnChildAdded(CXFA_Node* pSender); |
| 29 void OnChildRemoved(); |
| 30 |
29 void OnWidgetDataEvent(CXFA_WidgetData* pSender, | 31 void OnWidgetDataEvent(CXFA_WidgetData* pSender, |
30 uint32_t dwEvent, | 32 uint32_t dwEvent, |
31 void* pParam = NULL, | 33 void* pParam = NULL, |
32 void* pAdditional = NULL, | 34 void* pAdditional = NULL, |
33 void* pAdditional2 = NULL); | 35 void* pAdditional2 = NULL); |
34 CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode); | 36 CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode); |
35 void OnLayoutEvent(CXFA_LayoutProcessor* pLayout, | 37 void OnLayoutItemAdd(CXFA_LayoutProcessor* pLayout, |
36 CXFA_LayoutItem* pSender, | 38 CXFA_LayoutItem* pSender, |
37 XFA_LAYOUTEVENT eEvent, | 39 int32_t iPageIdx, |
38 void* pParam = NULL, | 40 uint32_t dwStatus); |
39 void* pParam2 = NULL); | 41 void OnLayoutItemRemoving(CXFA_LayoutProcessor* pLayout, |
| 42 CXFA_LayoutItem* pSender); |
40 | 43 |
41 void StartFieldDrawLayout(CXFA_Node* pItem, | 44 void StartFieldDrawLayout(CXFA_Node* pItem, |
42 FX_FLOAT& fCalcWidth, | 45 FX_FLOAT& fCalcWidth, |
43 FX_FLOAT& fCalcHeight); | 46 FX_FLOAT& fCalcHeight); |
44 FX_BOOL FindSplitPos(CXFA_Node* pItem, | 47 FX_BOOL FindSplitPos(CXFA_Node* pItem, |
45 int32_t iBlockIndex, | 48 int32_t iBlockIndex, |
46 FX_FLOAT& fCalcHeightPos); | 49 FX_FLOAT& fCalcHeightPos); |
47 FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem); | 50 FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem); |
48 int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, | 51 int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, |
49 XFA_EVENTTYPE eEventType, | 52 XFA_EVENTTYPE eEventType, |
50 FX_BOOL bIsFormReady = FALSE, | 53 FX_BOOL bIsFormReady = FALSE, |
51 FX_BOOL bRecursive = TRUE, | 54 FX_BOOL bRecursive = TRUE, |
52 CXFA_WidgetAcc* pExclude = NULL); | 55 CXFA_WidgetAcc* pExclude = NULL); |
53 void AddCalcValidate(CXFA_Node* pNode); | 56 void AddCalcValidate(CXFA_Node* pNode); |
54 CXFA_FFDoc* GetHDOC(); | 57 CXFA_FFDoc* GetHDOC(); |
55 IXFA_DocProvider* GetDocProvider(); | 58 IXFA_DocProvider* GetDocProvider(); |
56 IXFA_AppProvider* GetAppProvider(); | 59 IXFA_AppProvider* GetAppProvider(); |
57 CXFA_FFWidgetHandler* GetWidgetHandler(); | 60 CXFA_FFWidgetHandler* GetWidgetHandler(); |
58 CXFA_FFWidget* GetHWidget(CXFA_LayoutItem* pLayoutItem); | 61 CXFA_FFWidget* GetHWidget(CXFA_LayoutItem* pLayoutItem); |
59 void OpenDropDownList(CXFA_FFWidget* hWidget); | 62 void OpenDropDownList(CXFA_FFWidget* hWidget); |
60 CFX_WideString GetCurrentDateTime(); | 63 CFX_WideString GetCurrentDateTime(); |
61 void ResetData(CXFA_WidgetData* pWidgetData = NULL); | 64 void ResetData(CXFA_WidgetData* pWidgetData = NULL); |
62 int32_t GetLayoutStatus(); | 65 int32_t GetLayoutStatus(); |
63 void RunNodeInitialize(CXFA_Node* pNode); | 66 void RunNodeInitialize(CXFA_Node* pNode); |
64 void RunSubformIndexChange(CXFA_Node* pSubformNode); | 67 void RunSubformIndexChange(CXFA_Node* pSubformNode); |
65 CXFA_Node* GetFocusWidgetNode(); | 68 CXFA_Node* GetFocusWidgetNode(); |
66 void SetFocusWidgetNode(CXFA_Node* pNode); | 69 void SetFocusWidgetNode(CXFA_Node* pNode); |
67 | 70 |
68 protected: | 71 protected: |
69 void OnNodeReady(CXFA_Node* pNode); | 72 CXFA_FFDoc* const m_pDoc; |
70 void OnValueChanging(CXFA_Node* pSender, void* pParam, void* pParam2); | |
71 void OnValueChanged(CXFA_Node* pSender, | |
72 void* pParam, | |
73 void* pParam2, | |
74 void* pParam3, | |
75 void* pParam4); | |
76 void OnChildAdded(CXFA_Node* pSender, void* pParam, void* pParam2); | |
77 void OnChildRemoved(CXFA_Node* pSender, void* pParam, void* pParam2); | |
78 void OnLayoutItemAdd(CXFA_FFDocView* pDocView, | |
79 CXFA_LayoutProcessor* pLayout, | |
80 CXFA_LayoutItem* pSender, | |
81 void* pParam, | |
82 void* pParam2); | |
83 void OnLayoutItemRemoving(CXFA_FFDocView* pDocView, | |
84 CXFA_LayoutProcessor* pLayout, | |
85 CXFA_LayoutItem* pSender, | |
86 void* pParam, | |
87 void* pParam2); | |
88 void OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, | |
89 CXFA_LayoutProcessor* pLayout, | |
90 CXFA_LayoutItem* pSender, | |
91 void* pParam, | |
92 void* pParam2); | |
93 void OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, | |
94 CXFA_LayoutProcessor* pLayout, | |
95 CXFA_LayoutItem* pSender, | |
96 void* pParam, | |
97 void* pParam2); | |
98 CXFA_FFDoc* m_pDoc; | |
99 }; | 73 }; |
100 | 74 |
101 #endif // XFA_FXFA_APP_XFA_FFNOTIFY_H_ | 75 #endif // XFA_FXFA_APP_XFA_FFNOTIFY_H_ |
OLD | NEW |