Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1027)

Side by Side Diff: xfa/fgas/layout/fgas_textbreak.h

Issue 2037563002: Replace IFGAS_Font with underlying concrete type (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix Windows Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ 7 #ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ 8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
9 9
10 #include "core/fxcrt/include/fx_ucd.h" 10 #include "core/fxcrt/include/fx_ucd.h"
11 #include "core/fxge/include/fx_ge.h" 11 #include "core/fxge/include/fx_ge.h"
12 #include "xfa/fgas/crt/fgas_utils.h" 12 #include "xfa/fgas/crt/fgas_utils.h"
13 #include "xfa/fgas/layout/fgas_unicode.h" 13 #include "xfa/fgas/layout/fgas_unicode.h"
14 14
15 class CFX_Char; 15 class CFX_Char;
16 class CFX_GEFont;
16 class CFX_TxtChar; 17 class CFX_TxtChar;
17 class CFX_TxtPiece; 18 class CFX_TxtPiece;
18 class IFX_Font;
19 class IFX_TxtAccess; 19 class IFX_TxtAccess;
20 20
21 #define FX_TXTBREAKPOLICY_None 0x00 21 #define FX_TXTBREAKPOLICY_None 0x00
22 #define FX_TXTBREAKPOLICY_Pagination 0x01 22 #define FX_TXTBREAKPOLICY_Pagination 0x01
23 #define FX_TXTBREAKPOLICY_SpaceBreak 0x02 23 #define FX_TXTBREAKPOLICY_SpaceBreak 0x02
24 #define FX_TXTBREAKPOLICY_NumberBreak 0x04 24 #define FX_TXTBREAKPOLICY_NumberBreak 0x04
25 #define FX_TXTBREAK_None 0x00 25 #define FX_TXTBREAK_None 0x00
26 #define FX_TXTBREAK_PieceBreak 0x01 26 #define FX_TXTBREAK_PieceBreak 0x01
27 #define FX_TXTBREAK_LineBreak 0x02 27 #define FX_TXTBREAK_LineBreak 0x02
28 #define FX_TXTBREAK_ParagraphBreak 0x03 28 #define FX_TXTBREAK_ParagraphBreak 0x03
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 dwCharStyles(0), 92 dwCharStyles(0),
93 pRect(nullptr), 93 pRect(nullptr),
94 wLineBreakChar(L'\n'), 94 wLineBreakChar(L'\n'),
95 bSkipSpace(TRUE) {} 95 bSkipSpace(TRUE) {}
96 96
97 IFX_TxtAccess* pAccess; 97 IFX_TxtAccess* pAccess;
98 void* pIdentity; 98 void* pIdentity;
99 CFX_WideString wsStr; 99 CFX_WideString wsStr;
100 int32_t* pWidths; 100 int32_t* pWidths;
101 int32_t iLength; 101 int32_t iLength;
102 IFX_Font* pFont; 102 CFX_GEFont* pFont;
103 FX_FLOAT fFontSize; 103 FX_FLOAT fFontSize;
104 uint32_t dwStyles; 104 uint32_t dwStyles;
105 int32_t iHorizontalScale; 105 int32_t iHorizontalScale;
106 int32_t iVerticalScale; 106 int32_t iVerticalScale;
107 int32_t iCharRotation; 107 int32_t iCharRotation;
108 uint32_t dwCharStyles; 108 uint32_t dwCharStyles;
109 const CFX_RectF* pRect; 109 const CFX_RectF* pRect;
110 FX_WCHAR wLineBreakChar; 110 FX_WCHAR wLineBreakChar;
111 FX_BOOL bSkipSpace; 111 FX_BOOL bSkipSpace;
112 }; 112 };
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 class CFX_TxtBreak { 222 class CFX_TxtBreak {
223 public: 223 public:
224 CFX_TxtBreak(uint32_t dwPolicies); 224 CFX_TxtBreak(uint32_t dwPolicies);
225 ~CFX_TxtBreak(); 225 ~CFX_TxtBreak();
226 226
227 void SetLineWidth(FX_FLOAT fLineWidth); 227 void SetLineWidth(FX_FLOAT fLineWidth);
228 void SetLinePos(FX_FLOAT fLinePos); 228 void SetLinePos(FX_FLOAT fLinePos);
229 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; } 229 uint32_t GetLayoutStyles() const { return m_dwLayoutStyles; }
230 void SetLayoutStyles(uint32_t dwLayoutStyles); 230 void SetLayoutStyles(uint32_t dwLayoutStyles);
231 void SetFont(IFX_Font* pFont); 231 void SetFont(CFX_GEFont* pFont);
232 void SetFontSize(FX_FLOAT fFontSize); 232 void SetFontSize(FX_FLOAT fFontSize);
233 void SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant); 233 void SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
234 void SetDefaultChar(FX_WCHAR wch); 234 void SetDefaultChar(FX_WCHAR wch);
235 void SetParagraphBreakChar(FX_WCHAR wch); 235 void SetParagraphBreakChar(FX_WCHAR wch);
236 void SetLineBreakTolerance(FX_FLOAT fTolerance); 236 void SetLineBreakTolerance(FX_FLOAT fTolerance);
237 void SetHorizontalScale(int32_t iScale); 237 void SetHorizontalScale(int32_t iScale);
238 void SetVerticalScale(int32_t iScale); 238 void SetVerticalScale(int32_t iScale);
239 void SetCharRotation(int32_t iCharRotation); 239 void SetCharRotation(int32_t iCharRotation);
240 void SetCharSpace(FX_FLOAT fCharSpace); 240 void SetCharSpace(FX_FLOAT fCharSpace);
241 void SetAlignment(int32_t iAlignment); 241 void SetAlignment(int32_t iAlignment);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 int32_t m_iLineWidth; 295 int32_t m_iLineWidth;
296 uint32_t m_dwLayoutStyles; 296 uint32_t m_dwLayoutStyles;
297 FX_BOOL m_bVertical; 297 FX_BOOL m_bVertical;
298 FX_BOOL m_bArabicContext; 298 FX_BOOL m_bArabicContext;
299 FX_BOOL m_bArabicShapes; 299 FX_BOOL m_bArabicShapes;
300 FX_BOOL m_bRTL; 300 FX_BOOL m_bRTL;
301 FX_BOOL m_bSingleLine; 301 FX_BOOL m_bSingleLine;
302 FX_BOOL m_bCombText; 302 FX_BOOL m_bCombText;
303 int32_t m_iArabicContext; 303 int32_t m_iArabicContext;
304 int32_t m_iCurArabicContext; 304 int32_t m_iCurArabicContext;
305 IFX_Font* m_pFont; 305 CFX_GEFont* m_pFont;
306 int32_t m_iFontSize; 306 int32_t m_iFontSize;
307 FX_BOOL m_bEquidistant; 307 FX_BOOL m_bEquidistant;
308 int32_t m_iTabWidth; 308 int32_t m_iTabWidth;
309 FX_WCHAR m_wDefChar; 309 FX_WCHAR m_wDefChar;
310 FX_WCHAR m_wParagBreakChar; 310 FX_WCHAR m_wParagBreakChar;
311 int32_t m_iDefChar; 311 int32_t m_iDefChar;
312 int32_t m_iLineRotation; 312 int32_t m_iLineRotation;
313 int32_t m_iCharRotation; 313 int32_t m_iCharRotation;
314 int32_t m_iRotation; 314 int32_t m_iRotation;
315 int32_t m_iAlignment; 315 int32_t m_iAlignment;
316 uint32_t m_dwContextCharStyles; 316 uint32_t m_dwContextCharStyles;
317 int32_t m_iCombWidth; 317 int32_t m_iCombWidth;
318 void* m_pUserData; 318 void* m_pUserData;
319 FX_CHARTYPE m_eCharType; 319 FX_CHARTYPE m_eCharType;
320 FX_BOOL m_bCurRTL; 320 FX_BOOL m_bCurRTL;
321 int32_t m_iCurAlignment; 321 int32_t m_iCurAlignment;
322 FX_BOOL m_bArabicNumber; 322 FX_BOOL m_bArabicNumber;
323 FX_BOOL m_bArabicComma; 323 FX_BOOL m_bArabicComma;
324 CFX_TxtLine* m_pTxtLine1; 324 CFX_TxtLine* m_pTxtLine1;
325 CFX_TxtLine* m_pTxtLine2; 325 CFX_TxtLine* m_pTxtLine2;
326 CFX_TxtLine* m_pCurLine; 326 CFX_TxtLine* m_pCurLine;
327 int32_t m_iReady; 327 int32_t m_iReady;
328 int32_t m_iTolerance; 328 int32_t m_iTolerance;
329 int32_t m_iHorScale; 329 int32_t m_iHorScale;
330 int32_t m_iVerScale; 330 int32_t m_iVerScale;
331 int32_t m_iCharSpace; 331 int32_t m_iCharSpace;
332 }; 332 };
333 333
334 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ 334 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698