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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; } | 99 void SetHorzScale(int32_t nHorzScale = 100) { m_nHorzScale = nHorzScale; } |
100 void SetMultiLine(FX_BOOL bMultiLine = TRUE) { m_bMultiLine = bMultiLine; } | 100 void SetMultiLine(FX_BOOL bMultiLine = TRUE) { m_bMultiLine = bMultiLine; } |
101 void SetAutoReturn(FX_BOOL bAuto = TRUE) { m_bLimitWidth = bAuto; } | 101 void SetAutoReturn(FX_BOOL bAuto = TRUE) { m_bLimitWidth = bAuto; } |
102 void SetFontSize(FX_FLOAT fFontSize) { m_fFontSize = fFontSize; } | 102 void SetFontSize(FX_FLOAT fFontSize) { m_fFontSize = fFontSize; } |
103 void SetCharArray(int32_t nCharArray = 0) { m_nCharArray = nCharArray; } | 103 void SetCharArray(int32_t nCharArray = 0) { m_nCharArray = nCharArray; } |
104 void SetAutoFontSize(FX_BOOL bAuto = TRUE) { m_bAutoFontSize = bAuto; } | 104 void SetAutoFontSize(FX_BOOL bAuto = TRUE) { m_bAutoFontSize = bAuto; } |
105 void SetRichText(FX_BOOL bRichText) { m_bRichText = bRichText; } | |
106 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; } | 105 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; } |
107 void Initialize(); | 106 void Initialize(); |
108 | 107 |
109 FX_BOOL IsValid() const { return m_bInitial; } | 108 FX_BOOL IsValid() const { return m_bInitial; } |
110 FX_BOOL IsRichText() const { return m_bRichText; } | |
111 | 109 |
112 void RearrangeAll(); | 110 void RearrangeAll(); |
113 void RearrangePart(const CPVT_WordRange& PlaceRange); | 111 void RearrangePart(const CPVT_WordRange& PlaceRange); |
114 void ResetAll(); | 112 void ResetAll(); |
115 void SetText(const FX_WCHAR* text, | 113 void SetText(const FX_WCHAR* text, |
116 int32_t charset = FXFONT_DEFAULT_CHARSET, | 114 int32_t charset = FXFONT_DEFAULT_CHARSET, |
117 const CPVT_SecProps* pSecProps = nullptr, | 115 const CPVT_SecProps* pSecProps = nullptr, |
118 const CPVT_WordProps* pWordProps = nullptr); | 116 const CPVT_WordProps* pWordProps = nullptr); |
119 CPVT_WordPlace InsertWord(const CPVT_WordPlace& place, | 117 CPVT_WordPlace InsertWord(const CPVT_WordPlace& place, |
120 uint16_t word, | 118 uint16_t word, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 FX_BOOL m_bMultiLine; | 236 FX_BOOL m_bMultiLine; |
239 FX_BOOL m_bLimitWidth; | 237 FX_BOOL m_bLimitWidth; |
240 FX_BOOL m_bAutoFontSize; | 238 FX_BOOL m_bAutoFontSize; |
241 int32_t m_nAlignment; | 239 int32_t m_nAlignment; |
242 FX_FLOAT m_fLineLeading; | 240 FX_FLOAT m_fLineLeading; |
243 FX_FLOAT m_fCharSpace; | 241 FX_FLOAT m_fCharSpace; |
244 int32_t m_nHorzScale; | 242 int32_t m_nHorzScale; |
245 uint16_t m_wSubWord; | 243 uint16_t m_wSubWord; |
246 FX_FLOAT m_fFontSize; | 244 FX_FLOAT m_fFontSize; |
247 FX_BOOL m_bInitial; | 245 FX_BOOL m_bInitial; |
248 FX_BOOL m_bRichText; | |
249 CPDF_VariableText::Provider* m_pVTProvider; | 246 CPDF_VariableText::Provider* m_pVTProvider; |
250 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; | 247 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; |
251 }; | 248 }; |
252 | 249 |
253 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ | 250 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ |
OLD | NEW |