summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fxedit/fx_edit.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-26 14:24:28 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-26 14:24:28 -0800
commit281a9eadff15b167e2ee3032e21b83190ad49125 (patch)
treef02f7d0842f59d8e69bda011b3e62547ffb1acde /fpdfsdk/include/fxedit/fx_edit.h
parent566b974287ce0e81a963138152b8898f22480f52 (diff)
downloadpdfium-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/fx_edit.h')
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h67
1 files changed, 34 insertions, 33 deletions
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 5e1ac0f390..089eecc1d9 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -15,7 +15,7 @@ class CFX_RenderDevice;
class CPDF_Font;
class CFX_Matrix;
class CPDF_PageObjectHolder;
-class CPDF_Point;
+class CFX_FloatPoint;
class CPDF_TextObject;
class IFX_Edit;
class IFX_Edit_FontMap;
@@ -92,17 +92,17 @@ class IFX_Edit_Notify {
virtual void IOnSetScrollPosY(FX_FLOAT fy) = 0;
// set the caret information.
virtual 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) = 0;
// if the caret position is changed ,send the information of current postion
// to user.
virtual void IOnCaretChange(const CPVT_SecProps& secProps,
const CPVT_WordProps& wordProps) = 0;
// if the text area is changed, send the information to user.
- virtual void IOnContentChange(const CPDF_Rect& rcContent) = 0;
+ virtual void IOnContentChange(const CFX_FloatRect& rcContent) = 0;
// Invalidate the rectangle relative to the bounding box of edit.
- virtual void IOnInvalidateRect(CPDF_Rect* pRect) = 0;
+ virtual void IOnInvalidateRect(CFX_FloatRect* pRect) = 0;
};
class IFX_Edit_OprNotify {
@@ -204,9 +204,10 @@ class IFX_Edit {
virtual void Initialize() = 0;
// set the bounding box of the text area.
- virtual void SetPlateRect(const CPDF_Rect& rect, FX_BOOL bPaint = TRUE) = 0;
+ virtual void SetPlateRect(const CFX_FloatRect& rect,
+ FX_BOOL bPaint = TRUE) = 0;
// set the scroll origin
- virtual void SetScrollPos(const CPDF_Point& point) = 0;
+ virtual void SetScrollPos(const CFX_FloatPoint& point) = 0;
// set the horizontal text alignment in text box, nFormat (0:left 1:middle
// 2:right).
@@ -296,11 +297,11 @@ class IFX_Edit {
// query if any text is selected.
virtual FX_BOOL IsSelected() const = 0;
// get the scroll origin
- virtual CPDF_Point GetScrollPos() const = 0;
+ virtual CFX_FloatPoint GetScrollPos() const = 0;
// get the bounding box of the text area.
- virtual CPDF_Rect GetPlateRect() const = 0;
+ virtual CFX_FloatRect GetPlateRect() const = 0;
// get the fact area of the text.
- virtual CPDF_Rect GetContentRect() const = 0;
+ virtual CFX_FloatRect GetContentRect() const = 0;
// get the visible word range
virtual CPVT_WordRange GetVisibleWordRange() const = 0;
// get the whole word range
@@ -310,11 +311,11 @@ class IFX_Edit {
// send the mousedown message to edit for response.
// if Shift key is hold, bShift is TRUE, is Ctrl key is hold, bCtrl is TRUE.
- virtual void OnMouseDown(const CPDF_Point& point,
+ virtual void OnMouseDown(const CFX_FloatPoint& point,
FX_BOOL bShift,
FX_BOOL bCtrl) = 0;
// send the mousemove message to edit when mouse down is TRUE.
- virtual void OnMouseMove(const CPDF_Point& point,
+ virtual void OnMouseMove(const CFX_FloatPoint& point,
FX_BOOL bShift,
FX_BOOL bCtrl) = 0;
// send the UP key message to edit.
@@ -399,7 +400,7 @@ class IFX_Edit {
const CPVT_WordPlace& place) const = 0;
// search a wordplace form point
- virtual CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const = 0;
+ virtual CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const = 0;
// get the font size of non_rich text or default font size of richtext.
virtual FX_FLOAT GetFontSize() const = 0;
@@ -426,21 +427,21 @@ class IFX_Edit {
static CFX_ByteString GetEditAppearanceStream(
IFX_Edit* pEdit,
- const CPDF_Point& ptOffset,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange = NULL,
FX_BOOL bContinuous = TRUE,
FX_WORD SubWord = 0);
static CFX_ByteString GetSelectAppearanceStream(
IFX_Edit* pEdit,
- const CPDF_Point& ptOffset,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange = NULL);
static void DrawEdit(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
IFX_Edit* pEdit,
FX_COLORREF crTextFill,
FX_COLORREF crTextStroke,
- const CPDF_Rect& rcClip,
- const CPDF_Point& ptOffset,
+ const CFX_FloatRect& rcClip,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange,
IFX_SystemHandler* pSystemHandler,
void* pFFLData);
@@ -448,31 +449,31 @@ class IFX_Edit {
CFX_Matrix* pUser2Device,
IFX_Edit* pEdit,
FX_COLORREF color,
- const CPDF_Rect& rcClip,
- const CPDF_Point& ptOffset,
+ const CFX_FloatRect& rcClip,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange);
static void DrawRichEdit(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
IFX_Edit* pEdit,
- const CPDF_Rect& rcClip,
- const CPDF_Point& ptOffset,
+ const CFX_FloatRect& rcClip,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange);
static void GeneratePageObjects(
CPDF_PageObjectHolder* pObjectHolder,
IFX_Edit* pEdit,
- const CPDF_Point& ptOffset,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange,
FX_COLORREF crText,
CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
static void GenerateRichPageObjects(
CPDF_PageObjectHolder* pObjectHolder,
IFX_Edit* pEdit,
- const CPDF_Point& ptOffset,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange,
CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
static void GenerateUnderlineObjects(CPDF_PageObjectHolder* pObjectHolder,
IFX_Edit* pEdit,
- const CPDF_Point& ptOffset,
+ const CFX_FloatPoint& ptOffset,
const CPVT_WordRange* pRange,
FX_COLORREF color);
@@ -501,7 +502,7 @@ class IFX_List_Notify {
// set the position of vertical scrollbar.
virtual void IOnSetScrollPosY(FX_FLOAT fy) = 0;
// Invalidate the rectangle relative to the bounding box of edit.
- virtual void IOnInvalidateRect(CPDF_Rect* pRect) = 0;
+ virtual void IOnInvalidateRect(CFX_FloatRect* pRect) = 0;
protected:
virtual ~IFX_List_Notify() {}
@@ -515,11 +516,11 @@ class IFX_List {
virtual void SetFontMap(IFX_Edit_FontMap* pFontMap) = 0;
virtual void SetNotify(IFX_List_Notify* pNotify) = 0;
- virtual void SetPlateRect(const CPDF_Rect& rect) = 0;
+ virtual void SetPlateRect(const CFX_FloatRect& rect) = 0;
virtual void SetFontSize(FX_FLOAT fFontSize) = 0;
- virtual CPDF_Rect GetPlateRect() const = 0;
- virtual CPDF_Rect GetContentRect() const = 0;
+ virtual CFX_FloatRect GetPlateRect() const = 0;
+ virtual CFX_FloatRect GetContentRect() const = 0;
virtual FX_FLOAT GetFontSize() const = 0;
virtual IFX_Edit* GetItemEdit(int32_t nIndex) const = 0;
@@ -532,13 +533,13 @@ class IFX_List {
virtual FX_BOOL IsValid(int32_t nItemIndex) const = 0;
virtual int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const = 0;
- virtual void SetScrollPos(const CPDF_Point& point) = 0;
+ virtual void SetScrollPos(const CFX_FloatPoint& point) = 0;
virtual void ScrollToListItem(int32_t nItemIndex) = 0;
- virtual CPDF_Rect GetItemRect(int32_t nIndex) const = 0;
+ virtual CFX_FloatRect GetItemRect(int32_t nIndex) const = 0;
virtual int32_t GetCaret() const = 0;
virtual int32_t GetSelect() const = 0;
virtual int32_t GetTopItem() const = 0;
- virtual int32_t GetItemIndex(const CPDF_Point& point) const = 0;
+ virtual int32_t GetItemIndex(const CFX_FloatPoint& point) const = 0;
virtual int32_t GetFirstSelected() const = 0;
virtual void AddString(const FX_WCHAR* string) = 0;
@@ -549,10 +550,10 @@ class IFX_List {
virtual void Cancel() = 0;
virtual CFX_WideString GetText() const = 0;
- virtual void OnMouseDown(const CPDF_Point& point,
+ virtual void OnMouseDown(const CFX_FloatPoint& point,
FX_BOOL bShift,
FX_BOOL bCtrl) = 0;
- virtual void OnMouseMove(const CPDF_Point& point,
+ virtual void OnMouseMove(const CFX_FloatPoint& point,
FX_BOOL bShift,
FX_BOOL bCtrl) = 0;
virtual void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) = 0;