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

Side by Side Diff: core/fpdfdoc/cpdf_formcontrol.h

Issue 2625483002: Remove some CFX_ArrayTemplate in fpdfapi and fpdfdoc (Closed)
Patch Set: 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
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 CORE_FPDFDOC_CPDF_FORMCONTROL_H_ 7 #ifndef CORE_FPDFDOC_CPDF_FORMCONTROL_H_
8 #define CORE_FPDFDOC_CPDF_FORMCONTROL_H_ 8 #define CORE_FPDFDOC_CPDF_FORMCONTROL_H_
9 9
10 #include "core/fpdfdoc/cpdf_aaction.h" 10 #include "core/fpdfdoc/cpdf_aaction.h"
(...skipping 28 matching lines...) Expand all
39 class CPDF_FormField; 39 class CPDF_FormField;
40 class CPDF_InterForm; 40 class CPDF_InterForm;
41 class CPDF_OCContext; 41 class CPDF_OCContext;
42 class CPDF_RenderOptions; 42 class CPDF_RenderOptions;
43 class CPDF_Stream; 43 class CPDF_Stream;
44 44
45 class CPDF_FormControl { 45 class CPDF_FormControl {
46 public: 46 public:
47 enum HighlightingMode { None = 0, Invert, Outline, Push, Toggle }; 47 enum HighlightingMode { None = 0, Invert, Outline, Push, Toggle };
48 48
49 CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict);
Tom Sepez 2017/01/09 18:37:07 Note: For MakeUnique<> to be allowed to construct
50
49 CPDF_FormField::Type GetType() const { return m_pField->GetType(); } 51 CPDF_FormField::Type GetType() const { return m_pField->GetType(); }
50 CPDF_InterForm* GetInterForm() const { return m_pForm; } 52 CPDF_InterForm* GetInterForm() const { return m_pForm; }
51 CPDF_FormField* GetField() const { return m_pField; } 53 CPDF_FormField* GetField() const { return m_pField; }
52 CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; } 54 CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; }
53 CFX_FloatRect GetRect() const { return m_pWidgetDict->GetRectFor("Rect"); } 55 CFX_FloatRect GetRect() const { return m_pWidgetDict->GetRectFor("Rect"); }
54 56
55 void DrawControl(CFX_RenderDevice* pDevice, 57 void DrawControl(CFX_RenderDevice* pDevice,
56 CFX_Matrix* pMatrix, 58 CFX_Matrix* pMatrix,
57 CPDF_Page* pPage, 59 CPDF_Page* pPage,
58 CPDF_Annot::AppearanceMode mode, 60 CPDF_Annot::AppearanceMode mode,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 CPDF_AAction GetAdditionalAction(); 106 CPDF_AAction GetAdditionalAction();
105 CPDF_DefaultAppearance GetDefaultAppearance(); 107 CPDF_DefaultAppearance GetDefaultAppearance();
106 108
107 CPDF_Font* GetDefaultControlFont(); 109 CPDF_Font* GetDefaultControlFont();
108 int GetControlAlignment(); 110 int GetControlAlignment();
109 111
110 private: 112 private:
111 friend class CPDF_InterForm; 113 friend class CPDF_InterForm;
112 friend class CPDF_FormField; 114 friend class CPDF_FormField;
113 115
114 CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict);
115
116 CFX_ByteString GetOnStateName() const; 116 CFX_ByteString GetOnStateName() const;
117 void SetOnStateName(const CFX_ByteString& csOn); 117 void SetOnStateName(const CFX_ByteString& csOn);
118 void CheckControl(bool bChecked); 118 void CheckControl(bool bChecked);
119 FX_ARGB GetColor(int& iColorType, const CFX_ByteString& csEntry); 119 FX_ARGB GetColor(int& iColorType, const CFX_ByteString& csEntry);
120 FX_FLOAT GetOriginalColor(int index, const CFX_ByteString& csEntry); 120 FX_FLOAT GetOriginalColor(int index, const CFX_ByteString& csEntry);
121 void GetOriginalColor(int& iColorType, 121 void GetOriginalColor(int& iColorType,
122 FX_FLOAT fc[4], 122 FX_FLOAT fc[4],
123 const CFX_ByteString& csEntry); 123 const CFX_ByteString& csEntry);
124 124
125 CFX_WideString GetCaption(const CFX_ByteString& csEntry); 125 CFX_WideString GetCaption(const CFX_ByteString& csEntry);
126 CPDF_Stream* GetIcon(const CFX_ByteString& csEntry); 126 CPDF_Stream* GetIcon(const CFX_ByteString& csEntry);
127 CPDF_ApSettings GetMK() const; 127 CPDF_ApSettings GetMK() const;
128 128
129 CPDF_FormField* const m_pField; 129 CPDF_FormField* const m_pField;
130 CPDF_Dictionary* const m_pWidgetDict; 130 CPDF_Dictionary* const m_pWidgetDict;
131 CPDF_InterForm* const m_pForm; 131 CPDF_InterForm* const m_pForm;
132 }; 132 };
133 133
134 #endif // CORE_FPDFDOC_CPDF_FORMCONTROL_H_ 134 #endif // CORE_FPDFDOC_CPDF_FORMCONTROL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698