diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-26 14:24:28 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-26 14:24:28 -0800 |
commit | 281a9eadff15b167e2ee3032e21b83190ad49125 (patch) | |
tree | f02f7d0842f59d8e69bda011b3e62547ffb1acde /fpdfsdk/include/fxedit/fxet_edit.h | |
parent | 566b974287ce0e81a963138152b8898f22480f52 (diff) | |
download | pdfium-281a9eadff15b167e2ee3032e21b83190ad49125.tar.xz |
Re-land "Replace CPDF_Rect and CPDF_Point with CFX types."
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1737593006 .
Diffstat (limited to 'fpdfsdk/include/fxedit/fxet_edit.h')
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_edit.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h index d1df3812fc..9809ac9f7d 100644 --- a/fpdfsdk/include/fxedit/fxet_edit.h +++ b/fpdfsdk/include/fxedit/fxet_edit.h @@ -41,7 +41,7 @@ enum EDIT_PROPS_E { }; struct CFX_Edit_LineRect { - CFX_Edit_LineRect(const CPVT_WordRange& wrLine, const CPDF_Rect& rcLine) + CFX_Edit_LineRect(const CPVT_WordRange& wrLine, const CFX_FloatRect& rcLine) : m_wrLine(wrLine), m_rcLine(rcLine) {} FX_BOOL operator!=(const CFX_Edit_LineRect& linerect) const { @@ -67,7 +67,7 @@ struct CFX_Edit_LineRect { } CPVT_WordRange m_wrLine; - CPDF_Rect m_rcLine; + CFX_FloatRect m_rcLine; }; class CFX_Edit_LineRectArray { @@ -93,7 +93,7 @@ class CFX_Edit_LineRectArray { rects.RemoveAll(); } - void Add(const CPVT_WordRange& wrLine, const CPDF_Rect& rcLine) { + void Add(const CPVT_WordRange& wrLine, const CFX_FloatRect& rcLine) { m_LineRects.Add(new CFX_Edit_LineRect(wrLine, rcLine)); } @@ -122,27 +122,27 @@ class CFX_Edit_RectArray { m_Rects.RemoveAll(); } - void Add(const CPDF_Rect& rect) { + void Add(const CFX_FloatRect& rect) { // check for overlapped area for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) { - CPDF_Rect* pRect = m_Rects.GetAt(i); + CFX_FloatRect* pRect = m_Rects.GetAt(i); if (pRect && pRect->Contains(rect)) return; } - m_Rects.Add(new CPDF_Rect(rect)); + m_Rects.Add(new CFX_FloatRect(rect)); } int32_t GetSize() const { return m_Rects.GetSize(); } - CPDF_Rect* GetAt(int32_t nIndex) const { + CFX_FloatRect* GetAt(int32_t nIndex) const { if (nIndex < 0 || nIndex >= m_Rects.GetSize()) return NULL; return m_Rects.GetAt(nIndex); } - CFX_ArrayTemplate<CPDF_Rect*> m_Rects; + CFX_ArrayTemplate<CFX_FloatRect*> m_Rects; }; class CFX_Edit_Refresh { @@ -151,10 +151,10 @@ class CFX_Edit_Refresh { virtual ~CFX_Edit_Refresh(); void BeginRefresh(); - void Push(const CPVT_WordRange& linerange, const CPDF_Rect& rect); + void Push(const CPVT_WordRange& linerange, const CFX_FloatRect& rect); void NoAnalyse(); void Analyse(int32_t nAlignment); - void AddRefresh(const CPDF_Rect& rect); + void AddRefresh(const CFX_FloatRect& rect); const CFX_Edit_RectArray* GetRefreshRects() const; void EndRefresh(); @@ -533,8 +533,8 @@ class CFX_Edit : public IFX_Edit { IPDF_VariableText* GetVariableText() override; IFX_Edit_FontMap* GetFontMap() override; void Initialize() override; - void SetPlateRect(const CPDF_Rect& rect, FX_BOOL bPaint = TRUE) override; - void SetScrollPos(const CPDF_Point& point) override; + void SetPlateRect(const CFX_FloatRect& rect, FX_BOOL bPaint = TRUE) override; + void SetScrollPos(const CFX_FloatPoint& point) override; void SetAlignmentH(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override; void SetAlignmentV(int32_t nFormat = 0, FX_BOOL bPaint = TRUE) override; void SetPasswordChar(FX_WORD wSubWord = '*', FX_BOOL bPaint = TRUE) override; @@ -565,10 +565,10 @@ class CFX_Edit : public IFX_Edit { FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) override; FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) override; FX_BOOL SetRichTextAlignment(int32_t nAlignment) override; - void OnMouseDown(const CPDF_Point& point, + void OnMouseDown(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl) override; - void OnMouseMove(const CPDF_Point& point, + void OnMouseMove(const CFX_FloatPoint& point, FX_BOOL bShift, FX_BOOL bCtrl) override; void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override; @@ -602,17 +602,17 @@ class CFX_Edit : public IFX_Edit { CPVT_WordPlace GetSectionBeginPlace( const CPVT_WordPlace& place) const override; CPVT_WordPlace GetSectionEndPlace(const CPVT_WordPlace& place) const override; - CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const override; + CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const override; int32_t GetCaret() const override; CPVT_WordPlace GetCaretWordPlace() const override; CFX_WideString GetSelText() const override; CFX_WideString GetText() const override; FX_FLOAT GetFontSize() const override; FX_WORD GetPasswordChar() const override; - CPDF_Point GetScrollPos() const override; + CFX_FloatPoint GetScrollPos() const override; int32_t GetCharArray() const override; - CPDF_Rect GetPlateRect() const override; - CPDF_Rect GetContentRect() const override; + CFX_FloatRect GetPlateRect() const override; + CFX_FloatRect GetContentRect() const override; CFX_WideString GetRangeText(const CPVT_WordRange& range) const override; int32_t GetHorzScale() const override; FX_FLOAT GetCharSpace() const override; @@ -704,10 +704,10 @@ class CFX_Edit : public IFX_Edit { void PaintInsertText(const CPVT_WordPlace& wpOld, const CPVT_WordPlace& wpNew); - inline CPDF_Point VTToEdit(const CPDF_Point& point) const; - inline CPDF_Point EditToVT(const CPDF_Point& point) const; - inline CPDF_Rect VTToEdit(const CPDF_Rect& rect) const; - inline CPDF_Rect EditToVT(const CPDF_Rect& rect) const; + inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const; + inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const; + inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const; + inline CFX_FloatRect EditToVT(const CFX_FloatRect& rect) const; void Refresh(REFRESH_PLAN_E ePlan, const CPVT_WordRange* pRange1 = NULL, @@ -731,7 +731,7 @@ class CFX_Edit : public IFX_Edit { void SetPageInfo(const CPVT_WordPlace& place); CPVT_WordPlace SearchPageEndPlace(const CPVT_WordPlace& wpPageBegin, - const CPDF_Point& point) const; + const CFX_FloatPoint& point) const; FX_FLOAT GetLineTop(const CPVT_WordPlace& place) const; FX_FLOAT GetLineBottom(const CPVT_WordPlace& place) const; @@ -745,18 +745,18 @@ class CFX_Edit : public IFX_Edit { CPVT_WordPlace m_wpOldCaret; CFX_Edit_Select m_SelState; - CPDF_Point m_ptScrollPos; - CPDF_Point m_ptRefreshScrollPos; + CFX_FloatPoint m_ptScrollPos; + CFX_FloatPoint m_ptRefreshScrollPos; FX_BOOL m_bEnableScroll; IFX_Edit_Iterator* m_pIterator; CFX_Edit_Refresh m_Refresh; - CPDF_Point m_ptCaret; + CFX_FloatPoint m_ptCaret; CFX_Edit_Undo m_Undo; int32_t m_nAlignment; FX_BOOL m_bNotifyFlag; FX_BOOL m_bEnableOverflow; FX_BOOL m_bEnableRefresh; - CPDF_Rect m_rcOldContent; + CFX_FloatRect m_rcOldContent; FX_BOOL m_bEnableUndo; FX_BOOL m_bNotify; FX_BOOL m_bOprNotify; |