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 INCLUDED_VCL_OUTDEVSTATE_HXX
21 #define INCLUDED_VCL_OUTDEVSTATE_HXX
23 #include <vcl/mapmod.hxx>
24 #include <vcl/vclenum.hxx>
26 #include <tools/color.hxx>
27 #include <tools/gen.hxx>
28 #include <tools/fontenum.hxx>
29 #include <o3tl/typed_flags_set.hxx>
31 #include <boost/optional.hpp>
32 #include <i18nlangtag/lang.h>
34 namespace vcl
{ class Font
; }
35 namespace vcl
{ class Region
; }
37 // Flags for OutputDevice::Push() and OutDevState
38 enum class PushFlags
{
47 TEXTFILLCOLOR
= 0x0080,
50 TEXTLINECOLOR
= 0x0400,
51 TEXTLAYOUTMODE
= 0x0800,
52 TEXTLANGUAGE
= 0x1000,
53 OVERLINECOLOR
= 0x2000,
59 template<> struct typed_flags
<PushFlags
> : is_typed_flags
<PushFlags
, 0xFFFF> {};
61 #define PUSH_ALLTEXT (PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR | PushFlags::TEXTLINECOLOR | PushFlags::OVERLINECOLOR | PushFlags::TEXTALIGN | PushFlags::TEXTLAYOUTMODE | PushFlags::TEXTLANGUAGE)
62 #define PUSH_ALLFONT (PUSH_ALLTEXT | PushFlags::FONT)
64 // Layout flags for Complex Text Layout
65 // These are flag values, i.e they can be combined
66 enum class ComplexTextLayoutFlags
71 TextOriginLeft
= 0x0004,
72 TextOriginRight
= 0x0008
75 template<> struct typed_flags
<ComplexTextLayoutFlags
> : is_typed_flags
<ComplexTextLayoutFlags
, 0x000f> {};
84 boost::optional
<MapMode
> mpMapMode
;
86 std::unique_ptr
<vcl::Region
> mpClipRegion
;
87 boost::optional
<Color
> mpLineColor
;
88 boost::optional
<Color
> mpFillColor
;
89 std::unique_ptr
<vcl::Font
> mpFont
;
90 boost::optional
<Color
> mpTextColor
;
91 boost::optional
<Color
> mpTextFillColor
;
92 boost::optional
<Color
> mpTextLineColor
;
93 boost::optional
<Color
> mpOverlineColor
;
94 boost::optional
<Point
> mpRefPoint
;
95 TextAlign meTextAlign
;
97 ComplexTextLayoutFlags mnTextLayoutMode
;
98 LanguageType meTextLanguage
;
102 #endif // INCLUDED_VCL_OUTDEVSTATE_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */