From 24b6af6c87f0d7f49f5213ae019616b9b07e2e8f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 14 Aug 2017 11:09:20 -0400 Subject: Cleanup more fde defines This CL cleans up more defines and shuffles some fde code around to better locations. Change-Id: I6af0e991d9fa489ca45d1d0f9d041657beef3b7e Reviewed-on: https://pdfium-review.googlesource.com/10613 Commit-Queue: dsinclair Reviewed-by: Henrique Nakashima Reviewed-by: Tom Sepez --- xfa/fde/cfde_txtedtengine.h | 74 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) (limited to 'xfa/fde/cfde_txtedtengine.h') diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h index 31883fc3c8..2a38e4ea81 100644 --- a/xfa/fde/cfde_txtedtengine.h +++ b/xfa/fde/cfde_txtedtengine.h @@ -11,15 +11,85 @@ #include #include "core/fxcrt/cfx_retain_ptr.h" -#include "xfa/fde/ifde_txtedtengine.h" +#include "core/fxcrt/cfx_seekablestreamproxy.h" +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxge/fx_dib.h" class CFDE_TxtEdtBuf; class CFDE_TxtEdtPage; class CFDE_TxtEdtParag; +class CFGAS_GEFont; +class CFWL_Edit; class CFX_TxtBreak; class IFDE_TxtEdtDoRecord; class IFX_CharIter; +#define FDE_TEXTEDITMODE_MultiLines (1L << 0) +#define FDE_TEXTEDITMODE_AutoLineWrap (1L << 1) +#define FDE_TEXTEDITMODE_LimitArea_Vert (1L << 3) +#define FDE_TEXTEDITMODE_LimitArea_Horz (1L << 4) +#define FDE_TEXTEDITMODE_Validate (1L << 8) +#define FDE_TEXTEDITMODE_Password (1L << 9) + +#define FDE_TEXTEDITALIGN_Left 0 +#define FDE_TEXTEDITALIGN_Center (1L << 0) +#define FDE_TEXTEDITALIGN_Right (1L << 1) +#define FDE_TEXTEDITALIGN_Justified (1L << 4) + +#define FDE_TEXTEDITLAYOUT_CombText (1L << 4) +#define FDE_TEXTEDITLAYOUT_LastLineHeight (1L << 8) + +enum FDE_TXTEDTMOVECARET { + MC_MoveNone = 0, + MC_Left, + MC_Right, + MC_Up, + MC_Down, + MC_LineStart, + MC_LineEnd, + MC_Home, + MC_End, +}; + +struct FDE_TXTEDTPARAMS { + FDE_TXTEDTPARAMS(); + ~FDE_TXTEDTPARAMS(); + + float fPlateWidth; + float fPlateHeight; + int32_t nLineCount; + uint32_t dwLayoutStyles; + uint32_t dwAlignment; + uint32_t dwMode; + CFX_RetainPtr pFont; + float fFontSize; + FX_ARGB dwFontColor; + float fLineSpace; + float fTabWidth; + wchar_t wDefChar; + wchar_t wLineBreakChar; + int32_t nLineEnd; + int32_t nHorzScale; + float fCharSpace; + CFWL_Edit* pEventSink; +}; + +enum FDE_TXTEDT_TEXTCHANGE_TYPE { + FDE_TXTEDT_TEXTCHANGE_TYPE_Insert = 0, + FDE_TXTEDT_TEXTCHANGE_TYPE_Delete, + FDE_TXTEDT_TEXTCHANGE_TYPE_Replace, +}; + +struct FDE_TXTEDT_TEXTCHANGE_INFO { + FDE_TXTEDT_TEXTCHANGE_INFO(); + ~FDE_TXTEDT_TEXTCHANGE_INFO(); + + int32_t nChangeType; + CFX_WideString wsInsert; + CFX_WideString wsDelete; + CFX_WideString wsPrevText; +}; + class CFDE_TxtEdtEngine { public: CFDE_TxtEdtEngine(); @@ -132,8 +202,6 @@ class CFDE_TxtEdtEngine { bool MoveDown(CFX_PointF& ptCaret); bool MoveLineStart(); bool MoveLineEnd(); - bool MoveParagStart(); - bool MoveParagEnd(); bool MoveHome(); bool MoveEnd(); bool IsFitArea(CFX_WideString& wsText); -- cgit v1.2.3