OLD | NEW |
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_INCLUDE_CPDF_VARIABLETEXT_H_ | 7 #ifndef CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ |
8 #define CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ | 8 #define CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 // CPDF_EditContainer. | 90 // CPDF_EditContainer. |
91 void SetPlateRect(const CFX_FloatRect& rect) override; | 91 void SetPlateRect(const CFX_FloatRect& rect) override; |
92 CFX_FloatRect GetContentRect() const override; | 92 CFX_FloatRect GetContentRect() const override; |
93 const CFX_FloatRect& GetPlateRect() const override; | 93 const CFX_FloatRect& GetPlateRect() const override; |
94 | 94 |
95 void SetAlignment(int32_t nFormat = 0) { m_nAlignment = nFormat; } | 95 void SetAlignment(int32_t nFormat = 0) { m_nAlignment = nFormat; } |
96 void SetPasswordChar(uint16_t wSubWord = '*') { m_wSubWord = wSubWord; } | 96 void SetPasswordChar(uint16_t wSubWord = '*') { m_wSubWord = wSubWord; } |
97 void SetLimitChar(int32_t nLimitChar = 0) { m_nLimitChar = nLimitChar; } | 97 void SetLimitChar(int32_t nLimitChar = 0) { m_nLimitChar = nLimitChar; } |
98 void SetCharSpace(FX_FLOAT fCharSpace = 0.0f) { m_fCharSpace = fCharSpace; } | 98 void SetCharSpace(FX_FLOAT fCharSpace = 0.0f) { m_fCharSpace = fCharSpace; } |
99 void SetHorzScale(int32_t nHorzScale = 100) { m_nHorzScale = nHorzScale; } | |
100 void SetMultiLine(FX_BOOL bMultiLine = TRUE) { m_bMultiLine = bMultiLine; } | 99 void SetMultiLine(FX_BOOL bMultiLine = TRUE) { m_bMultiLine = bMultiLine; } |
101 void SetAutoReturn(FX_BOOL bAuto = TRUE) { m_bLimitWidth = bAuto; } | 100 void SetAutoReturn(FX_BOOL bAuto = TRUE) { m_bLimitWidth = bAuto; } |
102 void SetFontSize(FX_FLOAT fFontSize) { m_fFontSize = fFontSize; } | 101 void SetFontSize(FX_FLOAT fFontSize) { m_fFontSize = fFontSize; } |
103 void SetCharArray(int32_t nCharArray = 0) { m_nCharArray = nCharArray; } | 102 void SetCharArray(int32_t nCharArray = 0) { m_nCharArray = nCharArray; } |
104 void SetAutoFontSize(FX_BOOL bAuto = TRUE) { m_bAutoFontSize = bAuto; } | 103 void SetAutoFontSize(FX_BOOL bAuto = TRUE) { m_bAutoFontSize = bAuto; } |
105 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; } | |
106 void Initialize(); | 104 void Initialize(); |
107 | 105 |
108 FX_BOOL IsValid() const { return m_bInitial; } | 106 FX_BOOL IsValid() const { return m_bInitial; } |
109 | 107 |
110 void RearrangeAll(); | 108 void RearrangeAll(); |
111 void RearrangePart(const CPVT_WordRange& PlaceRange); | 109 void RearrangePart(const CPVT_WordRange& PlaceRange); |
112 void ResetAll(); | 110 void ResetAll(); |
113 void SetText(const FX_WCHAR* text, | 111 void SetText(const FX_WCHAR* text, |
114 int32_t charset = FXFONT_DEFAULT_CHARSET, | 112 int32_t charset = FXFONT_DEFAULT_CHARSET, |
115 const CPVT_SecProps* pSecProps = nullptr, | 113 const CPVT_SecProps* pSecProps = nullptr, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 FX_FLOAT m_fCharSpace; | 239 FX_FLOAT m_fCharSpace; |
242 int32_t m_nHorzScale; | 240 int32_t m_nHorzScale; |
243 uint16_t m_wSubWord; | 241 uint16_t m_wSubWord; |
244 FX_FLOAT m_fFontSize; | 242 FX_FLOAT m_fFontSize; |
245 FX_BOOL m_bInitial; | 243 FX_BOOL m_bInitial; |
246 CPDF_VariableText::Provider* m_pVTProvider; | 244 CPDF_VariableText::Provider* m_pVTProvider; |
247 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; | 245 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; |
248 }; | 246 }; |
249 | 247 |
250 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ | 248 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ |
OLD | NEW |