diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-14 11:52:07 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-14 18:12:34 +0000 |
commit | f528eee136a602643a7777d87a2cce52cf83f38a (patch) | |
tree | 94643b8f0b26a8cd61437db4b9867b9a60a00ef8 /fpdfsdk/fxedit/fxet_edit.h | |
parent | 22da8c268d2228203b40a8c73a2d3f6c25fc9acc (diff) | |
download | pdfium-f528eee136a602643a7777d87a2cce52cf83f38a.tar.xz |
Reland "Convert CFX_FloatPoint to CFX_PointF"
This CL updates the CFX_FloatPoint Cl to accommodate for the Origin CL being
reverted.
Change-Id: I345fe1117938a49ad9ee5f310fe7b5e21d9f1948
Reviewed-on: https://pdfium-review.googlesource.com/2697
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.h')
-rw-r--r-- | fpdfsdk/fxedit/fxet_edit.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.h b/fpdfsdk/fxedit/fxet_edit.h index 9c3e826ecb..c8caeb9844 100644 --- a/fpdfsdk/fxedit/fxet_edit.h +++ b/fpdfsdk/fxedit/fxet_edit.h @@ -313,21 +313,20 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem { class CFX_Edit { public: static CFX_ByteString GetEditAppearanceStream(CFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, + const CFX_PointF& ptOffset, const CPVT_WordRange* pRange, bool bContinuous, uint16_t SubWord); - static CFX_ByteString GetSelectAppearanceStream( - CFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, - const CPVT_WordRange* pRange); + static CFX_ByteString GetSelectAppearanceStream(CFX_Edit* pEdit, + const CFX_PointF& ptOffset, + const CPVT_WordRange* pRange); static void DrawEdit(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, CFX_Edit* pEdit, FX_COLORREF crTextFill, FX_COLORREF crTextStroke, const CFX_FloatRect& rcClip, - const CFX_FloatPoint& ptOffset, + const CFX_PointF& ptOffset, const CPVT_WordRange* pRange, CFX_SystemHandler* pSystemHandler, CFFL_FormFiller* pFFLData); @@ -346,7 +345,7 @@ class CFX_Edit { // Set the bounding box of the text area. void SetPlateRect(const CFX_FloatRect& rect); - void SetScrollPos(const CFX_FloatPoint& point); + void SetScrollPos(const CFX_PointF& point); // Set the horizontal text alignment. (nFormat [0:left, 1:middle, 2:right]) void SetAlignmentH(int32_t nFormat, bool bPaint); @@ -366,8 +365,8 @@ class CFX_Edit { void SetAutoScroll(bool bAuto, bool bPaint); void SetFontSize(FX_FLOAT fFontSize); void SetTextOverflow(bool bAllowed, bool bPaint); - void OnMouseDown(const CFX_FloatPoint& point, bool bShift, bool bCtrl); - void OnMouseMove(const CFX_FloatPoint& point, bool bShift, bool bCtrl); + void OnMouseDown(const CFX_PointF& point, bool bShift, bool bCtrl); + void OnMouseMove(const CFX_PointF& point, bool bShift, bool bCtrl); void OnVK_UP(bool bShift, bool bCtrl); void OnVK_DOWN(bool bShift, bool bCtrl); void OnVK_LEFT(bool bShift, bool bCtrl); @@ -385,14 +384,14 @@ class CFX_Edit { bool Undo(); int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const; CPVT_WordPlace WordIndexToWordPlace(int32_t index) const; - CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; + CPVT_WordPlace SearchWordPlace(const CFX_PointF& point) const; int32_t GetCaret() const; CPVT_WordPlace GetCaretWordPlace() const; CFX_WideString GetSelText() const; CFX_WideString GetText() const; FX_FLOAT GetFontSize() const; uint16_t GetPasswordChar() const; - CFX_FloatPoint GetScrollPos() const; + CFX_PointF GetScrollPos() const; int32_t GetCharArray() const; CFX_FloatRect GetContentRect() const; CFX_WideString GetRangeText(const CPVT_WordRange& range) const; @@ -466,8 +465,8 @@ class CFX_Edit { void PaintInsertText(const CPVT_WordPlace& wpOld, const CPVT_WordPlace& wpNew); - inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const; - inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const; + inline CFX_PointF VTToEdit(const CFX_PointF& point) const; + inline CFX_PointF EditToVT(const CFX_PointF& point) const; inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const; void Refresh(); @@ -484,17 +483,15 @@ class CFX_Edit { CPWL_EditCtrl* m_pNotify; CPWL_Edit* m_pOprNotify; std::unique_ptr<CFX_Edit_Provider> m_pVTProvider; - CPVT_WordPlace m_wpCaret; CPVT_WordPlace m_wpOldCaret; CFX_Edit_Select m_SelState; - - CFX_FloatPoint m_ptScrollPos; - CFX_FloatPoint m_ptRefreshScrollPos; + CFX_PointF m_ptScrollPos; + CFX_PointF m_ptRefreshScrollPos; bool m_bEnableScroll; std::unique_ptr<CFX_Edit_Iterator> m_pIterator; CFX_Edit_Refresh m_Refresh; - CFX_FloatPoint m_ptCaret; + CFX_PointF m_ptCaret; CFX_Edit_Undo m_Undo; int32_t m_nAlignment; bool m_bNotifyFlag; |