Remove rendundant ../include from paths of files in include/ directory
[pdfium.git] / fpdfsdk / include / formfiller / FFL_Notify.h
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 _FFL_NOTIFY_H_
8 #define _FFL_NOTIFY_H_
9
10 #include "../../../core/include/fpdfdoc/fpdf_doc.h"
11 #include "../../../core/include/fxcrt/fx_string.h"
12
13 class CFFL_FormFiller;
14 class CPDF_FormField;
15
16 class CFFL_Notify
17 {
18 public:
19         CFFL_Notify(CFFL_FormFiller * pFormFiller);     
20         virtual ~CFFL_Notify();
21
22 public:
23         FX_BOOL                                                                 OnSetFocus(FX_BOOL & bExit);
24         FX_BOOL                                                                 OnMouseEnter(FX_BOOL & bExit);
25         FX_BOOL                                                                 OnMouseDown(FX_BOOL & bExit);
26         FX_BOOL                                                                 OnMouseUp(FX_BOOL & bExit);     
27         FX_BOOL                                                                 OnMouseExit(FX_BOOL & bExit);   
28         FX_BOOL                                                                 OnKillFocus(FX_BOOL & bExit);
29
30         FX_BOOL                                                                 OnCalculate();
31         FX_BOOL                                                                 OnFormat(int iCommitKey);
32         FX_BOOL                                                                 OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange, 
33                                                                                            const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier,
34                                                                                            FX_BOOL bShift, FX_BOOL & bRC);
35         FX_BOOL                                                                 OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange, 
36                                                                                            const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier,
37                                                                                            FX_BOOL bShift, FX_BOOL bWillCommit, FX_BOOL bFieldFull, 
38                                                                                            int& nSelStart, int& nSelEnd, FX_BOOL& bRC);
39
40         void                                                                    BeforeNotify();
41         void                                                                    AfterNotify();
42         FX_BOOL                                                                 IsNotifying() const {return m_nNotifyFlag > 0;}
43
44 private:
45         FX_BOOL                                                                 DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL & bExit);
46         FX_BOOL                                                                 FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action);
47         FX_BOOL                                                                 FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action);
48         FX_BOOL                                                                 ExecuteActionTree(CPDF_AAction::AActionType eAAT, CPDF_Action & action, FX_BOOL& bExit);
49         FX_BOOL                                                                 ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit);
50
51         FX_BOOL                                                                 m_bDoActioning;
52         FX_INT32                                                                m_nNotifyFlag;
53 };
54
55 #endif
56