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 pixel units
39  DeviceCoordinate mnLayoutWidth; // in pixel units
40  Degree10 mnOrientation; // in 0-3600 system
41 
42  // data for bidi and glyph+script fallback
45 
46  ImplLayoutArgs(OUString const& rStr, int nMinCharPos, int nEndCharPos, SalLayoutFlags nFlags,
47  LanguageTag const& rLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache);
48 
49  void SetLayoutWidth(DeviceCoordinate nWidth);
50  void SetDXArray(const DeviceCoordinate* pDXArray);
51  void SetOrientation(Degree10 nOrientation);
52 
53  void ResetPos();
54  bool GetNextPos(int* nCharPos, bool* bRTL);
55  bool GetNextRun(int* nMinRunPos, int* nEndRunPos, bool* bRTL);
56  void AddFallbackRun(int nMinRunPos, int nEndRunPos, bool bRTL);
57  // methods used by BiDi and glyph fallback
58  bool HasFallbackRun() const;
59  bool PrepareFallback(const SalLayoutGlyphsImpl* pGlyphsImpl);
60 
61 private:
62  void AddRun(int nMinCharPos, int nEndCharPos, bool bRTL);
63 };
64 }
65 
66 // For nice SAL_INFO logging of ImplLayoutArgs values
67 std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs);
68 
69 /* 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
const DeviceCoordinate * mpDXArray
tools::Long DeviceCoordinate
std::ostream & operator<<(std::ostream &s, vcl::text::ImplLayoutArgs const &rArgs)
DeviceCoordinate mnLayoutWidth
SalLayoutFlags