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_SVTOOLS_OPTIONSDRAWINGLAYER_HXX
21 #define INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX
23 #include <svtools/svtdllapi.h>
24 #include <sal/types.h>
25 #include <tools/color.hxx>
28 namespace osl
{ class Mutex
; }
30 /*-************************************************************************************************************
31 @short forward declaration to our private date container implementation
32 @descr We use these class as internal member to support small memory requirements.
33 You can create the container if it is necessary. The class which use these mechanism
34 is faster and smaller then a complete implementation!
35 *//*-*************************************************************************************************************/
37 class SvtOptionsDrawinglayer_Impl
;
39 /*-************************************************************************************************************
40 @short collect information about startup features
41 @devstatus ready to use
42 *//*-*************************************************************************************************************/
44 class SVT_DLLPUBLIC SvtOptionsDrawinglayer
48 SvtOptionsDrawinglayer();
49 ~SvtOptionsDrawinglayer();
51 /*-****************************************************************************************************
52 @short interface methods to get and set value of config key "org.openoffice.Office.Common/Drawinglayer/..."
53 @descr These options describe internal states to enable/disable features of installed office.
56 SetOverlayBuffer() => Activate this field for letting Overlay use a buffer
59 SetPaintBuffer() => Activate this field for letting Paint use a prerender buffer
62 SetStripeColorA() => Set first of two colors which overlay uses to draw stripes
65 SetStripeColorB() => Set second of two colors which overlay uses to draw stripes
68 SetStripeLength() => Set length of a single stripe in pixels
70 @seealso configuration package "org.openoffice.Office.Common/Drawinglayer"
71 *//*-*****************************************************************************************************/
73 bool IsOverlayBuffer() const;
74 bool IsPaintBuffer() const;
75 Color
GetStripeColorA() const;
76 Color
GetStripeColorB() const;
77 sal_uInt16
GetStripeLength() const;
80 bool IsOverlayBuffer_Calc() const;
81 bool IsOverlayBuffer_Writer() const;
82 bool IsOverlayBuffer_DrawImpress() const;
85 bool IsPaintBuffer_Calc() const;
86 bool IsPaintBuffer_Writer() const;
87 bool IsPaintBuffer_DrawImpress() const;
90 sal_uInt32
GetMaximumPaperWidth() const;
91 sal_uInt32
GetMaximumPaperHeight() const;
92 sal_uInt32
GetMaximumPaperLeftMargin() const;
93 sal_uInt32
GetMaximumPaperRightMargin() const;
94 sal_uInt32
GetMaximumPaperTopMargin() const;
95 sal_uInt32
GetMaximumPaperBottomMargin() const;
97 // #i95644# helper to check if AA is allowed on this system. Currently, for WIN its disabled
98 // and OutDevSupportType::TransparentRect is checked (this hits XRenderExtension, e.g.
99 // currently for SunRay as long as not supported there)
100 bool IsAAPossibleOnThisSystem() const;
103 bool IsAntiAliasing() const;
104 bool IsSnapHorVerLinesToDiscrete() const;
105 bool IsSolidDragCreate() const;
106 bool IsRenderDecoratedTextDirect() const;
107 bool IsRenderSimpleTextDirect() const;
108 sal_uInt32
GetQuadratic3DRenderLimit() const;
109 sal_uInt32
GetQuadraticFormControlRenderLimit() const;
111 void SetAntiAliasing( bool bState
);
113 // #i97672# selection settings
114 bool IsTransparentSelection() const;
115 sal_uInt16
GetTransparentSelectionPercent() const;
116 sal_uInt16
GetSelectionMaximumLuminancePercent() const;
118 // get system highlight color, limited to the maximum allowed luminance
119 // (defined in GetSelectionMaximumLuminancePercent() in SvtOptionsDrawinglayer,
120 // combined with Application::GetSettings().GetStyleSettings().GetHighlightColor())
121 Color
getHilightColor() const;
125 /*-****************************************************************************************************
126 @short return a reference to a static mutex
127 @descr These class use his own static mutex to be threadsafe.
128 We create a static mutex only for one ime and use at different times.
129 @return A reference to a static mutex member.
130 *//*-*****************************************************************************************************/
131 SVT_DLLPRIVATE
static ::osl::Mutex
& GetOwnStaticMutex();
133 std::shared_ptr
<SvtOptionsDrawinglayer_Impl
> m_pImpl
;
136 #endif // #ifndef INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */