| 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" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; | 63 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; |
| 64 FX_BOOL OnMouseWheel(short zDelta, | 64 FX_BOOL OnMouseWheel(short zDelta, |
| 65 const CFX_FloatPoint& point, | 65 const CFX_FloatPoint& point, |
| 66 uint32_t nFlag) override; | 66 uint32_t nFlag) override; |
| 67 FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; | 67 FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; |
| 68 FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; | 68 FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; |
| 69 CFX_FloatRect GetFocusRect() const override; | 69 CFX_FloatRect GetFocusRect() const override; |
| 70 void OnSetFocus() override; | 70 void OnSetFocus() override; |
| 71 void OnKillFocus() override; | 71 void OnKillFocus() override; |
| 72 | 72 |
| 73 void SetAlignFormatH(PWL_EDIT_ALIGNFORMAT_H nFormat = PEAH_LEFT, | |
| 74 FX_BOOL bPaint = TRUE); // 0:left 1:right 2:middle | |
| 75 void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, | 73 void SetAlignFormatV(PWL_EDIT_ALIGNFORMAT_V nFormat = PEAV_TOP, |
| 76 FX_BOOL bPaint = TRUE); // 0:top 1:bottom 2:center | 74 FX_BOOL bPaint = TRUE); // 0:top 1:bottom 2:center |
| 77 | 75 |
| 78 void SetCharArray(int32_t nCharArray); | 76 void SetCharArray(int32_t nCharArray); |
| 79 void SetLimitChar(int32_t nLimitChar); | 77 void SetLimitChar(int32_t nLimitChar); |
| 80 | 78 |
| 81 void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE); | 79 void SetHorzScale(int32_t nHorzScale, FX_BOOL bPaint = TRUE); |
| 82 void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE); | 80 void SetCharSpace(FX_FLOAT fCharSpace, FX_BOOL bPaint = TRUE); |
| 83 | 81 |
| 84 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); | 82 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 117 |
| 120 void OnInsertWord(const CPVT_WordPlace& place, | 118 void OnInsertWord(const CPVT_WordPlace& place, |
| 121 const CPVT_WordPlace& oldplace); | 119 const CPVT_WordPlace& oldplace); |
| 122 void OnInsertReturn(const CPVT_WordPlace& place, | 120 void OnInsertReturn(const CPVT_WordPlace& place, |
| 123 const CPVT_WordPlace& oldplace); | 121 const CPVT_WordPlace& oldplace); |
| 124 void OnBackSpace(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); | 122 void OnBackSpace(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); |
| 125 void OnDelete(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); | 123 void OnDelete(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); |
| 126 void OnClear(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); | 124 void OnClear(const CPVT_WordPlace& place, const CPVT_WordPlace& oldplace); |
| 127 void OnInsertText(const CPVT_WordPlace& place, | 125 void OnInsertText(const CPVT_WordPlace& place, |
| 128 const CPVT_WordPlace& oldplace); | 126 const CPVT_WordPlace& oldplace); |
| 129 void OnAddUndo(IFX_Edit_UndoItem* pUndoItem); | |
| 130 | 127 |
| 131 private: | 128 private: |
| 132 CPVT_WordRange GetSelectWordRange() const; | 129 CPVT_WordRange GetSelectWordRange() const; |
| 133 virtual void ShowVScrollBar(FX_BOOL bShow); | 130 virtual void ShowVScrollBar(FX_BOOL bShow); |
| 134 FX_BOOL IsVScrollBarVisible() const; | 131 FX_BOOL IsVScrollBarVisible() const; |
| 135 void SetParamByFlag(); | 132 void SetParamByFlag(); |
| 136 | 133 |
| 137 FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray); | 134 FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray); |
| 138 CFX_FloatPoint GetWordRightBottomPoint(const CPVT_WordPlace& wpWord); | 135 CFX_FloatPoint GetWordRightBottomPoint(const CPVT_WordPlace& wpWord); |
| 139 | 136 |
| 140 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, | 137 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, |
| 141 const CPVT_WordRange& wr2); | 138 const CPVT_WordRange& wr2); |
| 142 CPVT_WordRange GetLatinWordsRange(const CFX_FloatPoint& point) const; | 139 CPVT_WordRange GetLatinWordsRange(const CFX_FloatPoint& point) const; |
| 143 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; | 140 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; |
| 144 CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace& place) const; | 141 CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace& place) const; |
| 145 CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace& place, | 142 CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace& place, |
| 146 FX_BOOL bLatin, | 143 FX_BOOL bLatin, |
| 147 FX_BOOL bArabic) const; | 144 FX_BOOL bArabic) const; |
| 148 IPWL_Filler_Notify* m_pFillerNotify; | 145 IPWL_Filler_Notify* m_pFillerNotify; |
| 149 FX_BOOL m_bFocus; | 146 FX_BOOL m_bFocus; |
| 150 CFX_FloatRect m_rcOldWindow; | 147 CFX_FloatRect m_rcOldWindow; |
| 151 void* m_pFormFiller; | 148 void* m_pFormFiller; |
| 152 }; | 149 }; |
| 153 | 150 |
| 154 #endif // FPDFSDK_PDFWINDOW_PWL_EDIT_H_ | 151 #endif // FPDFSDK_PDFWINDOW_PWL_EDIT_H_ |
| OLD | NEW |