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 CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
8 #define CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
9 | 9 |
10 #include "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 }; | 254 }; |
255 struct CPVT_Section { | 255 struct CPVT_Section { |
256 CPVT_WordPlace secplace; | 256 CPVT_WordPlace secplace; |
257 | 257 |
258 CFX_FloatRect rcSection; | 258 CFX_FloatRect rcSection; |
259 | 259 |
260 CPVT_SecProps SecProps; | 260 CPVT_SecProps SecProps; |
261 | 261 |
262 CPVT_WordProps WordProps; | 262 CPVT_WordProps WordProps; |
263 }; | 263 }; |
264 class IPDF_VariableText_Provider { | |
265 public: | |
266 virtual ~IPDF_VariableText_Provider() {} | |
267 | 264 |
268 virtual int32_t GetCharWidth(int32_t nFontIndex, | |
269 uint16_t word, | |
270 int32_t nWordStyle) = 0; | |
271 | |
272 virtual int32_t GetTypeAscent(int32_t nFontIndex) = 0; | |
273 | |
274 virtual int32_t GetTypeDescent(int32_t nFontIndex) = 0; | |
275 | |
276 virtual int32_t GetWordFontIndex(uint16_t word, | |
277 int32_t charset, | |
278 int32_t nFontIndex) = 0; | |
279 | |
280 virtual FX_BOOL IsLatinWord(uint16_t word) = 0; | |
281 | |
282 virtual int32_t GetDefaultFontIndex() = 0; | |
283 }; | |
284 class IPDF_VariableText_Iterator { | 265 class IPDF_VariableText_Iterator { |
285 public: | 266 public: |
286 virtual ~IPDF_VariableText_Iterator() {} | 267 virtual ~IPDF_VariableText_Iterator() {} |
287 | 268 |
288 virtual FX_BOOL NextWord() = 0; | 269 virtual FX_BOOL NextWord() = 0; |
289 | 270 |
290 virtual FX_BOOL PrevWord() = 0; | 271 virtual FX_BOOL PrevWord() = 0; |
291 | 272 |
292 virtual FX_BOOL NextLine() = 0; | 273 virtual FX_BOOL NextLine() = 0; |
293 | 274 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 431 |
451 virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const = 0; | 432 virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const = 0; |
452 | 433 |
453 virtual CPVT_WordPlace WordIndexToWordPlace(int32_t index) const = 0; | 434 virtual CPVT_WordPlace WordIndexToWordPlace(int32_t index) const = 0; |
454 | 435 |
455 protected: | 436 protected: |
456 ~IPDF_VariableText() {} | 437 ~IPDF_VariableText() {} |
457 }; | 438 }; |
458 | 439 |
459 #endif // CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 440 #endif // CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
OLD | NEW |