xref: /AOO41X/main/svtools/inc/svtools/accessibilityoptions.hxx (revision 3ce09a58b0d6873449cda31e55c66dba2dbc8f7f)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef INCLUDED_SVTOOLS_ACCESSIBILITYOPTIONS_HXX
24 #define INCLUDED_SVTOOLS_ACCESSIBILITYOPTIONS_HXX
25 
26 #include "svtools/svtdllapi.h"
27 #include <unotools/configitem.hxx>
28 #include <tools/string.hxx>
29 #include <svl/brdcst.hxx>
30 #include <svl/lstner.hxx>
31 #include <unotools/options.hxx>
32 
33 class SvtAccessibilityOptions_Impl;
34 
35 class SVT_DLLPUBLIC SvtAccessibilityOptions:
36     public utl::detail::Options, private SfxListener
37 {
38 private:
39     static SvtAccessibilityOptions_Impl* volatile sm_pSingleImplConfig;
40     static sal_Int32                     volatile sm_nAccessibilityRefCount;
41 
42 public:
43     SvtAccessibilityOptions();
44     virtual ~SvtAccessibilityOptions();
45 
46     // get & set config entries
47     sal_Bool    GetIsForDrawings() const;       // obsolete!
48     sal_Bool    GetIsForBorders() const;        // obsolete!
49     sal_Bool    GetIsForPagePreviews() const;
50     sal_Bool    GetIsHelpTipsDisappear() const;
51     sal_Bool    GetIsAllowAnimatedGraphics() const;
52     sal_Bool    GetIsAllowAnimatedText() const;
53     sal_Bool    GetIsAutomaticFontColor() const;
54     sal_Bool    GetIsSystemFont() const;
55     sal_Int16   GetHelpTipSeconds() const;
56     sal_Bool    IsSelectionInReadonly() const;
57     sal_Bool    GetAutoDetectSystemHC() const;
58 
59     // option to activate EdgeBlending for previews in the UI (ColorValueSet, ColorDropDown,
60     // FillStyle/LineStyle previews, etc...). 0 == off, 100% == full paint, in-between == alpha
61     sal_Int16   GetEdgeBlending() const;
62 
63     // option to set a maximum line count for ListBoxes; when less or equal than this count
64     // is in a ListBox, all will be shown, else a ScrollBar will be used
65     sal_Int16   GetListBoxMaximumLineCount() const;
66 
67     // option to set the width of ColorValueSets in columns; this allows
68     // adaption to own colr set layouts. The default layout is 12 columns and should
69     // only be changed when the color palette is changed from the default
70     sal_Int16   GetColorValueSetColumnCount() const;
71 
72     // option to make previews show the content with a checkeded background to allow
73     // simple identification and better preview of transparent content
74     sal_Bool    GetPreviewUsesCheckeredBackground() const;
75 
76     void        SetIsForPagePreviews(sal_Bool bSet);
77     void        SetIsHelpTipsDisappear(sal_Bool bSet);
78     void        SetIsAllowAnimatedGraphics(sal_Bool bSet);
79     void        SetIsAllowAnimatedText(sal_Bool bSet);
80     void        SetIsAutomaticFontColor(sal_Bool bSet);
81     void        SetIsSystemFont(sal_Bool bSet);
82     void        SetHelpTipSeconds(sal_Int16 nSet);
83     void        SetSelectionInReadonly(sal_Bool bSet);
84     void        SetAutoDetectSystemHC(sal_Bool bSet);
85 
86     void        SetEdgeBlending(sal_Int16 nSet);
87     void        SetListBoxMaximumLineCount(sal_Int16 nSet);
88     void        SetColorValueSetColumnCount(sal_Int16 nSet);
89     void        SetPreviewUsesCheckeredBackground(sal_Bool bSet);
90 
91     sal_Bool                IsModified() const;
92     void                    Commit();
93 
94     //SfxListener:
95     virtual void        Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
96     void        SetVCLSettings();
97 };
98 
99 #endif // #ifndef INCLUDED_SVTOOLS_ACCESSIBILITYOPTIONS_HXX
100 
101