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 FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
9 | 9 |
10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 CFX_WideString sChange; // in[out] | 56 CFX_WideString sChange; // in[out] |
57 CFX_WideString sChangeEx; // in | 57 CFX_WideString sChangeEx; // in |
58 FX_BOOL bKeyDown; // in | 58 FX_BOOL bKeyDown; // in |
59 int nSelEnd; // in[out] | 59 int nSelEnd; // in[out] |
60 int nSelStart; // in[out] | 60 int nSelStart; // in[out] |
61 CFX_WideString sValue; // in[out] | 61 CFX_WideString sValue; // in[out] |
62 FX_BOOL bWillCommit; // in | 62 FX_BOOL bWillCommit; // in |
63 FX_BOOL bFieldFull; // in | 63 FX_BOOL bFieldFull; // in |
64 FX_BOOL bRC; // in[out] | 64 FX_BOOL bRC; // in[out] |
65 } PDFSDK_FieldAction; | 65 } PDFSDK_FieldAction; |
| 66 |
66 class CPDFSDK_Widget : public CPDFSDK_BAAnnot { | 67 class CPDFSDK_Widget : public CPDFSDK_BAAnnot { |
67 public: | 68 public: |
68 IXFA_Widget* GetMixXFAWidget(); | 69 IXFA_Widget* GetMixXFAWidget(); |
69 IXFA_Widget* GetGroupMixXFAWidget(); | 70 IXFA_Widget* GetGroupMixXFAWidget(); |
70 IXFA_WidgetHandler* GetXFAWidgetHandler(); | 71 IXFA_WidgetHandler* GetXFAWidgetHandler(); |
71 | 72 |
72 FX_BOOL HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT); | 73 FX_BOOL HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT); |
73 FX_BOOL OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, | 74 FX_BOOL OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, |
74 PDFSDK_FieldAction& data, | 75 PDFSDK_FieldAction& data, |
75 CPDFSDK_PageView* pPageView); | 76 CPDFSDK_PageView* pPageView); |
76 | 77 |
77 void Synchronize(FX_BOOL bSynchronizeElse); | 78 void Synchronize(FX_BOOL bSynchronizeElse); |
78 void SynchronizeXFAValue(); | 79 void SynchronizeXFAValue(); |
79 void SynchronizeXFAItems(); | 80 void SynchronizeXFAItems(); |
80 | 81 |
81 static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, | 82 static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, |
82 IXFA_Widget* hWidget, | 83 IXFA_Widget* hWidget, |
83 CPDF_FormField* pFormField, | 84 CPDF_FormField* pFormField, |
84 CPDF_FormControl* pFormControl); | 85 CPDF_FormControl* pFormControl); |
85 static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, | 86 static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, |
86 IXFA_Widget* hWidget, | 87 IXFA_Widget* hWidget, |
87 CPDF_FormField* pFormField, | 88 CPDF_FormField* pFormField, |
88 CPDF_FormControl* pFormControl); | 89 CPDF_FormControl* pFormControl); |
89 | 90 |
90 public: | |
91 CPDFSDK_Widget(CPDF_Annot* pAnnot, | 91 CPDFSDK_Widget(CPDF_Annot* pAnnot, |
92 CPDFSDK_PageView* pPageView, | 92 CPDFSDK_PageView* pPageView, |
93 CPDFSDK_InterForm* pInterForm); | 93 CPDFSDK_InterForm* pInterForm); |
94 virtual ~CPDFSDK_Widget(); | 94 ~CPDFSDK_Widget() override; |
95 | 95 |
96 virtual CFX_ByteString GetSubType() const; | 96 // CPDFSDK_Annot |
| 97 CFX_ByteString GetSubType() const override; |
| 98 CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT) override; |
| 99 FX_BOOL IsAppearanceValid() override; |
97 | 100 |
98 virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT); | 101 int GetLayoutOrder() const override { return 2; } |
99 | 102 |
100 int GetFieldType() const; | 103 int GetFieldType() const; |
101 // define layout order to 2. | |
102 virtual int GetLayoutOrder() const { return 2; } | |
103 virtual FX_BOOL IsAppearanceValid(); | |
104 /* | |
105 FIELDFLAG_READONLY | |
106 FIELDFLAG_REQUIRED | |
107 FIELDFLAG_NOEXPORT | |
108 */ | |
109 | 104 |
| 105 // Possible values from PDF 32000-1:2008, table 221. |
| 106 // FIELDFLAG_READONLY |
| 107 // FIELDFLAG_REQUIRED |
| 108 // FIELDFLAG_NOEXPORT |
110 int GetFieldFlags() const; | 109 int GetFieldFlags() const; |
111 int GetRotate() const; | 110 int GetRotate() const; |
112 | 111 |
113 FX_BOOL GetFillColor(FX_COLORREF& color) const; | 112 FX_BOOL GetFillColor(FX_COLORREF& color) const; |
114 FX_BOOL GetBorderColor(FX_COLORREF& color) const; | 113 FX_BOOL GetBorderColor(FX_COLORREF& color) const; |
115 FX_BOOL GetTextColor(FX_COLORREF& color) const; | 114 FX_BOOL GetTextColor(FX_COLORREF& color) const; |
116 FX_FLOAT GetFontSize() const; | 115 FX_FLOAT GetFontSize() const; |
117 | 116 |
118 int GetSelectedIndex(int nIndex); | 117 int GetSelectedIndex(int nIndex); |
119 CFX_WideString GetValue(FX_BOOL bDisplay = TRUE); | 118 CFX_WideString GetValue(FX_BOOL bDisplay = TRUE); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); | 378 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); |
380 | 379 |
381 CPDFSDK_PageView* m_pPageView; | 380 CPDFSDK_PageView* m_pPageView; |
382 CFX_ByteString m_sType; | 381 CFX_ByteString m_sType; |
383 CFX_ByteString m_sSubType; | 382 CFX_ByteString m_sSubType; |
384 int m_nTabs; | 383 int m_nTabs; |
385 CPDFSDK_Annots m_Annots; | 384 CPDFSDK_Annots m_Annots; |
386 }; | 385 }; |
387 | 386 |
388 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 387 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
OLD | NEW |