OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 |
| 7 #ifndef CORE_FPDFDOC_CPVT_GENERATEAP_H_ |
| 8 #define CORE_FPDFDOC_CPVT_GENERATEAP_H_ |
| 9 |
| 10 #include "core/fpdfdoc/cpvt_color.h" |
| 11 #include "core/fpdfdoc/cpvt_dash.h" |
| 12 #include "core/fxcrt/include/fx_coordinates.h" |
| 13 #include "core/fxcrt/include/fx_string.h" |
| 14 #include "core/fxcrt/include/fx_system.h" |
| 15 |
| 16 // border style |
| 17 #define PBS_SOLID 0 |
| 18 #define PBS_DASH 1 |
| 19 #define PBS_BEVELED 2 |
| 20 #define PBS_INSET 3 |
| 21 #define PBS_UNDERLINED 4 |
| 22 #define PBS_SHADOW 5 |
| 23 |
| 24 class CPDF_Dictionary; |
| 25 class CPDF_Document; |
| 26 class IPDF_VariableText_Iterator; |
| 27 class IPVT_FontMap; |
| 28 struct CPVT_WordRange; |
| 29 |
| 30 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict); |
| 31 |
| 32 class CPVT_GenerateAP { |
| 33 public: |
| 34 static FX_BOOL GenerateTextFieldAP(CPDF_Document* pDoc, |
| 35 CPDF_Dictionary* pAnnotDict); |
| 36 static FX_BOOL GenerateComboBoxAP(CPDF_Document* pDoc, |
| 37 CPDF_Dictionary* pAnnotDict); |
| 38 static FX_BOOL GenerateListBoxAP(CPDF_Document* pDoc, |
| 39 CPDF_Dictionary* pAnnotDict); |
| 40 static CFX_ByteString GenerateEditAP(IPVT_FontMap* pFontMap, |
| 41 IPDF_VariableText_Iterator* pIterator, |
| 42 const CFX_FloatPoint& ptOffset, |
| 43 FX_BOOL bContinuous, |
| 44 uint16_t SubWord = 0, |
| 45 const CPVT_WordRange* pVisible = NULL); |
| 46 static CFX_ByteString GenerateBorderAP(const CFX_FloatRect& rect, |
| 47 FX_FLOAT fWidth, |
| 48 const CPVT_Color& color, |
| 49 const CPVT_Color& crLeftTop, |
| 50 const CPVT_Color& crRightBottom, |
| 51 int32_t nStyle, |
| 52 const CPVT_Dash& dash); |
| 53 static CFX_ByteString GenerateColorAP(const CPVT_Color& color, |
| 54 const FX_BOOL& bFillOrStroke); |
| 55 |
| 56 static CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap, |
| 57 int32_t nFontIndex, |
| 58 uint16_t Word, |
| 59 uint16_t SubWord); |
| 60 static CFX_ByteString GetWordRenderString(const CFX_ByteString& strWords); |
| 61 static CFX_ByteString GetFontSetString(IPVT_FontMap* pFontMap, |
| 62 int32_t nFontIndex, |
| 63 FX_FLOAT fFontSize); |
| 64 }; |
| 65 |
| 66 #endif // CORE_FPDFDOC_CPVT_GENERATEAP_H_ |
OLD | NEW |