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 void OnWidgetListItemAdded(CXFA_WidgetData* pSender, |
24 XFA_NODEEVENT eEvent, | 22 const FX_WCHAR* pLabel, |
25 void* pParam = NULL, | 23 const FX_WCHAR* pValue, |
26 void* pParam2 = NULL, | 24 int32_t iIndex); |
27 void* pParam3 = NULL, | 25 void OnWidgetListItemRemoved(CXFA_WidgetData* pSender, int32_t iIndex); |
28 void* pParam4 = NULL); | 26 |
29 void OnWidgetDataEvent(CXFA_WidgetData* pSender, | 27 // Node events |
30 uint32_t dwEvent, | 28 void OnNodeReady(CXFA_Node* pNode); |
31 void* pParam = NULL, | 29 void OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr); |
32 void* pAdditional = NULL, | 30 void OnValueChanged(CXFA_Node* pSender, |
33 void* pAdditional2 = NULL); | 31 XFA_ATTRIBUTE eAttr, |
| 32 CXFA_Node* pParentNode, |
| 33 CXFA_Node* pWidgetNode); |
| 34 void OnChildAdded(CXFA_Node* pSender); |
| 35 void OnChildRemoved(); |
| 36 |
34 CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode); | 37 CXFA_LayoutItem* OnCreateLayoutItem(CXFA_Node* pNode); |
35 void OnLayoutEvent(CXFA_LayoutProcessor* pLayout, | 38 void OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout, |
36 CXFA_LayoutItem* pSender, | 39 CXFA_LayoutItem* pSender, |
37 XFA_LAYOUTEVENT eEvent, | 40 int32_t iPageIdx, |
38 void* pParam = NULL, | 41 uint32_t dwStatus); |
39 void* pParam2 = NULL); | 42 void OnLayoutItemRemoving(CXFA_LayoutProcessor* pLayout, |
| 43 CXFA_LayoutItem* pSender); |
40 | 44 |
41 void StartFieldDrawLayout(CXFA_Node* pItem, | 45 void StartFieldDrawLayout(CXFA_Node* pItem, |
42 FX_FLOAT& fCalcWidth, | 46 FX_FLOAT& fCalcWidth, |
43 FX_FLOAT& fCalcHeight); | 47 FX_FLOAT& fCalcHeight); |
44 FX_BOOL FindSplitPos(CXFA_Node* pItem, | 48 FX_BOOL FindSplitPos(CXFA_Node* pItem, |
45 int32_t iBlockIndex, | 49 int32_t iBlockIndex, |
46 FX_FLOAT& fCalcHeightPos); | 50 FX_FLOAT& fCalcHeightPos); |
47 FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem); | 51 FX_BOOL RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem); |
48 int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, | 52 int32_t ExecEventByDeepFirst(CXFA_Node* pFormNode, |
49 XFA_EVENTTYPE eEventType, | 53 XFA_EVENTTYPE eEventType, |
50 FX_BOOL bIsFormReady = FALSE, | 54 FX_BOOL bIsFormReady = FALSE, |
51 FX_BOOL bRecursive = TRUE, | 55 FX_BOOL bRecursive = TRUE, |
52 CXFA_WidgetAcc* pExclude = NULL); | 56 CXFA_WidgetAcc* pExclude = NULL); |
53 void AddCalcValidate(CXFA_Node* pNode); | 57 void AddCalcValidate(CXFA_Node* pNode); |
54 CXFA_FFDoc* GetHDOC(); | 58 CXFA_FFDoc* GetHDOC(); |
55 IXFA_DocProvider* GetDocProvider(); | 59 IXFA_DocProvider* GetDocProvider(); |
56 IXFA_AppProvider* GetAppProvider(); | 60 IXFA_AppProvider* GetAppProvider(); |
57 CXFA_FFWidgetHandler* GetWidgetHandler(); | 61 CXFA_FFWidgetHandler* GetWidgetHandler(); |
58 CXFA_FFWidget* GetHWidget(CXFA_LayoutItem* pLayoutItem); | 62 CXFA_FFWidget* GetHWidget(CXFA_LayoutItem* pLayoutItem); |
59 void OpenDropDownList(CXFA_FFWidget* hWidget); | 63 void OpenDropDownList(CXFA_FFWidget* hWidget); |
60 CFX_WideString GetCurrentDateTime(); | 64 CFX_WideString GetCurrentDateTime(); |
61 void ResetData(CXFA_WidgetData* pWidgetData = NULL); | 65 void ResetData(CXFA_WidgetData* pWidgetData = NULL); |
62 int32_t GetLayoutStatus(); | 66 int32_t GetLayoutStatus(); |
63 void RunNodeInitialize(CXFA_Node* pNode); | 67 void RunNodeInitialize(CXFA_Node* pNode); |
64 void RunSubformIndexChange(CXFA_Node* pSubformNode); | 68 void RunSubformIndexChange(CXFA_Node* pSubformNode); |
65 CXFA_Node* GetFocusWidgetNode(); | 69 CXFA_Node* GetFocusWidgetNode(); |
66 void SetFocusWidgetNode(CXFA_Node* pNode); | 70 void SetFocusWidgetNode(CXFA_Node* pNode); |
67 | 71 |
68 protected: | 72 protected: |
69 void OnNodeReady(CXFA_Node* pNode); | 73 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 }; | 74 }; |
100 | 75 |
101 #endif // XFA_FXFA_APP_XFA_FFNOTIFY_H_ | 76 #endif // XFA_FXFA_APP_XFA_FFNOTIFY_H_ |
OLD | NEW |