lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / vcl / outdevstate.hxx
blob5f0b12d41d86c3412aee44bb8ea012c8559e6c1a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #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>
30 #include <memory>
31 #include <o3tl/optional.hxx>
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 {
39 NONE = 0x0000,
40 LINECOLOR = 0x0001,
41 FILLCOLOR = 0x0002,
42 FONT = 0x0004,
43 TEXTCOLOR = 0x0008,
44 MAPMODE = 0x0010,
45 CLIPREGION = 0x0020,
46 RASTEROP = 0x0040,
47 TEXTFILLCOLOR = 0x0080,
48 TEXTALIGN = 0x0100,
49 REFPOINT = 0x0200,
50 TEXTLINECOLOR = 0x0400,
51 TEXTLAYOUTMODE = 0x0800,
52 TEXTLANGUAGE = 0x1000,
53 OVERLINECOLOR = 0x2000,
54 ALL = 0xFFFF
57 namespace o3tl
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
68 Default = 0x0000,
69 BiDiRtl = 0x0001,
70 BiDiStrong = 0x0002,
71 TextOriginLeft = 0x0004,
72 TextOriginRight = 0x0008
74 namespace o3tl {
75 template<> struct typed_flags<ComplexTextLayoutFlags> : is_typed_flags<ComplexTextLayoutFlags, 0x000f> {};
78 struct OutDevState
80 OutDevState();
81 OutDevState(OutDevState&&);
82 ~OutDevState();
84 o3tl::optional<MapMode> mpMapMode;
85 bool mbMapActive;
86 std::unique_ptr<vcl::Region> mpClipRegion;
87 o3tl::optional<Color> mpLineColor;
88 o3tl::optional<Color> mpFillColor;
89 std::unique_ptr<vcl::Font> mpFont;
90 o3tl::optional<Color> mpTextColor;
91 o3tl::optional<Color> mpTextFillColor;
92 o3tl::optional<Color> mpTextLineColor;
93 o3tl::optional<Color> mpOverlineColor;
94 o3tl::optional<Point> mpRefPoint;
95 TextAlign meTextAlign;
96 RasterOp meRasterOp;
97 ComplexTextLayoutFlags mnTextLayoutMode;
98 LanguageType meTextLanguage;
99 PushFlags mnFlags;
102 #endif // INCLUDED_VCL_OUTDEVSTATE_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */