| 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 FPDFSDK_PDFWINDOW_PWL_EDIT_H_ | 7 #ifndef FPDFSDK_PDFWINDOW_PWL_EDIT_H_ |
| 8 #define FPDFSDK_PDFWINDOW_PWL_EDIT_H_ | 8 #define FPDFSDK_PDFWINDOW_PWL_EDIT_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
| 11 #include "fpdfsdk/fxedit/include/fx_edit.h" | 11 #include "fpdfsdk/fxedit/include/fx_edit.h" |
| 12 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" | 12 #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" |
| 13 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" | 13 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" |
| 14 | 14 |
| 15 class IPWL_SpellCheck; | |
| 16 | |
| 17 class IPWL_Filler_Notify { | 15 class IPWL_Filler_Notify { |
| 18 public: | 16 public: |
| 19 virtual ~IPWL_Filler_Notify() {} | 17 virtual ~IPWL_Filler_Notify() {} |
| 20 virtual void QueryWherePopup( | 18 virtual void QueryWherePopup( |
| 21 void* pPrivateData, | 19 void* pPrivateData, |
| 22 FX_FLOAT fPopupMin, | 20 FX_FLOAT fPopupMin, |
| 23 FX_FLOAT fPopupMax, | 21 FX_FLOAT fPopupMax, |
| 24 int32_t& nRet, | 22 int32_t& nRet, |
| 25 FX_FLOAT& fPopupRet) = 0; // nRet: (0:bottom 1:top) | 23 FX_FLOAT& fPopupRet) = 0; // nRet: (0:bottom 1:top) |
| 26 virtual void OnBeforeKeyStroke(void* pPrivateData, | 24 virtual void OnBeforeKeyStroke(void* pPrivateData, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 FX_BOOL bPaint = TRUE); // 0:top 1:bottom 2:center | 72 FX_BOOL bPaint = TRUE); // 0:top 1:bottom 2:center |
| 75 | 73 |
| 76 void SetCharArray(int32_t nCharArray); | 74 void SetCharArray(int32_t nCharArray); |
| 77 void SetLimitChar(int32_t nLimitChar); | 75 void SetLimitChar(int32_t nLimitChar); |
| 78 | 76 |
| 79 void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE); | 77 void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE); |
| 80 void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE); | 78 void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE); |
| 81 | 79 |
| 82 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); | 80 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); |
| 83 | 81 |
| 84 void EnableSpellCheck(FX_BOOL bEnabled); | |
| 85 | |
| 86 FX_BOOL CanSelectAll() const; | 82 FX_BOOL CanSelectAll() const; |
| 87 FX_BOOL CanClear() const; | 83 FX_BOOL CanClear() const; |
| 88 FX_BOOL CanCopy() const; | 84 FX_BOOL CanCopy() const; |
| 89 FX_BOOL CanCut() const; | 85 FX_BOOL CanCut() const; |
| 90 FX_BOOL CanPaste() const; | 86 FX_BOOL CanPaste() const; |
| 91 | 87 |
| 92 virtual void CopyText(); | 88 virtual void CopyText(); |
| 93 virtual void PasteText(); | 89 virtual void PasteText(); |
| 94 virtual void CutText(); | 90 virtual void CutText(); |
| 95 | 91 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 110 void SetFillerNotify(IPWL_Filler_Notify* pNotify) { | 106 void SetFillerNotify(IPWL_Filler_Notify* pNotify) { |
| 111 m_pFillerNotify = pNotify; | 107 m_pFillerNotify = pNotify; |
| 112 } | 108 } |
| 113 | 109 |
| 114 void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, | 110 void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, |
| 115 const CFX_FloatPoint& ptOffset, | 111 const CFX_FloatPoint& ptOffset, |
| 116 CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray); | 112 CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray); |
| 117 void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, | 113 void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder, |
| 118 const CFX_FloatPoint& ptOffset); | 114 const CFX_FloatPoint& ptOffset); |
| 119 | 115 |
| 116 FX_BOOL IsProceedtoOnChar(uint16_t nKeyCode, uint32_t nFlag); |
| 117 void AttachFFLData(void* pData) { m_pFormFiller = pData; } |
| 118 |
| 120 protected: | 119 protected: |
| 121 // IFX_Edit_OprNotify | 120 // IFX_Edit_OprNotify |
| 122 void OnInsertWord(const CPVT_WordPlace& place, | 121 void OnInsertWord(const CPVT_WordPlace& place, |
| 123 const CPVT_WordPlace& oldplace) override; | 122 const CPVT_WordPlace& oldplace) override; |
| 124 void OnInsertReturn(const CPVT_WordPlace& place, | 123 void OnInsertReturn(const CPVT_WordPlace& place, |
| 125 const CPVT_WordPlace& oldplace) override; | 124 const CPVT_WordPlace& oldplace) override; |
| 126 void OnBackSpace(const CPVT_WordPlace& place, | 125 void OnBackSpace(const CPVT_WordPlace& place, |
| 127 const CPVT_WordPlace& oldplace) override; | 126 const CPVT_WordPlace& oldplace) override; |
| 128 void OnDelete(const CPVT_WordPlace& place, | 127 void OnDelete(const CPVT_WordPlace& place, |
| 129 const CPVT_WordPlace& oldplace) override; | 128 const CPVT_WordPlace& oldplace) override; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 145 CFX_FloatPoint GetWordRightBottomPoint(const CPVT_WordPlace& wpWord); | 144 CFX_FloatPoint GetWordRightBottomPoint(const CPVT_WordPlace& wpWord); |
| 146 | 145 |
| 147 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, | 146 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, |
| 148 const CPVT_WordRange& wr2); | 147 const CPVT_WordRange& wr2); |
| 149 CPVT_WordRange GetLatinWordsRange(const CFX_FloatPoint& point) const; | 148 CPVT_WordRange GetLatinWordsRange(const CFX_FloatPoint& point) const; |
| 150 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; | 149 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; |
| 151 CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace& place) const; | 150 CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace& place) const; |
| 152 CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace& place, | 151 CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace& place, |
| 153 FX_BOOL bLatin, | 152 FX_BOOL bLatin, |
| 154 FX_BOOL bArabic) const; | 153 FX_BOOL bArabic) const; |
| 155 | |
| 156 public: | |
| 157 FX_BOOL IsProceedtoOnChar(uint16_t nKeyCode, uint32_t nFlag); | |
| 158 | |
| 159 private: | |
| 160 IPWL_Filler_Notify* m_pFillerNotify; | 154 IPWL_Filler_Notify* m_pFillerNotify; |
| 161 IPWL_SpellCheck* m_pSpellCheck; | |
| 162 FX_BOOL m_bFocus; | 155 FX_BOOL m_bFocus; |
| 163 CFX_FloatRect m_rcOldWindow; | 156 CFX_FloatRect m_rcOldWindow; |
| 164 | |
| 165 public: | |
| 166 void AttachFFLData(void* pData) { m_pFormFiller = pData; } | |
| 167 | |
| 168 private: | |
| 169 void* m_pFormFiller; | 157 void* m_pFormFiller; |
| 170 }; | 158 }; |
| 171 | 159 |
| 172 #endif // FPDFSDK_PDFWINDOW_PWL_EDIT_H_ | 160 #endif // FPDFSDK_PDFWINDOW_PWL_EDIT_H_ |
| OLD | NEW |