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_FXEDIT_INCLUDE_FXET_EDIT_H_ | 7 #ifndef FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
8 #define FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ | 8 #define FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "core/fpdfdoc/include/cpvt_secprops.h" | 12 #include "core/fpdfdoc/include/cpvt_secprops.h" |
11 #include "core/fpdfdoc/include/cpvt_wordprops.h" | 13 #include "core/fpdfdoc/include/cpvt_wordprops.h" |
12 #include "fpdfsdk/fxedit/include/fx_edit.h" | 14 #include "fpdfsdk/fxedit/include/fx_edit.h" |
13 | 15 |
14 class CFX_Edit; | 16 class CFX_Edit; |
15 class CFX_Edit_Iterator; | 17 class CFX_Edit_Iterator; |
16 class CFX_Edit_Provider; | 18 class CFX_Edit_Provider; |
17 | 19 |
18 #define FX_EDIT_IsFloatZero(f) (f < 0.0001 && f > -0.0001) | 20 #define FX_EDIT_IsFloatZero(f) (f < 0.0001 && f > -0.0001) |
19 #define FX_EDIT_IsFloatEqual(fa, fb) FX_EDIT_IsFloatZero(fa - fb) | 21 #define FX_EDIT_IsFloatEqual(fa, fb) FX_EDIT_IsFloatZero(fa - fb) |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 void SetPageInfo(const CPVT_WordPlace& place); | 722 void SetPageInfo(const CPVT_WordPlace& place); |
721 CPVT_WordPlace SearchPageEndPlace(const CPVT_WordPlace& wpPageBegin, | 723 CPVT_WordPlace SearchPageEndPlace(const CPVT_WordPlace& wpPageBegin, |
722 const CFX_FloatPoint& point) const; | 724 const CFX_FloatPoint& point) const; |
723 FX_FLOAT GetLineTop(const CPVT_WordPlace& place) const; | 725 FX_FLOAT GetLineTop(const CPVT_WordPlace& place) const; |
724 FX_FLOAT GetLineBottom(const CPVT_WordPlace& place) const; | 726 FX_FLOAT GetLineBottom(const CPVT_WordPlace& place) const; |
725 | 727 |
726 private: | 728 private: |
727 CPDF_VariableText* m_pVT; | 729 CPDF_VariableText* m_pVT; |
728 IFX_Edit_Notify* m_pNotify; | 730 IFX_Edit_Notify* m_pNotify; |
729 IFX_Edit_OprNotify* m_pOprNotify; | 731 IFX_Edit_OprNotify* m_pOprNotify; |
730 CFX_Edit_Provider* m_pVTProvide; | 732 std::unique_ptr<CFX_Edit_Provider> m_pVTProvider; |
731 | 733 |
732 CPVT_WordPlace m_wpCaret; | 734 CPVT_WordPlace m_wpCaret; |
733 CPVT_WordPlace m_wpOldCaret; | 735 CPVT_WordPlace m_wpOldCaret; |
734 CFX_Edit_Select m_SelState; | 736 CFX_Edit_Select m_SelState; |
735 | 737 |
736 CFX_FloatPoint m_ptScrollPos; | 738 CFX_FloatPoint m_ptScrollPos; |
737 CFX_FloatPoint m_ptRefreshScrollPos; | 739 CFX_FloatPoint m_ptRefreshScrollPos; |
738 FX_BOOL m_bEnableScroll; | 740 FX_BOOL m_bEnableScroll; |
739 IFX_Edit_Iterator* m_pIterator; | 741 std::unique_ptr<IFX_Edit_Iterator> m_pIterator; |
740 CFX_Edit_Refresh m_Refresh; | 742 CFX_Edit_Refresh m_Refresh; |
741 CFX_FloatPoint m_ptCaret; | 743 CFX_FloatPoint m_ptCaret; |
742 CFX_Edit_Undo m_Undo; | 744 CFX_Edit_Undo m_Undo; |
743 int32_t m_nAlignment; | 745 int32_t m_nAlignment; |
744 FX_BOOL m_bNotifyFlag; | 746 FX_BOOL m_bNotifyFlag; |
745 FX_BOOL m_bEnableOverflow; | 747 FX_BOOL m_bEnableOverflow; |
746 FX_BOOL m_bEnableRefresh; | 748 FX_BOOL m_bEnableRefresh; |
747 CFX_FloatRect m_rcOldContent; | 749 CFX_FloatRect m_rcOldContent; |
748 FX_BOOL m_bEnableUndo; | 750 FX_BOOL m_bEnableUndo; |
749 FX_BOOL m_bNotify; | 751 FX_BOOL m_bNotify; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 int32_t charset, | 795 int32_t charset, |
794 int32_t nFontIndex) override; | 796 int32_t nFontIndex) override; |
795 int32_t GetDefaultFontIndex() override; | 797 int32_t GetDefaultFontIndex() override; |
796 FX_BOOL IsLatinWord(uint16_t word) override; | 798 FX_BOOL IsLatinWord(uint16_t word) override; |
797 | 799 |
798 private: | 800 private: |
799 IPVT_FontMap* m_pFontMap; | 801 IPVT_FontMap* m_pFontMap; |
800 }; | 802 }; |
801 | 803 |
802 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ | 804 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_EDIT_H_ |
OLD | NEW |