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 .
19 #ifndef INCLUDED_SVTOOLS_MENUOPTIONS_HXX
20 #define INCLUDED_SVTOOLS_MENUOPTIONS_HXX
22 #include <svtools/svtdllapi.h>
23 #include <sal/types.h>
24 #include <tools/gen.hxx>
25 #include <unotools/options.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 SvtMenuOptions_Impl
;
39 /*-************************************************************************************************************
40 @short collect information about menu features
41 @devstatus ready to use
42 *//*-*************************************************************************************************************/
44 class SAL_WARN_UNUSED SVT_DLLPUBLIC SvtMenuOptions
: public utl::detail::Options
48 virtual ~SvtMenuOptions() override
;
50 /*-****************************************************************************************************
51 @short interface methods to get and set value of config key "org.openoffice.Office.Common/View/Menu/..."
52 @descr These options describe internal states to enable/disable features of installed office.
54 IsEntryHidingEnabled()
55 SetEntryHidingState() => Activate this field for viewing all deactivated menu entries.
56 Menu commands that are normally not necessary are hidden by default.
59 IsFollowMouseEnabled()
60 SetFollowMouseState() => Automatic selection while moving the mouse on a menu.
63 @seealso configuration package "org.openoffice.Office.Common/View/Menu"
64 *//*-*****************************************************************************************************/
66 bool IsEntryHidingEnabled() const;
67 TriState
GetMenuIconsState() const;
68 void SetMenuIconsState(TriState eState
);
69 TriState
GetContextMenuShortcuts() const;
70 void SetContextMenuShortcuts(TriState eState
);
74 /*-****************************************************************************************************
75 @short return a reference to a static mutex
76 @descr These class is partially threadsafe (for de-/initialization only).
77 All access methods aren't safe!
78 We create a static mutex only for one ime and use at different times.
79 @return A reference to a static mutex member.
80 *//*-*****************************************************************************************************/
82 SVT_DLLPRIVATE
static ::osl::Mutex
& GetOwnStaticMutex();
85 std::shared_ptr
<SvtMenuOptions_Impl
> m_pImpl
;
87 }; // class SvtMenuOptions
89 #endif // #ifndef INCLUDED_SVTOOLS_MENUOPTIONS_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */