| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 CPVT_Word() | 209 CPVT_Word() |
| 210 : Word(0), | 210 : Word(0), |
| 211 nCharset(0), | 211 nCharset(0), |
| 212 ptWord(0, 0), | 212 ptWord(0, 0), |
| 213 fAscent(0.0f), | 213 fAscent(0.0f), |
| 214 fDescent(0.0f), | 214 fDescent(0.0f), |
| 215 fWidth(0.0f), | 215 fWidth(0.0f), |
| 216 fFontSize(0), | 216 fFontSize(0), |
| 217 WordProps() {} | 217 WordProps() {} |
| 218 | 218 |
| 219 FX_WORD Word; | 219 uint16_t Word; |
| 220 | 220 |
| 221 int32_t nCharset; | 221 int32_t nCharset; |
| 222 | 222 |
| 223 CPVT_WordPlace WordPlace; | 223 CPVT_WordPlace WordPlace; |
| 224 | 224 |
| 225 CFX_FloatPoint ptWord; | 225 CFX_FloatPoint ptWord; |
| 226 | 226 |
| 227 FX_FLOAT fAscent; | 227 FX_FLOAT fAscent; |
| 228 | 228 |
| 229 FX_FLOAT fDescent; | 229 FX_FLOAT fDescent; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 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 { | 264 class IPDF_VariableText_Provider { |
| 265 public: | 265 public: |
| 266 virtual ~IPDF_VariableText_Provider() {} | 266 virtual ~IPDF_VariableText_Provider() {} |
| 267 | 267 |
| 268 virtual int32_t GetCharWidth(int32_t nFontIndex, | 268 virtual int32_t GetCharWidth(int32_t nFontIndex, |
| 269 FX_WORD word, | 269 uint16_t word, |
| 270 int32_t nWordStyle) = 0; | 270 int32_t nWordStyle) = 0; |
| 271 | 271 |
| 272 virtual int32_t GetTypeAscent(int32_t nFontIndex) = 0; | 272 virtual int32_t GetTypeAscent(int32_t nFontIndex) = 0; |
| 273 | 273 |
| 274 virtual int32_t GetTypeDescent(int32_t nFontIndex) = 0; | 274 virtual int32_t GetTypeDescent(int32_t nFontIndex) = 0; |
| 275 | 275 |
| 276 virtual int32_t GetWordFontIndex(FX_WORD word, | 276 virtual int32_t GetWordFontIndex(uint16_t word, |
| 277 int32_t charset, | 277 int32_t charset, |
| 278 int32_t nFontIndex) = 0; | 278 int32_t nFontIndex) = 0; |
| 279 | 279 |
| 280 virtual FX_BOOL IsLatinWord(FX_WORD word) = 0; | 280 virtual FX_BOOL IsLatinWord(uint16_t word) = 0; |
| 281 | 281 |
| 282 virtual int32_t GetDefaultFontIndex() = 0; | 282 virtual int32_t GetDefaultFontIndex() = 0; |
| 283 }; | 283 }; |
| 284 class IPDF_VariableText_Iterator { | 284 class IPDF_VariableText_Iterator { |
| 285 public: | 285 public: |
| 286 virtual ~IPDF_VariableText_Iterator() {} | 286 virtual ~IPDF_VariableText_Iterator() {} |
| 287 | 287 |
| 288 virtual FX_BOOL NextWord() = 0; | 288 virtual FX_BOOL NextWord() = 0; |
| 289 | 289 |
| 290 virtual FX_BOOL PrevWord() = 0; | 290 virtual FX_BOOL PrevWord() = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 321 | 321 |
| 322 virtual IPDF_VariableText_Provider* SetProvider( | 322 virtual IPDF_VariableText_Provider* SetProvider( |
| 323 IPDF_VariableText_Provider* pProvider) = 0; | 323 IPDF_VariableText_Provider* pProvider) = 0; |
| 324 | 324 |
| 325 virtual IPDF_VariableText_Iterator* GetIterator() = 0; | 325 virtual IPDF_VariableText_Iterator* GetIterator() = 0; |
| 326 | 326 |
| 327 virtual void SetPlateRect(const CFX_FloatRect& rect) = 0; | 327 virtual void SetPlateRect(const CFX_FloatRect& rect) = 0; |
| 328 | 328 |
| 329 virtual void SetAlignment(int32_t nFormat = 0) = 0; | 329 virtual void SetAlignment(int32_t nFormat = 0) = 0; |
| 330 | 330 |
| 331 virtual void SetPasswordChar(FX_WORD wSubWord = '*') = 0; | 331 virtual void SetPasswordChar(uint16_t wSubWord = '*') = 0; |
| 332 | 332 |
| 333 virtual void SetLimitChar(int32_t nLimitChar = 0) = 0; | 333 virtual void SetLimitChar(int32_t nLimitChar = 0) = 0; |
| 334 | 334 |
| 335 virtual void SetCharArray(int32_t nCharArray = 0) = 0; | 335 virtual void SetCharArray(int32_t nCharArray = 0) = 0; |
| 336 | 336 |
| 337 virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f) = 0; | 337 virtual void SetCharSpace(FX_FLOAT fCharSpace = 0.0f) = 0; |
| 338 | 338 |
| 339 virtual void SetHorzScale(int32_t nHorzScale = 100) = 0; | 339 virtual void SetHorzScale(int32_t nHorzScale = 100) = 0; |
| 340 | 340 |
| 341 virtual void SetMultiLine(FX_BOOL bMultiLine = TRUE) = 0; | 341 virtual void SetMultiLine(FX_BOOL bMultiLine = TRUE) = 0; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 362 | 362 |
| 363 virtual void ResetAll() = 0; | 363 virtual void ResetAll() = 0; |
| 364 | 364 |
| 365 virtual void SetText(const FX_WCHAR* text, | 365 virtual void SetText(const FX_WCHAR* text, |
| 366 int32_t charset = 1, | 366 int32_t charset = 1, |
| 367 const CPVT_SecProps* pSecProps = NULL, | 367 const CPVT_SecProps* pSecProps = NULL, |
| 368 const CPVT_WordProps* pWordProps = NULL) = 0; | 368 const CPVT_WordProps* pWordProps = NULL) = 0; |
| 369 | 369 |
| 370 virtual CPVT_WordPlace InsertWord( | 370 virtual CPVT_WordPlace InsertWord( |
| 371 const CPVT_WordPlace& place, | 371 const CPVT_WordPlace& place, |
| 372 FX_WORD word, | 372 uint16_t word, |
| 373 int32_t charset = 1, | 373 int32_t charset = 1, |
| 374 const CPVT_WordProps* pWordProps = NULL) = 0; | 374 const CPVT_WordProps* pWordProps = NULL) = 0; |
| 375 | 375 |
| 376 virtual CPVT_WordPlace InsertSection( | 376 virtual CPVT_WordPlace InsertSection( |
| 377 const CPVT_WordPlace& place, | 377 const CPVT_WordPlace& place, |
| 378 const CPVT_SecProps* pSecProps = NULL, | 378 const CPVT_SecProps* pSecProps = NULL, |
| 379 const CPVT_WordProps* pWordProps = NULL) = 0; | 379 const CPVT_WordProps* pWordProps = NULL) = 0; |
| 380 | 380 |
| 381 virtual CPVT_WordPlace InsertText( | 381 virtual CPVT_WordPlace InsertText( |
| 382 const CPVT_WordPlace& place, | 382 const CPVT_WordPlace& place, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 394 virtual const CFX_FloatRect& GetPlateRect() const = 0; | 394 virtual const CFX_FloatRect& GetPlateRect() const = 0; |
| 395 | 395 |
| 396 virtual CFX_FloatRect GetContentRect() const = 0; | 396 virtual CFX_FloatRect GetContentRect() const = 0; |
| 397 | 397 |
| 398 virtual int32_t GetTotalWords() const = 0; | 398 virtual int32_t GetTotalWords() const = 0; |
| 399 | 399 |
| 400 virtual FX_FLOAT GetFontSize() const = 0; | 400 virtual FX_FLOAT GetFontSize() const = 0; |
| 401 | 401 |
| 402 virtual int32_t GetAlignment() const = 0; | 402 virtual int32_t GetAlignment() const = 0; |
| 403 | 403 |
| 404 virtual FX_WORD GetPasswordChar() const = 0; | 404 virtual uint16_t GetPasswordChar() const = 0; |
| 405 | 405 |
| 406 virtual int32_t GetCharArray() const = 0; | 406 virtual int32_t GetCharArray() const = 0; |
| 407 | 407 |
| 408 virtual int32_t GetLimitChar() const = 0; | 408 virtual int32_t GetLimitChar() const = 0; |
| 409 | 409 |
| 410 virtual FX_BOOL IsMultiLine() const = 0; | 410 virtual FX_BOOL IsMultiLine() const = 0; |
| 411 | 411 |
| 412 virtual int32_t GetHorzScale() const = 0; | 412 virtual int32_t GetHorzScale() const = 0; |
| 413 | 413 |
| 414 virtual FX_FLOAT GetCharSpace() const = 0; | 414 virtual FX_FLOAT GetCharSpace() const = 0; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const = 0; | 451 virtual int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const = 0; |
| 452 | 452 |
| 453 virtual CPVT_WordPlace WordIndexToWordPlace(int32_t index) const = 0; | 453 virtual CPVT_WordPlace WordIndexToWordPlace(int32_t index) const = 0; |
| 454 | 454 |
| 455 protected: | 455 protected: |
| 456 ~IPDF_VariableText() {} | 456 ~IPDF_VariableText() {} |
| 457 }; | 457 }; |
| 458 | 458 |
| 459 #endif // CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 459 #endif // CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
| OLD | NEW |