Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / vcl / outdevstate.hxx
blob8e2236bb34aed8cbfbb4751bd6d20eb2afe82e8f
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/region.hxx>
25 #include <vcl/font.hxx>
26 #include <vcl/vclenum.hxx>
28 #include <tools/solar.h>
29 #include <tools/gen.hxx>
30 #include <tools/color.hxx>
31 #include <tools/fontenum.hxx>
32 #include <o3tl/typed_flags_set.hxx>
34 // Flags for OutputDevice::Push() and OutDevState
35 enum class PushFlags {
36 NONE = 0x0000,
37 LINECOLOR = 0x0001,
38 FILLCOLOR = 0x0002,
39 FONT = 0x0004,
40 TEXTCOLOR = 0x0008,
41 MAPMODE = 0x0010,
42 CLIPREGION = 0x0020,
43 RASTEROP = 0x0040,
44 TEXTFILLCOLOR = 0x0080,
45 TEXTALIGN = 0x0100,
46 REFPOINT = 0x0200,
47 TEXTLINECOLOR = 0x0400,
48 TEXTLAYOUTMODE = 0x0800,
49 TEXTLANGUAGE = 0x1000,
50 OVERLINECOLOR = 0x2000,
51 ALL = 0xFFFF
54 namespace o3tl
56 template<> struct typed_flags<PushFlags> : is_typed_flags<PushFlags, 0xFFFF> {};
58 #define PUSH_ALLTEXT (PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR | PushFlags::TEXTLINECOLOR | PushFlags::OVERLINECOLOR | PushFlags::TEXTALIGN | PushFlags::TEXTLAYOUTMODE | PushFlags::TEXTLANGUAGE)
59 #define PUSH_ALLFONT (PUSH_ALLTEXT | PushFlags::FONT)
61 // Layout flags for Complex Text Layout
62 // These are flag values, i.e they can be combined
63 enum class ComplexTextLayoutFlags
65 Default = 0x0000,
66 BiDiRtl = 0x0001,
67 BiDiStrong = 0x0002,
68 TextOriginLeft = 0x0004,
69 TextOriginRight = 0x0008
71 namespace o3tl {
72 template<> struct typed_flags<ComplexTextLayoutFlags> : is_typed_flags<ComplexTextLayoutFlags, 0x000f> {};
75 class OutDevState
77 public:
78 OutDevState();
79 ~OutDevState();
81 MapMode* mpMapMode;
82 bool mbMapActive;
83 vcl::Region* mpClipRegion;
84 Color* mpLineColor;
85 Color* mpFillColor;
86 vcl::Font* mpFont;
87 Color* mpTextColor;
88 Color* mpTextFillColor;
89 Color* mpTextLineColor;
90 Color* mpOverlineColor;
91 Point* mpRefPoint;
92 TextAlign meTextAlign;
93 RasterOp meRasterOp;
94 ComplexTextLayoutFlags mnTextLayoutMode;
95 LanguageType meTextLanguage;
96 PushFlags mnFlags;
99 #endif // INCLUDED_VCL_OUTDEVSTATE_HXX
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */