OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FDE_IFDE_TXTEDTPAGE_H_ | 7 #ifndef XFA_FDE_IFDE_TXTEDTPAGE_H_ |
8 #define XFA_FDE_IFDE_TXTEDTPAGE_H_ | 8 #define XFA_FDE_IFDE_TXTEDTPAGE_H_ |
9 | 9 |
10 #include "xfa/fde/fde_visualset.h" | 10 #include "xfa/fde/fde_visualset.h" |
11 #include "xfa/fgas/layout/fgas_textbreak.h" | 11 #include "xfa/fgas/layout/fgas_textbreak.h" |
12 | 12 |
13 class CFDE_TxtEdtEngine; | 13 class CFDE_TxtEdtEngine; |
14 | 14 |
15 class IFDE_TxtEdtPage : public IFDE_CanvasSet, public IFX_TxtAccess { | 15 class IFDE_TxtEdtPage : public IFDE_CanvasSet, public IFX_TxtAccess { |
16 public: | 16 public: |
17 static IFDE_TxtEdtPage* Create(CFDE_TxtEdtEngine* pEngine, int32_t nIndex); | 17 static IFDE_TxtEdtPage* Create(CFDE_TxtEdtEngine* pEngine, int32_t nIndex); |
18 ~IFDE_TxtEdtPage() override {} | 18 ~IFDE_TxtEdtPage() override {} |
19 | 19 |
20 virtual CFDE_TxtEdtEngine* GetEngine() const = 0; | 20 virtual CFDE_TxtEdtEngine* GetEngine() const = 0; |
21 virtual int32_t GetCharRect(int32_t nIndex, | 21 virtual int32_t GetCharRect(int32_t nIndex, |
22 CFX_RectF& rect, | 22 CFX_RectF& rect, |
23 FX_BOOL bBBox = FALSE) const = 0; | 23 bool bBBox = false) const = 0; |
24 virtual int32_t GetCharIndex(const CFX_PointF& fPoint, FX_BOOL& bBefore) = 0; | 24 virtual int32_t GetCharIndex(const CFX_PointF& fPoint, bool& bBefore) = 0; |
25 virtual void CalcRangeRectArray(int32_t nStart, | 25 virtual void CalcRangeRectArray(int32_t nStart, |
26 int32_t nCount, | 26 int32_t nCount, |
27 CFX_RectFArray& RectFArr) const = 0; | 27 CFX_RectFArray& RectFArr) const = 0; |
28 virtual int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount) = 0; | 28 virtual int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount) = 0; |
29 virtual int32_t GetCharStart() const = 0; | 29 virtual int32_t GetCharStart() const = 0; |
30 virtual int32_t GetCharCount() const = 0; | 30 virtual int32_t GetCharCount() const = 0; |
31 | 31 |
32 virtual int32_t GetDisplayPos(const CFX_RectF& rtClip, | 32 virtual int32_t GetDisplayPos(const CFX_RectF& rtClip, |
33 FXTEXT_CHARPOS*& pCharPos, | 33 FXTEXT_CHARPOS*& pCharPos, |
34 CFX_RectF* pBBox) const = 0; | 34 CFX_RectF* pBBox) const = 0; |
35 virtual FX_BOOL IsLoaded(const CFX_RectF* pClipBox) = 0; | 35 virtual bool IsLoaded(const CFX_RectF* pClipBox) = 0; |
36 virtual int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause) = 0; | 36 virtual int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause) = 0; |
37 virtual void UnloadPage(const CFX_RectF* pClipBox) = 0; | 37 virtual void UnloadPage(const CFX_RectF* pClipBox) = 0; |
38 virtual const CFX_RectF& GetContentsBox() = 0; | 38 virtual const CFX_RectF& GetContentsBox() = 0; |
39 }; | 39 }; |
40 | 40 |
41 #endif // XFA_FDE_IFDE_TXTEDTPAGE_H_ | 41 #endif // XFA_FDE_IFDE_TXTEDTPAGE_H_ |
OLD | NEW |