Replace XFA_HDOC with IXFA_Doc*
[pdfium.git] / xfa / src / fxfa / src / app / xfa_ffnotify.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FXFA_FFNOTIFY_H_\r
8 #define _FXFA_FFNOTIFY_H_\r
9 class CXFA_FFNotify : public IXFA_Notify\r
10 {\r
11 public:\r
12     CXFA_FFNotify(CXFA_FFDoc* pDoc);\r
13     ~CXFA_FFNotify();\r
14 \r
15     virtual void                                OnPageEvent(IXFA_LayoutPage *pSender, XFA_PAGEEVENT eEvent, FX_LPVOID pParam = NULL);\r
16 \r
17     virtual void                                OnNodeEvent(CXFA_Node *pSender, XFA_NODEEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL, FX_LPVOID pParam3 = NULL, FX_LPVOID pParam4 = NULL);\r
18     virtual void                        OnWidgetDataEvent(CXFA_WidgetData* pSender, FX_DWORD dwEvent, FX_LPVOID pParam = NULL, FX_LPVOID pAdditional = NULL, FX_LPVOID pAdditional2 = NULL);\r
19     virtual CXFA_LayoutItem*    OnCreateLayoutItem(CXFA_Node *pNode);\r
20     virtual void                                OnLayoutEvent(IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, XFA_LAYOUTEVENT eEvent, FX_LPVOID pParam = NULL, FX_LPVOID pParam2 = NULL);\r
21 \r
22     virtual void                                StartFieldDrawLayout(CXFA_Node *pItem, FX_FLOAT &fCalcWidth, FX_FLOAT &fCalcHeight);\r
23     virtual FX_BOOL                             FindSplitPos(CXFA_Node *pItem, FX_INT32 iBlockIndex, FX_FLOAT &fCalcHeightPos);\r
24     virtual FX_BOOL                             RunScript(CXFA_Node* pScript, CXFA_Node* pFormItem);\r
25     virtual     FX_INT32                        ExecEventByDeepFirst(CXFA_Node* pFormNode, XFA_EVENTTYPE eEventType, FX_BOOL bIsFormReady = FALSE, FX_BOOL bRecursive = TRUE, CXFA_WidgetAcc    * pExclude = NULL);\r
26     virtual void                                AddCalcValidate(CXFA_Node* pNode);\r
27     virtual IXFA_Doc*                   GetHDOC();\r
28     virtual IXFA_DocProvider*   GetDocProvider();\r
29     virtual IXFA_AppProvider*   GetAppProvider();\r
30     virtual IXFA_WidgetHandler* GetWidgetHandler();\r
31     virtual XFA_HWIDGET                 GetHWidget(CXFA_LayoutItem* pLayoutItem);\r
32     virtual void                                OpenDropDownList(XFA_HWIDGET hWidget);\r
33     virtual CFX_WideString              GetCurrentDateTime();\r
34     virtual void                                ResetData(CXFA_WidgetData* pWidgetData = NULL);\r
35     virtual FX_INT32                    GetLayoutStatus();\r
36     virtual void                                RunNodeInitialize(CXFA_Node* pNode);\r
37     virtual void                                RunSubformIndexChange(CXFA_Node* pSubformNode);\r
38     virtual CXFA_Node*                  GetFocusWidgetNode();\r
39     virtual void                                SetFocusWidgetNode(CXFA_Node* pNode);\r
40 protected:\r
41     void        OnNodeReady(CXFA_Node *pNode);\r
42     void        OnValueChanging(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
43     void        OnValueChanged(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2, FX_LPVOID pParam3, FX_LPVOID pParam4);\r
44     void        OnChildAdded(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
45     void        OnChildRemoved(CXFA_Node *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
46     void        OnLayoutItemAdd(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
47     void        OnLayoutItemRemoving(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
48     void        OnLayoutItemRectChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
49     void        OnLayoutItemStatustChanged(CXFA_FFDocView* pDocView, IXFA_DocLayout *pLayout, CXFA_LayoutItem *pSender, FX_LPVOID pParam, FX_LPVOID pParam2);\r
50     CXFA_FFDoc*                 m_pDoc;\r
51 };\r
52 #endif\r