Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: fpdfsdk/include/fxedit/fxet_edit.h

Issue 1737593006: Re-land "Replace CPDF_Rect and CPDF_Point with CFX types." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Ooops. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/fxedit/fx_edit.h ('k') | fpdfsdk/include/fxedit/fxet_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INCLUDE_FXEDIT_FXET_EDIT_H_ 7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_
8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ 8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_
9 9
10 #include "core/include/fpdfdoc/fpdf_vt.h" 10 #include "core/include/fpdfdoc/fpdf_vt.h"
(...skipping 23 matching lines...) Expand all
34 EP_SCRIPTTYPE, 34 EP_SCRIPTTYPE,
35 EP_UNDERLINE, 35 EP_UNDERLINE,
36 EP_CROSSOUT, 36 EP_CROSSOUT,
37 EP_CHARSPACE, 37 EP_CHARSPACE,
38 EP_HORZSCALE, 38 EP_HORZSCALE,
39 EP_BOLD, 39 EP_BOLD,
40 EP_ITALIC 40 EP_ITALIC
41 }; 41 };
42 42
43 struct CFX_Edit_LineRect { 43 struct CFX_Edit_LineRect {
44 CFX_Edit_LineRect(const CPVT_WordRange& wrLine, const CPDF_Rect& rcLine) 44 CFX_Edit_LineRect(const CPVT_WordRange& wrLine, const CFX_FloatRect& rcLine)
45 : m_wrLine(wrLine), m_rcLine(rcLine) {} 45 : m_wrLine(wrLine), m_rcLine(rcLine) {}
46 46
47 FX_BOOL operator!=(const CFX_Edit_LineRect& linerect) const { 47 FX_BOOL operator!=(const CFX_Edit_LineRect& linerect) const {
48 return FXSYS_memcmp(this, &linerect, sizeof(CFX_Edit_LineRect)) != 0; 48 return FXSYS_memcmp(this, &linerect, sizeof(CFX_Edit_LineRect)) != 0;
49 } 49 }
50 50
51 FX_BOOL IsSameHeight(const CFX_Edit_LineRect& linerect) const { 51 FX_BOOL IsSameHeight(const CFX_Edit_LineRect& linerect) const {
52 return FX_EDIT_IsFloatZero( 52 return FX_EDIT_IsFloatZero(
53 (m_rcLine.top - m_rcLine.bottom) - 53 (m_rcLine.top - m_rcLine.bottom) -
54 (linerect.m_rcLine.top - linerect.m_rcLine.bottom)); 54 (linerect.m_rcLine.top - linerect.m_rcLine.bottom));
55 } 55 }
56 56
57 FX_BOOL IsSameTop(const CFX_Edit_LineRect& linerect) const { 57 FX_BOOL IsSameTop(const CFX_Edit_LineRect& linerect) const {
58 return FX_EDIT_IsFloatZero(m_rcLine.top - linerect.m_rcLine.top); 58 return FX_EDIT_IsFloatZero(m_rcLine.top - linerect.m_rcLine.top);
59 } 59 }
60 60
61 FX_BOOL IsSameLeft(const CFX_Edit_LineRect& linerect) const { 61 FX_BOOL IsSameLeft(const CFX_Edit_LineRect& linerect) const {
62 return FX_EDIT_IsFloatZero(m_rcLine.left - linerect.m_rcLine.left); 62 return FX_EDIT_IsFloatZero(m_rcLine.left - linerect.m_rcLine.left);
63 } 63 }
64 64
65 FX_BOOL IsSameRight(const CFX_Edit_LineRect& linerect) const { 65 FX_BOOL IsSameRight(const CFX_Edit_LineRect& linerect) const {
66 return FX_EDIT_IsFloatZero(m_rcLine.right - linerect.m_rcLine.right); 66 return FX_EDIT_IsFloatZero(m_rcLine.right - linerect.m_rcLine.right);
67 } 67 }
68 68
69 CPVT_WordRange m_wrLine; 69 CPVT_WordRange m_wrLine;
70 CPDF_Rect m_rcLine; 70 CFX_FloatRect m_rcLine;
71 }; 71 };
72 72
73 class CFX_Edit_LineRectArray { 73 class CFX_Edit_LineRectArray {
74 public: 74 public:
75 CFX_Edit_LineRectArray() {} 75 CFX_Edit_LineRectArray() {}
76 76
77 virtual ~CFX_Edit_LineRectArray() { Empty(); } 77 virtual ~CFX_Edit_LineRectArray() { Empty(); }
78 78
79 void Empty() { 79 void Empty() {
80 for (int32_t i = 0, sz = m_LineRects.GetSize(); i < sz; i++) 80 for (int32_t i = 0, sz = m_LineRects.GetSize(); i < sz; i++)
81 delete m_LineRects.GetAt(i); 81 delete m_LineRects.GetAt(i);
82 82
83 m_LineRects.RemoveAll(); 83 m_LineRects.RemoveAll();
84 } 84 }
85 85
86 void RemoveAll() { m_LineRects.RemoveAll(); } 86 void RemoveAll() { m_LineRects.RemoveAll(); }
87 87
88 void operator=(CFX_Edit_LineRectArray& rects) { 88 void operator=(CFX_Edit_LineRectArray& rects) {
89 Empty(); 89 Empty();
90 for (int32_t i = 0, sz = rects.GetSize(); i < sz; i++) 90 for (int32_t i = 0, sz = rects.GetSize(); i < sz; i++)
91 m_LineRects.Add(rects.GetAt(i)); 91 m_LineRects.Add(rects.GetAt(i));
92 92
93 rects.RemoveAll(); 93 rects.RemoveAll();
94 } 94 }
95 95
96 void Add(const CPVT_WordRange& wrLine, const CPDF_Rect& rcLine) { 96 void Add(const CPVT_WordRange& wrLine, const CFX_FloatRect& rcLine) {
97 m_LineRects.Add(new CFX_Edit_LineRect(wrLine, rcLine)); 97 m_LineRects.Add(new CFX_Edit_LineRect(wrLine, rcLine));
98 } 98 }
99 99
100 int32_t GetSize() const { return m_LineRects.GetSize(); } 100 int32_t GetSize() const { return m_LineRects.GetSize(); }
101 101
102 CFX_Edit_LineRect* GetAt(int32_t nIndex) const { 102 CFX_Edit_LineRect* GetAt(int32_t nIndex) const {
103 if (nIndex < 0 || nIndex >= m_LineRects.GetSize()) 103 if (nIndex < 0 || nIndex >= m_LineRects.GetSize())
104 return NULL; 104 return NULL;
105 105
106 return m_LineRects.GetAt(nIndex); 106 return m_LineRects.GetAt(nIndex);
107 } 107 }
108 108
109 CFX_ArrayTemplate<CFX_Edit_LineRect*> m_LineRects; 109 CFX_ArrayTemplate<CFX_Edit_LineRect*> m_LineRects;
110 }; 110 };
111 111
112 class CFX_Edit_RectArray { 112 class CFX_Edit_RectArray {
113 public: 113 public:
114 CFX_Edit_RectArray() {} 114 CFX_Edit_RectArray() {}
115 115
116 virtual ~CFX_Edit_RectArray() { Empty(); } 116 virtual ~CFX_Edit_RectArray() { Empty(); }
117 117
118 void Empty() { 118 void Empty() {
119 for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) 119 for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++)
120 delete m_Rects.GetAt(i); 120 delete m_Rects.GetAt(i);
121 121
122 m_Rects.RemoveAll(); 122 m_Rects.RemoveAll();
123 } 123 }
124 124
125 void Add(const CPDF_Rect& rect) { 125 void Add(const CFX_FloatRect& rect) {
126 // check for overlapped area 126 // check for overlapped area
127 for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) { 127 for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) {
128 CPDF_Rect* pRect = m_Rects.GetAt(i); 128 CFX_FloatRect* pRect = m_Rects.GetAt(i);
129 if (pRect && pRect->Contains(rect)) 129 if (pRect && pRect->Contains(rect))
130 return; 130 return;
131 } 131 }
132 132
133 m_Rects.Add(new CPDF_Rect(rect)); 133 m_Rects.Add(new CFX_FloatRect(rect));
134 } 134 }
135 135
136 int32_t GetSize() const { return m_Rects.GetSize(); } 136 int32_t GetSize() const { return m_Rects.GetSize(); }
137 137
138 CPDF_Rect* GetAt(int32_t nIndex) const { 138 CFX_FloatRect* GetAt(int32_t nIndex) const {
139 if (nIndex < 0 || nIndex >= m_Rects.GetSize()) 139 if (nIndex < 0 || nIndex >= m_Rects.GetSize())
140 return NULL; 140 return NULL;
141 141
142 return m_Rects.GetAt(nIndex); 142 return m_Rects.GetAt(nIndex);
143 } 143 }
144 144
145 CFX_ArrayTemplate<CPDF_Rect*> m_Rects; 145 CFX_ArrayTemplate<CFX_FloatRect*> m_Rects;
146 }; 146 };
147 147
148 class CFX_Edit_Refresh { 148 class CFX_Edit_Refresh {
149 public: 149 public:
150 CFX_Edit_Refresh(); 150 CFX_Edit_Refresh();
151 virtual ~CFX_Edit_Refresh(); 151 virtual ~CFX_Edit_Refresh();
152 152
153 void BeginRefresh(); 153 void BeginRefresh();
154 void Push(const CPVT_WordRange& linerange, const CPDF_Rect& rect); 154 void Push(const CPVT_WordRange& linerange, const CFX_FloatRect& rect);
155 void NoAnalyse(); 155 void NoAnalyse();
156 void Analyse(int32_t nAlignment); 156 void Analyse(int32_t nAlignment);
157 void AddRefresh(const CPDF_Rect& rect); 157 void AddRefresh(const CFX_FloatRect& rect);
158 const CFX_Edit_RectArray* GetRefreshRects() const; 158 const CFX_Edit_RectArray* GetRefreshRects() const;
159 void EndRefresh(); 159 void EndRefresh();
160 160
161 private: 161 private:
162 CFX_Edit_LineRectArray m_NewLineRects; 162 CFX_Edit_LineRectArray m_NewLineRects;
163 CFX_Edit_LineRectArray m_OldLineRects; 163 CFX_Edit_LineRectArray m_OldLineRects;
164 CFX_Edit_RectArray m_RefreshRects; 164 CFX_Edit_RectArray m_RefreshRects;
165 }; 165 };
166 166
167 /* ------------------------- CFX_Edit_Select ---------------------------- */ 167 /* ------------------------- CFX_Edit_Select ---------------------------- */
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 // IFX_Edit 527 // IFX_Edit
528 void SetFontMap(IFX_Edit_FontMap* pFontMap) override; 528 void SetFontMap(IFX_Edit_FontMap* pFontMap) override;
529 void SetVTProvider(IPDF_VariableText_Provider* pProvider) override; 529 void SetVTProvider(IPDF_VariableText_Provider* pProvider) override;
530 void SetNotify(IFX_Edit_Notify* pNotify) override; 530 void SetNotify(IFX_Edit_Notify* pNotify) override;
531 void SetOprNotify(IFX_Edit_OprNotify* pOprNotify) override; 531 void SetOprNotify(IFX_Edit_OprNotify* pOprNotify) override;
532 IFX_Edit_Iterator* GetIterator() override; 532 IFX_Edit_Iterator* GetIterator() override;
533 IPDF_VariableText* GetVariableText() override; 533 IPDF_VariableText* GetVariableText() override;
534 IFX_Edit_FontMap* GetFontMap() override; 534 IFX_Edit_FontMap* GetFontMap() override;
535 void Initialize() override; 535 void Initialize() override;
536 void SetPlateRect(const CPDF_Rect& rect, FX_BOOL bPaint = TRUE) override; 536 void SetPlateRect(const CFX_FloatRect& rect, FX_BOOL bPaint = TRUE) override;
537 void SetScrollPos(const CPDF_Point& point) override; 537 void SetScrollPos(const CFX_FloatPoint& point) override;
538 void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override; 538 void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override;
539 void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override; 539 void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override;
540 void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) override; 540 void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) override;
541 void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) override; 541 void SetLimitChar(int32_t nLimitChar = 0, FX_BOOL bPaint = TRUE) override;
542 void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) override; 542 void SetCharArray(int32_t nCharArray = 0, FX_BOOL bPaint = TRUE) override;
543 void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) override; 543 void SetCharSpace(FX_FLOAT fCharSpace = 0.0f, FX_BOOL bPaint = TRUE) override;
544 void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) override; 544 void SetHorzScale(int32_t nHorzScale = 100, FX_BOOL bPaint = TRUE) override;
545 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) override; 545 void SetLineLeading(FX_FLOAT fLineLeading, FX_BOOL bPaint = TRUE) override;
546 void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) override; 546 void SetMultiLine(FX_BOOL bMultiLine = TRUE, FX_BOOL bPaint = TRUE) override;
547 void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) override; 547 void SetAutoReturn(FX_BOOL bAuto = TRUE, FX_BOOL bPaint = TRUE) override;
(...skipping 10 matching lines...) Expand all
558 FX_BOOL SetRichTextScript(int32_t nScriptType) override; 558 FX_BOOL SetRichTextScript(int32_t nScriptType) override;
559 FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) override; 559 FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) override;
560 FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE) override; 560 FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE) override;
561 FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE) override; 561 FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE) override;
562 FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE) override; 562 FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE) override;
563 FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) override; 563 FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) override;
564 FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) override; 564 FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) override;
565 FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) override; 565 FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) override;
566 FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) override; 566 FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) override;
567 FX_BOOL SetRichTextAlignment(int32_t nAlignment) override; 567 FX_BOOL SetRichTextAlignment(int32_t nAlignment) override;
568 void OnMouseDown(const CPDF_Point& point, 568 void OnMouseDown(const CFX_FloatPoint& point,
569 FX_BOOL bShift, 569 FX_BOOL bShift,
570 FX_BOOL bCtrl) override; 570 FX_BOOL bCtrl) override;
571 void OnMouseMove(const CPDF_Point& point, 571 void OnMouseMove(const CFX_FloatPoint& point,
572 FX_BOOL bShift, 572 FX_BOOL bShift,
573 FX_BOOL bCtrl) override; 573 FX_BOOL bCtrl) override;
574 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override; 574 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override;
575 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl) override; 575 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl) override;
576 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; 576 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override;
577 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; 577 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override;
578 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; 578 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override;
579 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; 579 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override;
580 void SetText(const FX_WCHAR* text, 580 void SetText(const FX_WCHAR* text,
581 int32_t charset = DEFAULT_CHARSET, 581 int32_t charset = DEFAULT_CHARSET,
(...skipping 13 matching lines...) Expand all
595 const CPVT_WordProps* pWordProps = NULL) override; 595 const CPVT_WordProps* pWordProps = NULL) override;
596 FX_BOOL Redo() override; 596 FX_BOOL Redo() override;
597 FX_BOOL Undo() override; 597 FX_BOOL Undo() override;
598 int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const override; 598 int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const override;
599 CPVT_WordPlace WordIndexToWordPlace(int32_t index) const override; 599 CPVT_WordPlace WordIndexToWordPlace(int32_t index) const override;
600 CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const override; 600 CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const override;
601 CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const override; 601 CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const override;
602 CPVT_WordPlace GetSectionBeginPlace( 602 CPVT_WordPlace GetSectionBeginPlace(
603 const CPVT_WordPlace& place) const override; 603 const CPVT_WordPlace& place) const override;
604 CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const override; 604 CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const override;
605 CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const override; 605 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const override;
606 int32_t GetCaret() const override; 606 int32_t GetCaret() const override;
607 CPVT_WordPlace GetCaretWordPlace() const override; 607 CPVT_WordPlace GetCaretWordPlace() const override;
608 CFX_WideString GetSelText() const override; 608 CFX_WideString GetSelText() const override;
609 CFX_WideString GetText() const override; 609 CFX_WideString GetText() const override;
610 FX_FLOAT GetFontSize() const override; 610 FX_FLOAT GetFontSize() const override;
611 FX_WORD GetPasswordChar() const override; 611 FX_WORD GetPasswordChar() const override;
612 CPDF_Point GetScrollPos() const override; 612 CFX_FloatPoint GetScrollPos() const override;
613 int32_t GetCharArray() const override; 613 int32_t GetCharArray() const override;
614 CPDF_Rect GetPlateRect() const override; 614 CFX_FloatRect GetPlateRect() const override;
615 CPDF_Rect GetContentRect() const override; 615 CFX_FloatRect GetContentRect() const override;
616 CFX_WideString GetRangeText(const CPVT_WordRange& range) const override; 616 CFX_WideString GetRangeText(const CPVT_WordRange& range) const override;
617 int32_t GetHorzScale() const override; 617 int32_t GetHorzScale() const override;
618 FX_FLOAT GetCharSpace() const override; 618 FX_FLOAT GetCharSpace() const override;
619 int32_t GetTotalWords() const override; 619 int32_t GetTotalWords() const override;
620 void SetSel(int32_t nStartChar, int32_t nEndChar) override; 620 void SetSel(int32_t nStartChar, int32_t nEndChar) override;
621 void GetSel(int32_t& nStartChar, int32_t& nEndChar) const override; 621 void GetSel(int32_t& nStartChar, int32_t& nEndChar) const override;
622 void SelectAll() override; 622 void SelectAll() override;
623 void SelectNone() override; 623 void SelectNone() override;
624 FX_BOOL IsSelected() const override; 624 FX_BOOL IsSelected() const override;
625 void Paint() override; 625 void Paint() override;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 FX_BOOL bAddUndo); 697 FX_BOOL bAddUndo);
698 FX_BOOL SetWordProps(EDIT_PROPS_E eProps, 698 FX_BOOL SetWordProps(EDIT_PROPS_E eProps,
699 const CPVT_WordPlace& place, 699 const CPVT_WordPlace& place,
700 const CPVT_WordProps* pWordProps, 700 const CPVT_WordProps* pWordProps,
701 const CPVT_WordRange& wr, 701 const CPVT_WordRange& wr,
702 FX_BOOL bAddUndo); 702 FX_BOOL bAddUndo);
703 void PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange& wr); 703 void PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange& wr);
704 void PaintInsertText(const CPVT_WordPlace& wpOld, 704 void PaintInsertText(const CPVT_WordPlace& wpOld,
705 const CPVT_WordPlace& wpNew); 705 const CPVT_WordPlace& wpNew);
706 706
707 inline CPDF_Point VTToEdit(const CPDF_Point& point) const; 707 inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const;
708 inline CPDF_Point EditToVT(const CPDF_Point& point) const; 708 inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const;
709 inline CPDF_Rect VTToEdit(const CPDF_Rect& rect) const; 709 inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const;
710 inline CPDF_Rect EditToVT(const CPDF_Rect& rect) const; 710 inline CFX_FloatRect EditToVT(const CFX_FloatRect& rect) const;
711 711
712 void Refresh(REFRESH_PLAN_E ePlan, 712 void Refresh(REFRESH_PLAN_E ePlan,
713 const CPVT_WordRange* pRange1 = NULL, 713 const CPVT_WordRange* pRange1 = NULL,
714 const CPVT_WordRange* pRange2 = NULL); 714 const CPVT_WordRange* pRange2 = NULL);
715 void RefreshPushLineRects(const CPVT_WordRange& wr); 715 void RefreshPushLineRects(const CPVT_WordRange& wr);
716 void RefreshPushRandomRects(const CPVT_WordRange& wr); 716 void RefreshPushRandomRects(const CPVT_WordRange& wr);
717 717
718 void SetCaret(const CPVT_WordPlace& place); 718 void SetCaret(const CPVT_WordPlace& place);
719 void SetCaretInfo(); 719 void SetCaretInfo();
720 void SetCaretOrigin(); 720 void SetCaretOrigin();
721 void SetCaretChange(); 721 void SetCaretChange();
722 722
723 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const; 723 CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const;
724 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1, 724 CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1,
725 const CPVT_WordRange& wr2); 725 const CPVT_WordRange& wr2);
726 726
727 727
728 void BeginGroupUndo(const CFX_WideString& sTitle); 728 void BeginGroupUndo(const CFX_WideString& sTitle);
729 void EndGroupUndo(); 729 void EndGroupUndo();
730 void AddEditUndoItem(CFX_Edit_UndoItem* pEditUndoItem); 730 void AddEditUndoItem(CFX_Edit_UndoItem* pEditUndoItem);
731 731
732 void SetPageInfo(const CPVT_WordPlace& place); 732 void SetPageInfo(const CPVT_WordPlace& place);
733 CPVT_WordPlace SearchPageEndPlace(const CPVT_WordPlace& wpPageBegin, 733 CPVT_WordPlace SearchPageEndPlace(const CPVT_WordPlace& wpPageBegin,
734 const CPDF_Point& point) const; 734 const CFX_FloatPoint& point) const;
735 FX_FLOAT GetLineTop(const CPVT_WordPlace& place) const; 735 FX_FLOAT GetLineTop(const CPVT_WordPlace& place) const;
736 FX_FLOAT GetLineBottom(const CPVT_WordPlace& place) const; 736 FX_FLOAT GetLineBottom(const CPVT_WordPlace& place) const;
737 737
738 private: 738 private:
739 IPDF_VariableText* m_pVT; 739 IPDF_VariableText* m_pVT;
740 IFX_Edit_Notify* m_pNotify; 740 IFX_Edit_Notify* m_pNotify;
741 IFX_Edit_OprNotify* m_pOprNotify; 741 IFX_Edit_OprNotify* m_pOprNotify;
742 CFX_Edit_Provider* m_pVTProvide; 742 CFX_Edit_Provider* m_pVTProvide;
743 743
744 CPVT_WordPlace m_wpCaret; 744 CPVT_WordPlace m_wpCaret;
745 CPVT_WordPlace m_wpOldCaret; 745 CPVT_WordPlace m_wpOldCaret;
746 CFX_Edit_Select m_SelState; 746 CFX_Edit_Select m_SelState;
747 747
748 CPDF_Point m_ptScrollPos; 748 CFX_FloatPoint m_ptScrollPos;
749 CPDF_Point m_ptRefreshScrollPos; 749 CFX_FloatPoint m_ptRefreshScrollPos;
750 FX_BOOL m_bEnableScroll; 750 FX_BOOL m_bEnableScroll;
751 IFX_Edit_Iterator* m_pIterator; 751 IFX_Edit_Iterator* m_pIterator;
752 CFX_Edit_Refresh m_Refresh; 752 CFX_Edit_Refresh m_Refresh;
753 CPDF_Point m_ptCaret; 753 CFX_FloatPoint m_ptCaret;
754 CFX_Edit_Undo m_Undo; 754 CFX_Edit_Undo m_Undo;
755 int32_t m_nAlignment; 755 int32_t m_nAlignment;
756 FX_BOOL m_bNotifyFlag; 756 FX_BOOL m_bNotifyFlag;
757 FX_BOOL m_bEnableOverflow; 757 FX_BOOL m_bEnableOverflow;
758 FX_BOOL m_bEnableRefresh; 758 FX_BOOL m_bEnableRefresh;
759 CPDF_Rect m_rcOldContent; 759 CFX_FloatRect m_rcOldContent;
760 FX_BOOL m_bEnableUndo; 760 FX_BOOL m_bEnableUndo;
761 FX_BOOL m_bNotify; 761 FX_BOOL m_bNotify;
762 FX_BOOL m_bOprNotify; 762 FX_BOOL m_bOprNotify;
763 CFX_Edit_GroupUndoItem* m_pGroupUndoItem; 763 CFX_Edit_GroupUndoItem* m_pGroupUndoItem;
764 }; 764 };
765 765
766 /* ------------------------- CFX_Edit_Iterator ---------------------------- */ 766 /* ------------------------- CFX_Edit_Iterator ---------------------------- */
767 767
768 class CFX_Edit_Iterator : public IFX_Edit_Iterator { 768 class CFX_Edit_Iterator : public IFX_Edit_Iterator {
769 public: 769 public:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 int32_t charset, 807 int32_t charset,
808 int32_t nFontIndex) override; 808 int32_t nFontIndex) override;
809 int32_t GetDefaultFontIndex() override; 809 int32_t GetDefaultFontIndex() override;
810 FX_BOOL IsLatinWord(FX_WORD word) override; 810 FX_BOOL IsLatinWord(FX_WORD word) override;
811 811
812 private: 812 private:
813 IFX_Edit_FontMap* m_pFontMap; 813 IFX_Edit_FontMap* m_pFontMap;
814 }; 814 };
815 815
816 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_ 816 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_EDIT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fxedit/fx_edit.h ('k') | fpdfsdk/include/fxedit/fxet_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698