gb_var2file: remove now unused chunk-size parameter
[LibreOffice.git] / vcl / inc / ImplLayoutArgs.hxx
blob381d09185563c26e6836c99cd5bd591b0ed78569
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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 #include "sallayout.hxx"
22 namespace vcl::text
24 class VCL_DLLPUBLIC ImplLayoutArgs
26 public:
27 // string related inputs
28 LanguageTag maLanguageTag;
29 SalLayoutFlags mnFlags;
30 const OUString& mrStr;
31 int mnMinCharPos;
32 int mnEndCharPos;
34 // performance hack
35 vcl::text::TextLayoutCache const* m_pTextLayoutCache;
37 // positioning related inputs
38 const double* mpNaturalDXArray; // in floating point pixel units
39 const sal_Bool* mpKashidaArray;
40 DeviceCoordinate mnLayoutWidth; // in pixel units
41 Degree10 mnOrientation; // in 0-3600 system
43 // data for bidi and glyph+script fallback
44 ImplLayoutRuns maRuns;
45 ImplLayoutRuns maFallbackRuns;
47 ImplLayoutArgs(OUString const& rStr, int nMinCharPos, int nEndCharPos, SalLayoutFlags nFlags,
48 LanguageTag aLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache);
50 void SetLayoutWidth(DeviceCoordinate nWidth);
51 void SetNaturalDXArray(const double* pDXArray);
52 void SetKashidaArray(const sal_Bool* pKashidaArray);
53 void SetOrientation(Degree10 nOrientation);
55 void ResetPos();
56 bool GetNextPos(int* nCharPos, bool* bRTL);
57 bool GetNextRun(int* nMinRunPos, int* nEndRunPos, bool* bRTL);
58 void AddFallbackRun(int nMinRunPos, int nEndRunPos, bool bRTL);
59 bool HasDXArray() const { return mpNaturalDXArray; }
61 // methods used by BiDi and glyph fallback
62 bool HasFallbackRun() const;
63 bool PrepareFallback(const SalLayoutGlyphsImpl* pGlyphsImpl);
65 private:
66 void AddRun(int nMinCharPos, int nEndCharPos, bool bRTL);
70 // For nice SAL_INFO logging of ImplLayoutArgs values
71 std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs);
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */