1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _VCL_AQUA_CORETEXT_SALCORETEXTLAYOUT_HXX
21 #define _VCL_AQUA_CORETEXT_SALCORETEXTLAYOUT_HXX
23 #include <tools/poly.hxx>
25 #include "sallayout.hxx"
27 class AquaSalGraphics
;
28 class CoreTextStyleInfo
;
30 class CoreTextLayout
: public SalLayout
33 CoreTextLayout( AquaSalGraphics
* graphics
, CoreTextStyleInfo
* style
);
34 virtual ~CoreTextLayout();
36 virtual void AdjustLayout( ImplLayoutArgs
& );
37 virtual void DrawText( SalGraphics
& ) const;
38 virtual void DropGlyph( int nStart
);
39 virtual long FillDXArray( sal_Int32
* pDXArray
) const;
40 virtual bool GetBoundRect( SalGraphics
&, Rectangle
& ) const;
41 virtual void GetCaretPositions( int nArraySize
, sal_Int32
* pCaretXArray
) const;
42 virtual bool GetGlyphOutlines( SalGraphics
&, PolyPolyVector
& ) const;
43 virtual int GetNextGlyphs( int nLen
, sal_GlyphId
* pGlyphs
, Point
& rPos
, int&,
44 sal_Int32
* pGlyphAdvances
, int* pCharIndexes
) const;
45 virtual int GetTextBreak( long nMaxWidth
, long nCharExtra
, int nFactor
) const;
46 virtual long GetTextWidth() const;
47 virtual void InitFont() const;
48 virtual bool LayoutText( ImplLayoutArgs
& );
49 virtual void MoveGlyph( int nStart
, long nNewXPos
);
50 virtual void Simplify( bool bIsBase
);
56 AquaSalGraphics
* m_graphics
;
57 CoreTextStyleInfo
* m_style
;
58 mutable int m_glyphs_count
;
59 mutable int m_chars_count
;
60 mutable int* m_chars2glyphs
;
61 mutable int* m_glyphs2chars
;
62 mutable CGGlyph
* m_glyphs
;
63 mutable int* m_char_widths
;
64 mutable int* m_glyph_advances
;
65 mutable CGPoint
* m_glyph_positions
;
66 CTTypesetterRef m_typesetter
;
68 mutable bool m_has_bound_rec
;
69 mutable Rectangle m_bound_rect
;
70 CGFloat m_base_advance
;
71 mutable CGFloat m_cached_width
;
72 mutable CFIndex m_current_run_index
;
73 mutable CFIndex m_current_glyph_index
;
74 mutable CFIndex m_current_glyphrun_index
;
75 mutable CFArrayRef m_runs
;
79 #endif // _VCL_AQUA_CORETEXT_SALCORETEXTLAYOUT_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */