cool#6580 sw: fix infinite loop when changing document language
[LibreOffice.git] / include / vcl / decoview.hxx
blob5bcdcc1a208a80940fe185e4a7254a2ba778a391
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_DECOVIEW_HXX
21 #define INCLUDED_VCL_DECOVIEW_HXX
23 #include <vcl/dllapi.h>
24 #include <vcl/outdev.hxx>
25 #include <vcl/vclptr.hxx>
26 #include <vcl/vclenum.hxx>
27 #include <o3tl/typed_flags_set.hxx>
29 namespace tools { class Rectangle; }
30 class Point;
31 class Color;
33 // Flags for DrawSymbol()
34 enum class DrawSymbolFlags
36 NONE = 0x0000,
37 Mono = 0x0001,
38 Disable = 0x0002,
40 namespace o3tl
42 template<> struct typed_flags<DrawSymbolFlags> : is_typed_flags<DrawSymbolFlags, 0x03> {};
45 // Flags for DrawFrame()
46 enum class DrawFrameStyle
48 NONE = 0x0000,
49 In = 0x0001,
50 Out = 0x0002,
51 Group = 0x0003,
52 DoubleIn = 0x0004,
53 DoubleOut = 0x0005,
54 NWF = 0x0006,
56 enum class DrawFrameFlags
58 NONE = 0x0000,
59 Menu = 0x0010,
60 WindowBorder = 0x0020,
61 BorderWindowBorder = 0x0040,
62 Mono = 0x1000,
63 NoDraw = 0x8000,
65 namespace o3tl
67 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
70 // Flags for DrawHighlightFrame()
71 enum class DrawHighlightFrameStyle
73 In = 1,
74 Out = 2,
77 // Flags for DrawButton()
78 enum class DrawButtonFlags
80 NONE = 0x0000,
81 Default = 0x0001,
82 NoLightBorder = 0x0002,
83 Pressed = 0x0004,
84 Checked = 0x0008,
85 DontKnow = 0x0010,
86 Mono = 0x0020,
87 Disabled = 0x0040,
88 Highlight = 0x0100,
89 Flat = 0x0200,
90 NoLeftLightBorder = 0x1000
92 namespace o3tl
94 template<> struct typed_flags<DrawButtonFlags> : is_typed_flags<DrawButtonFlags, 0x137f> {};
97 class VCL_DLLPUBLIC DecorationView
99 private:
100 VclPtr<OutputDevice> mpOutDev;
102 public:
103 DecorationView(OutputDevice* pOutDev);
105 void DrawSymbol( const tools::Rectangle& rRect, SymbolType eType,
106 const Color& rColor, DrawSymbolFlags nStyle = DrawSymbolFlags::NONE );
107 void DrawFrame( const tools::Rectangle& rRect,
108 const Color& rLeftTopColor,
109 const Color& rRightBottomColor );
110 void DrawHighlightFrame( const tools::Rectangle& rRect,
111 DrawHighlightFrameStyle nStyle );
112 tools::Rectangle DrawFrame( const tools::Rectangle& rRect, DrawFrameStyle nStyle = DrawFrameStyle::Out, DrawFrameFlags nFlags = DrawFrameFlags::NONE );
113 tools::Rectangle DrawButton( const tools::Rectangle& rRect, DrawButtonFlags nStyle );
114 void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
115 void DrawHandle(const tools::Rectangle& rRectangle);
118 #endif // INCLUDED_VCL_DECOVIEW_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */