Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: fpdfsdk/cpdfsdk_interform.h

Issue 2624933002: Annotation deleted while retriveing it in JS (Closed)
Patch Set: rebase, another case. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/cpdfsdk_interform.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 FPDFSDK_CPDFSDK_INTERFORM_H_ 7 #ifndef FPDFSDK_CPDFSDK_INTERFORM_H_
8 #define FPDFSDK_CPDFSDK_INTERFORM_H_ 8 #define FPDFSDK_CPDFSDK_INTERFORM_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <vector> 12 #include <vector>
13 13
14 #include "core/fpdfdoc/cpdf_action.h" 14 #include "core/fpdfdoc/cpdf_action.h"
15 #include "core/fpdfdoc/ipdf_formnotify.h" 15 #include "core/fpdfdoc/ipdf_formnotify.h"
16 #include "core/fxcrt/fx_basic.h" 16 #include "core/fxcrt/fx_basic.h"
17 #include "core/fxge/fx_dib.h" 17 #include "core/fxge/fx_dib.h"
18 #include "fpdfsdk/cpdfsdk_widget.h"
18 19
19 class CPDF_Dictionary; 20 class CPDF_Dictionary;
20 class CPDF_FormControl; 21 class CPDF_FormControl;
21 class CPDF_FormField; 22 class CPDF_FormField;
22 class CPDF_InterForm; 23 class CPDF_InterForm;
23 class CPDF_Object; 24 class CPDF_Object;
24 class CPDFSDK_FormFillEnvironment; 25 class CPDFSDK_FormFillEnvironment;
25 class CPDFSDK_Widget;
26 26
27 #ifdef PDF_ENABLE_XFA 27 #ifdef PDF_ENABLE_XFA
28 class CPDFSDK_XFAWidget; 28 class CPDFSDK_XFAWidget;
29 class CXFA_FFWidget; 29 class CXFA_FFWidget;
30 #endif // PDF_ENABLE_XFA 30 #endif // PDF_ENABLE_XFA
31 31
32 class CPDFSDK_InterForm : public IPDF_FormNotify { 32 class CPDFSDK_InterForm : public IPDF_FormNotify {
33 public: 33 public:
34 explicit CPDFSDK_InterForm(CPDFSDK_FormFillEnvironment* pFormFillEnv); 34 explicit CPDFSDK_InterForm(CPDFSDK_FormFillEnvironment* pFormFillEnv);
35 ~CPDFSDK_InterForm() override; 35 ~CPDFSDK_InterForm() override;
36 36
37 CPDF_InterForm* GetInterForm() const { return m_pInterForm.get(); } 37 CPDF_InterForm* GetInterForm() const { return m_pInterForm.get(); }
38 CPDFSDK_FormFillEnvironment* GetFormFillEnv() const { return m_pFormFillEnv; } 38 CPDFSDK_FormFillEnvironment* GetFormFillEnv() const { return m_pFormFillEnv; }
39 39
40 bool HighlightWidgets(); 40 bool HighlightWidgets();
41 41
42 CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const; 42 CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const;
43 CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const; 43 CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const;
44 void GetWidgets(const CFX_WideString& sFieldName, 44 void GetWidgets(const CFX_WideString& sFieldName,
45 std::vector<CPDFSDK_Widget*>* widgets) const; 45 std::vector<CPDFSDK_Annot::ObservedPtr>* widgets) const;
46 void GetWidgets(CPDF_FormField* pField, 46 void GetWidgets(CPDF_FormField* pField,
47 std::vector<CPDFSDK_Widget*>* widgets) const; 47 std::vector<CPDFSDK_Annot::ObservedPtr>* widgets) const;
48 48
49 void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget); 49 void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget);
50 void RemoveMap(CPDF_FormControl* pControl); 50 void RemoveMap(CPDF_FormControl* pControl);
51 51
52 void EnableCalculate(bool bEnabled); 52 void EnableCalculate(bool bEnabled);
53 bool IsCalculateEnabled() const; 53 bool IsCalculateEnabled() const;
54 54
55 #ifdef PDF_ENABLE_XFA 55 #ifdef PDF_ENABLE_XFA
56 void AddXFAMap(CXFA_FFWidget* hWidget, CPDFSDK_XFAWidget* pWidget); 56 void AddXFAMap(CXFA_FFWidget* hWidget, CPDFSDK_XFAWidget* pWidget);
57 void RemoveXFAMap(CXFA_FFWidget* hWidget); 57 void RemoveXFAMap(CXFA_FFWidget* hWidget);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 #endif // PDF_ENABLE_XFA 134 #endif // PDF_ENABLE_XFA
135 bool m_bCalculate; 135 bool m_bCalculate;
136 bool m_bBusy; 136 bool m_bBusy;
137 137
138 FX_COLORREF m_aHighlightColor[kNumFieldTypes]; 138 FX_COLORREF m_aHighlightColor[kNumFieldTypes];
139 uint8_t m_iHighlightAlpha; 139 uint8_t m_iHighlightAlpha;
140 bool m_bNeedHightlight[kNumFieldTypes]; 140 bool m_bNeedHightlight[kNumFieldTypes];
141 }; 141 };
142 142
143 #endif // FPDFSDK_CPDFSDK_INTERFORM_H_ 143 #endif // FPDFSDK_CPDFSDK_INTERFORM_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/cpdfsdk_interform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698