LibreOffice Module vcl (master)  1
ImplLayoutArgs.hxx
Go to the documentation of this file.
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.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include "sallayout.hxx"
21 
22 namespace vcl::text
23 {
25 {
26 public:
27  // string related inputs
30  const OUString& mrStr;
33 
34  // performance hack
36 
37  // positioning related inputs
38  const DeviceCoordinate* mpDXArray; // in integer pixel units
39  const double* mpAltNaturalDXArray; // in floating point pixel units
40  DeviceCoordinate mnLayoutWidth; // in pixel units
41  Degree10 mnOrientation; // in 0-3600 system
42 
43  // data for bidi and glyph+script fallback
46 
47  ImplLayoutArgs(OUString const& rStr, int nMinCharPos, int nEndCharPos, SalLayoutFlags nFlags,
48  LanguageTag const& rLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache);
49 
50  void SetLayoutWidth(DeviceCoordinate nWidth);
51  void SetDXArray(const DeviceCoordinate* pDXArray);
52  void SetAltNaturalDXArray(const double* pDXArray);
53  void SetOrientation(Degree10 nOrientation);
54 
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  // methods used by BiDi and glyph fallback
60  bool HasFallbackRun() const;
61  bool PrepareFallback(const SalLayoutGlyphsImpl* pGlyphsImpl);
62 
63 private:
64  void AddRun(int nMinCharPos, int nEndCharPos, bool bRTL);
65 };
66 }
67 
68 // For nice SAL_INFO logging of ImplLayoutArgs values
69 std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs);
70 
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
vcl::text::TextLayoutCache const * m_pTextLayoutCache
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_Int32 DeviceCoordinate
const DeviceCoordinate * mpDXArray
const double * mpAltNaturalDXArray
std::ostream & operator<<(std::ostream &s, vcl::text::ImplLayoutArgs const &rArgs)
DeviceCoordinate mnLayoutWidth
SalLayoutFlags