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/pdfwindow/PWL_EditCtrl.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/pdfwindow/PWL_EditCtrl.h')
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_EditCtrl.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h index 9bb40a7de1..f80033081e 100644 --- a/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h +++ b/fpdfsdk/include/pdfwindow/PWL_EditCtrl.h @@ -27,7 +27,7 @@ class IPWL_Edit_Notify { virtual ~IPWL_Edit_Notify() {} // when the position of caret is changed in edit virtual void OnCaretMove(int32_t x1, int32_t y1, int32_t x2, int32_t y2) {} - virtual void OnContentChange(const CPDF_Rect& rcContent) {} + virtual void OnContentChange(const CFX_FloatRect& rcContent) {} // OprType: 0 InsertWord // 1 InsertReturn // 2 BackSpace @@ -59,13 +59,13 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { CPWL_EditCtrl(); ~CPWL_EditCtrl() override; - CPDF_Rect GetContentRect() const; + CFX_FloatRect GetContentRect() const; void GetCaretPos(int32_t& x, int32_t& y) const; CFX_WideString GetText() const; void SetSel(int32_t nStartChar, int32_t nEndChar); void GetSel(int32_t& nStartChar, int32_t& nEndChar) const; - void GetTextRange(const CPDF_Rect& rect, + void GetTextRange(const CFX_FloatRect& rect, int32_t& nStartChar, int32_t& nEndChar) const; CFX_WideString GetText(int32_t& nStartChar, int32_t& nEndChar) const; @@ -79,8 +79,8 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { void Paint(); void EnableRefresh(FX_BOOL bRefresh); - CPDF_Point GetScrollPos() const; - void SetScrollPos(const CPDF_Point& point); + CFX_FloatPoint GetScrollPos() const; + void SetScrollPos(const CFX_FloatPoint& point); void SetEditNotify(IPWL_Edit_Notify* pNotify) { m_pEditNotify = pNotify; } @@ -105,9 +105,9 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { void OnCreated() override; FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override; FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override; - FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; - FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; - FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; + FX_BOOL OnMouseMove(const CFX_FloatPoint& point, FX_DWORD nFlag) override; void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, @@ -135,13 +135,13 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { void IOnSetScrollPosX(FX_FLOAT fx) override {} void IOnSetScrollPosY(FX_FLOAT fy) override; void IOnSetCaret(FX_BOOL bVisible, - const CPDF_Point& ptHead, - const CPDF_Point& ptFoot, + const CFX_FloatPoint& ptHead, + const CFX_FloatPoint& ptFoot, const CPVT_WordPlace& place) override; void IOnCaretChange(const CPVT_SecProps& secProps, const CPVT_WordProps& wordProps) override; - void IOnContentChange(const CPDF_Rect& rcContent) override; - void IOnInvalidateRect(CPDF_Rect* pRect) override; + void IOnContentChange(const CFX_FloatRect& rcContent) override; + void IOnInvalidateRect(CFX_FloatRect* pRect) override; void InsertText(const FX_WCHAR* csText); void SetText(const FX_WCHAR* csText); @@ -157,10 +157,10 @@ class CPWL_EditCtrl : public CPWL_Wnd, public IFX_Edit_Notify { void Delete(); void Backspace(); - void GetCaretInfo(CPDF_Point& ptHead, CPDF_Point& ptFoot) const; + void GetCaretInfo(CFX_FloatPoint& ptHead, CFX_FloatPoint& ptFoot) const; void SetCaret(FX_BOOL bVisible, - const CPDF_Point& ptHead, - const CPDF_Point& ptFoot); + const CFX_FloatPoint& ptHead, + const CFX_FloatPoint& ptFoot); void SetEditCaret(FX_BOOL bVisible); |