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

Side by Side Diff: fpdfsdk/include/fsdk_baseannot.h

Issue 1484843002: Tidy ifdefs in fpdfsdk. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix initialization error warning. Created 5 years 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 | « fpdfsdk/include/fsdk_annothandler.h ('k') | fpdfsdk/include/fsdk_baseform.h » ('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 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 FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
8 #define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 8 #define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
9 9
10 #if _FX_OS_ == _FX_ANDROID_ 10 #if _FX_OS_ == _FX_ANDROID_
11 #include "time.h" 11 #include "time.h"
12 #else 12 #else
13 #include <ctime> 13 #include <ctime>
14 #endif 14 #endif
15 15
16 #include "core/include/fpdfdoc/fpdf_doc.h" 16 #include "core/include/fpdfdoc/fpdf_doc.h"
17 #include "core/include/fxcrt/fx_basic.h" 17 #include "core/include/fxcrt/fx_basic.h"
18 #include "fpdfsdk/include/fsdk_define.h" 18 #include "fpdfsdk/include/fsdk_define.h"
19 #ifndef PDF_ENABLE_XFA
20 #include "fx_systemhandler.h"
21 #else
22 #include "fpdfsdk/include/fx_systemhandler.h" 19 #include "fpdfsdk/include/fx_systemhandler.h"
23 #endif
24 20
25 class CPDFSDK_PageView; 21 class CPDFSDK_PageView;
26 class CPDF_Annot; 22 class CPDF_Annot;
27 class CPDF_Page; 23 class CPDF_Page;
28 class CPDF_Rect; 24 class CPDF_Rect;
29 class CPDF_Matrix; 25 class CPDF_Matrix;
30 class CPDF_RenderOptions; 26 class CPDF_RenderOptions;
31 class CFX_RenderDevice; 27 class CFX_RenderDevice;
32 28
33 #define CFX_IntArray CFX_ArrayTemplate<int> 29 #define CFX_IntArray CFX_ArrayTemplate<int>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } dt; 67 } dt;
72 }; 68 };
73 69
74 class CPDFSDK_Annot { 70 class CPDFSDK_Annot {
75 public: 71 public:
76 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); 72 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
77 virtual ~CPDFSDK_Annot() {} 73 virtual ~CPDFSDK_Annot() {}
78 74
79 #ifdef PDF_ENABLE_XFA 75 #ifdef PDF_ENABLE_XFA
80 virtual FX_BOOL IsXFAField() { return FALSE; } 76 virtual FX_BOOL IsXFAField() { return FALSE; }
77 #endif // PDF_ENABLE_XFA
81 78
82 #endif
83 virtual FX_FLOAT GetMinWidth() const; 79 virtual FX_FLOAT GetMinWidth() const;
84 virtual FX_FLOAT GetMinHeight() const; 80 virtual FX_FLOAT GetMinHeight() const;
85 // define layout order to 5. 81 // define layout order to 5.
86 virtual int GetLayoutOrder() const { return 5; } 82 virtual int GetLayoutOrder() const { return 5; }
87 83
88 virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } 84 virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; }
85
89 #ifdef PDF_ENABLE_XFA 86 #ifdef PDF_ENABLE_XFA
90 virtual IXFA_Widget* GetXFAWidget() const { return nullptr; } 87 virtual IXFA_Widget* GetXFAWidget() const { return nullptr; }
91 #endif 88 #endif // PDF_ENABLE_XFA
92 89
93 virtual CFX_ByteString GetType() const { return ""; } 90 virtual CFX_ByteString GetType() const { return ""; }
94 virtual CFX_ByteString GetSubType() const { return ""; } 91 virtual CFX_ByteString GetSubType() const { return ""; }
95 92
96 virtual void SetRect(const CPDF_Rect& rect) {} 93 virtual void SetRect(const CPDF_Rect& rect) {}
97 virtual CPDF_Rect GetRect() const { return CPDF_Rect(); } 94 virtual CPDF_Rect GetRect() const { return CPDF_Rect(); }
98 95
99 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, 96 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
100 CPDF_Matrix* pUser2Device, 97 CPDF_Matrix* pUser2Device,
101 CPDF_RenderOptions* pOptions) {} 98 CPDF_RenderOptions* pOptions) {}
102 99
103 UnderlyingPageType* GetUnderlyingPage(); 100 UnderlyingPageType* GetUnderlyingPage();
104 CPDF_Page* GetPDFPage(); 101 CPDF_Page* GetPDFPage();
105 #ifdef PDF_ENABLE_XFA 102 #ifdef PDF_ENABLE_XFA
106 CPDFXFA_Page* GetPDFXFAPage(); 103 CPDFXFA_Page* GetPDFXFAPage();
107 #endif 104 #endif // PDF_ENABLE_XFA
108 105
109 void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } 106 void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; }
110 CPDFSDK_PageView* GetPageView() const { return m_pPageView; } 107 CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
111 108
112 // Tab Order 109 // Tab Order
113 int GetTabOrder(); 110 int GetTabOrder();
114 void SetTabOrder(int iTabOrder); 111 void SetTabOrder(int iTabOrder);
115 112
116 // Selection 113 // Selection
117 FX_BOOL IsSelected(); 114 FX_BOOL IsSelected();
118 void SetSelected(FX_BOOL bSelected); 115 void SetSelected(FX_BOOL bSelected);
119 116
120 protected: 117 protected:
121 CPDFSDK_PageView* m_pPageView; 118 CPDFSDK_PageView* m_pPageView;
122 FX_BOOL m_bSelected; 119 FX_BOOL m_bSelected;
123 int m_nTabOrder; 120 int m_nTabOrder;
124 }; 121 };
125 122
126 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { 123 class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
127 public: 124 public:
128 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); 125 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
129 ~CPDFSDK_BAAnnot() override {} 126 ~CPDFSDK_BAAnnot() override {}
130 127
131 #ifdef PDF_ENABLE_XFA 128 #ifdef PDF_ENABLE_XFA
132 FX_BOOL IsXFAField() override; 129 FX_BOOL IsXFAField() override;
133 #endif 130 #endif // PDF_ENABLE_XFA
131
134 CFX_ByteString GetType() const override; 132 CFX_ByteString GetType() const override;
135 CFX_ByteString GetSubType() const override; 133 CFX_ByteString GetSubType() const override;
136 void SetRect(const CPDF_Rect& rect) override; 134 void SetRect(const CPDF_Rect& rect) override;
137 CPDF_Rect GetRect() const override; 135 CPDF_Rect GetRect() const override;
138 CPDF_Annot* GetPDFAnnot() const override; 136 CPDF_Annot* GetPDFAnnot() const override;
139 void Annot_OnDraw(CFX_RenderDevice* pDevice, 137 void Annot_OnDraw(CFX_RenderDevice* pDevice,
140 CPDF_Matrix* pUser2Device, 138 CPDF_Matrix* pUser2Device,
141 CPDF_RenderOptions* pOptions) override; 139 CPDF_RenderOptions* pOptions) override;
142 140
143 CPDF_Dictionary* GetAnnotDict() const; 141 CPDF_Dictionary* GetAnnotDict() const;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 const CFX_ByteString& sAPState = ""); 214 const CFX_ByteString& sAPState = "");
217 215
218 protected: 216 protected:
219 CPDF_Annot* m_pAnnot; 217 CPDF_Annot* m_pAnnot;
220 218
221 private: 219 private:
222 FX_BOOL CreateFormFiller(); 220 FX_BOOL CreateFormFiller();
223 }; 221 };
224 222
225 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 223 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_annothandler.h ('k') | fpdfsdk/include/fsdk_baseform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698