summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/pdfwindow/PWL_Edit.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-26 13:09:42 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-26 13:09:42 -0800
commit3b8fdd34bdf57ec45291b77008a43249f838efcb (patch)
treeb65090a7c1fbedcda6499c3be4ffcaf8453e9e11 /fpdfsdk/include/pdfwindow/PWL_Edit.h
parent8ba5b59356d506d3b9e976e7422e69bbd5bec8d6 (diff)
downloadpdfium-3b8fdd34bdf57ec45291b77008a43249f838efcb.tar.xz
Replace CPDF_Rect and CPDF_Point with CFX types.
Too many rectangle types. Remove CPDF_Rect #define, and make an equivalent point type in CFX, but stop short of consolidating the N different forms of rectangles in CFX. Also banish PDF_ClipFloat to the one .cpp file that needs it, since it was in the vicinity of the .h file changes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1740923003 .
Diffstat (limited to 'fpdfsdk/include/pdfwindow/PWL_Edit.h')
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Edit.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/fpdfsdk/include/pdfwindow/PWL_Edit.h b/fpdfsdk/include/pdfwindow/PWL_Edit.h
index 73528180d9..e93afaaa00 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Edit.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Edit.h
@@ -52,19 +52,19 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
void OnDestroy() override;
void OnCreated() override;
void RePosChildWnd() override;
- CPDF_Rect GetClientRect() const override;
+ CFX_FloatRect GetClientRect() const override;
void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) override;
void DrawThisAppearance(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device) override;
- FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override;
- FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag) override;
- FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
+ FX_BOOL OnLButtonDblClk(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
+ FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
FX_BOOL OnMouseWheel(short zDelta,
- const CPDF_Point& point,
+ const CFX_FloatPoint& point,
FX_DWORD nFlag) override;
FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) override;
FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag) override;
- CPDF_Rect GetFocusRect() const override;
+ CFX_FloatRect GetFocusRect() const override;
void OnSetFocus() override;
void OnKillFocus() override;
@@ -96,14 +96,15 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
virtual void SetText(const FX_WCHAR* csText);
void ReplaceSel(const FX_WCHAR* csText);
- CFX_ByteString GetTextAppearanceStream(const CPDF_Point& ptOffset) const;
- CFX_ByteString GetCaretAppearanceStream(const CPDF_Point& ptOffset) const;
- CFX_ByteString GetSelectAppearanceStream(const CPDF_Point& ptOffset) const;
+ CFX_ByteString GetTextAppearanceStream(const CFX_FloatPoint& ptOffset) const;
+ CFX_ByteString GetCaretAppearanceStream(const CFX_FloatPoint& ptOffset) const;
+ CFX_ByteString GetSelectAppearanceStream(
+ const CFX_FloatPoint& ptOffset) const;
FX_BOOL IsTextFull() const;
static FX_FLOAT GetCharArrayAutoFontSize(CPDF_Font* pFont,
- const CPDF_Rect& rcPlate,
+ const CFX_FloatRect& rcPlate,
int32_t nCharArray);
void SetFillerNotify(IPWL_Filler_Notify* pNotify) {
@@ -111,10 +112,10 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
}
void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder,
- const CPDF_Point& ptOffset,
+ const CFX_FloatPoint& ptOffset,
CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder,
- const CPDF_Point& ptOffset);
+ const CFX_FloatPoint& ptOffset);
protected:
// IFX_Edit_OprNotify
@@ -141,11 +142,11 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
void SetParamByFlag();
FX_FLOAT GetCharArrayAutoFontSize(int32_t nCharArray);
- CPDF_Point GetWordRightBottomPoint(const CPVT_WordPlace& wpWord);
+ CFX_FloatPoint GetWordRightBottomPoint(const CPVT_WordPlace& wpWord);
CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1,
const CPVT_WordRange& wr2);
- CPVT_WordRange GetLatinWordsRange(const CPDF_Point& point) const;
+ CPVT_WordRange GetLatinWordsRange(const CFX_FloatPoint& point) const;
CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const;
CPVT_WordRange GetArabicWordsRange(const CPVT_WordPlace& place) const;
CPVT_WordRange GetSameWordsRange(const CPVT_WordPlace& place,
@@ -159,7 +160,7 @@ class CPWL_Edit : public CPWL_EditCtrl, public IFX_Edit_OprNotify {
IPWL_Filler_Notify* m_pFillerNotify;
IPWL_SpellCheck* m_pSpellCheck;
FX_BOOL m_bFocus;
- CPDF_Rect m_rcOldWindow;
+ CFX_FloatRect m_rcOldWindow;
public:
void AttachFFLData(void* pData) { m_pFormFiller = pData; }