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_SRC_FEE_INCLUDE_IFDE_TXTEDTENGINE_H_ | 7 #ifndef XFA_SRC_FEE_INCLUDE_IFDE_TXTEDTENGINE_H_ |
8 #define XFA_SRC_FEE_INCLUDE_IFDE_TXTEDTENGINE_H_ | 8 #define XFA_SRC_FEE_INCLUDE_IFDE_TXTEDTENGINE_H_ |
9 | 9 |
10 #include "core/include/fxge/fx_dib.h" | 10 #include "core/include/fxge/fx_dib.h" |
11 #include "xfa/src/fgas/include/fx_fnt.h" | 11 #include "xfa/src/fgas/include/fx_fnt.h" |
12 | 12 |
13 class IFDE_TxtEdtBuf; | 13 class IFDE_TxtEdtBuf; |
14 class IFDE_TxtEdtPage; | 14 class IFDE_TxtEdtPage; |
15 class IFDE_TxtEdtEngine; | 15 class IFDE_TxtEdtEngine; |
16 class IFDE_TxtEdtEventSink; | 16 class IFDE_TxtEdtEventSink; |
17 class IFDE_TxtEdtParag; | 17 class IFDE_TxtEdtParag; |
18 | 18 |
| 19 typedef struct FDE_HTXTEDTFIND_ { void* pData; } * FDE_HTXTEDTFIND; |
| 20 |
19 #define FDE_TXTEDT_FIND_FLAGS_Prev (0L << 0) | 21 #define FDE_TXTEDT_FIND_FLAGS_Prev (0L << 0) |
20 #define FDE_TXTEDT_FIND_FLAGS_Next (1L << 0) | 22 #define FDE_TXTEDT_FIND_FLAGS_Next (1L << 0) |
21 #define FDE_TXTEDT_FIND_FLAGS_WholeWord (1L << 1) | 23 #define FDE_TXTEDT_FIND_FLAGS_WholeWord (1L << 1) |
22 #define FDE_TXTEDT_FIND_FLAGS_NoCase (1L << 2) | 24 #define FDE_TXTEDT_FIND_FLAGS_NoCase (1L << 2) |
23 typedef struct _FDE_HTXTEDTFIND { void* pData; } * FDE_HTXTEDTFIND; | 25 |
24 #define FDE_TEXTEDITMODE_MultiLines (1L << 0) | 26 #define FDE_TEXTEDITMODE_MultiLines (1L << 0) |
25 #define FDE_TEXTEDITMODE_AutoLineWrap (1L << 1) | 27 #define FDE_TEXTEDITMODE_AutoLineWrap (1L << 1) |
26 #define FDE_TEXTEDITMODE_ReadOnly (1L << 2) | 28 #define FDE_TEXTEDITMODE_ReadOnly (1L << 2) |
27 #define FDE_TEXTEDITMODE_LimitArea_Vert (1L << 3) | 29 #define FDE_TEXTEDITMODE_LimitArea_Vert (1L << 3) |
28 #define FDE_TEXTEDITMODE_LimitArea_Horz (1L << 4) | 30 #define FDE_TEXTEDITMODE_LimitArea_Horz (1L << 4) |
29 #define FDE_TEXTEDITMODE_NoRedoUndo (1L << 5) | 31 #define FDE_TEXTEDITMODE_NoRedoUndo (1L << 5) |
30 #define FDE_TEXTEDITMODE_FIELD_TAB (1L << 6) | 32 #define FDE_TEXTEDITMODE_FIELD_TAB (1L << 6) |
31 #define FDE_TEXTEDITMODE_FIELD_AUTO (1L << 7) | 33 #define FDE_TEXTEDITMODE_FIELD_AUTO (1L << 7) |
32 #define FDE_TEXTEDITMODE_Validate (1L << 8) | 34 #define FDE_TEXTEDITMODE_Validate (1L << 8) |
33 #define FDE_TEXTEDITMODE_Password (1L << 9) | 35 #define FDE_TEXTEDITMODE_Password (1L << 9) |
| 36 |
34 #define FDE_TEXTEDITALIGN_Left (0L << 0) | 37 #define FDE_TEXTEDITALIGN_Left (0L << 0) |
35 #define FDE_TEXTEDITALIGN_Center (1L << 0) | 38 #define FDE_TEXTEDITALIGN_Center (1L << 0) |
36 #define FDE_TEXTEDITALIGN_Right (2L << 0) | 39 #define FDE_TEXTEDITALIGN_Right (2L << 0) |
37 #define FDE_TEXTEDITALIGN_Normal (1L << 3) | 40 #define FDE_TEXTEDITALIGN_Normal (1L << 3) |
38 #define FDE_TEXTEDITALIGN_Justified (1L << 4) | 41 #define FDE_TEXTEDITALIGN_Justified (1L << 4) |
39 #define FDE_TEXTEDITALIGN_Distributed (1L << 5) | 42 #define FDE_TEXTEDITALIGN_Distributed (1L << 5) |
| 43 |
40 #define FDE_TEXTEDITLAYOUT_DocVertical (1L << 0) | 44 #define FDE_TEXTEDITLAYOUT_DocVertical (1L << 0) |
41 #define FDE_TEXTEDITLAYOUT_CharVertial (1L << 1) | 45 #define FDE_TEXTEDITLAYOUT_CharVertial (1L << 1) |
42 #define FDE_TEXTEDITLAYOUT_LineReserve (1L << 2) | 46 #define FDE_TEXTEDITLAYOUT_LineReserve (1L << 2) |
43 #define FDE_TEXTEDITLAYOUT_RTL (1L << 3) | 47 #define FDE_TEXTEDITLAYOUT_RTL (1L << 3) |
44 #define FDE_TEXTEDITLAYOUT_CombText (1L << 4) | 48 #define FDE_TEXTEDITLAYOUT_CombText (1L << 4) |
45 #define FDE_TEXTEDITLAYOUT_ExpandTab (1L << 5) | 49 #define FDE_TEXTEDITLAYOUT_ExpandTab (1L << 5) |
46 #define FDE_TEXTEDITLAYOUT_ArabicContext (1L << 6) | 50 #define FDE_TEXTEDITLAYOUT_ArabicContext (1L << 6) |
47 #define FDE_TEXTEDITLAYOUT_ArabicShapes (1L << 7) | 51 #define FDE_TEXTEDITLAYOUT_ArabicShapes (1L << 7) |
48 #define FDE_TEXTEDITLAYOUT_LastLineHeight (1L << 8) | 52 #define FDE_TEXTEDITLAYOUT_LastLineHeight (1L << 8) |
| 53 |
49 enum FDE_TXTEDTMOVECARET { | 54 enum FDE_TXTEDTMOVECARET { |
50 MC_MoveNone = 0, | 55 MC_MoveNone = 0, |
51 MC_Left, | 56 MC_Left, |
52 MC_Right, | 57 MC_Right, |
53 MC_Up, | 58 MC_Up, |
54 MC_Down, | 59 MC_Down, |
55 MC_WordBackward, | 60 MC_WordBackward, |
56 MC_WordForward, | 61 MC_WordForward, |
57 MC_LineStart, | 62 MC_LineStart, |
58 MC_LineEnd, | 63 MC_LineEnd, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 virtual ~IFDE_TxtEdtParag() {} | 261 virtual ~IFDE_TxtEdtParag() {} |
257 virtual int32_t GetTextLength() const = 0; | 262 virtual int32_t GetTextLength() const = 0; |
258 virtual int32_t GetStartIndex() const = 0; | 263 virtual int32_t GetStartIndex() const = 0; |
259 virtual int32_t CountLines() const = 0; | 264 virtual int32_t CountLines() const = 0; |
260 virtual void GetLineRange(int32_t nLineIndex, | 265 virtual void GetLineRange(int32_t nLineIndex, |
261 int32_t& nStart, | 266 int32_t& nStart, |
262 int32_t& nCount) const = 0; | 267 int32_t& nCount) const = 0; |
263 }; | 268 }; |
264 | 269 |
265 #endif // XFA_SRC_FEE_INCLUDE_IFDE_TXTEDTENGINE_H_ | 270 #endif // XFA_SRC_FEE_INCLUDE_IFDE_TXTEDTENGINE_H_ |
OLD | NEW |