nss: upgrade to release 3.73
[LibreOffice.git] / include / svtools / menuoptions.hxx
blob1a08c736325c21c51ba9d76a0ebf72b5b7a5df7f
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 .
19 #pragma once
21 #include <svtools/svtdllapi.h>
22 #include <sal/types.h>
23 #include <tools/gen.hxx>
24 #include <unotools/options.hxx>
25 #include <memory>
27 namespace osl
29 class Mutex;
32 /*-************************************************************************************************************
33 @short forward declaration to our private date container implementation
34 @descr We use these class as internal member to support small memory requirements.
35 You can create the container if it is necessary. The class which use these mechanism
36 is faster and smaller then a complete implementation!
37 **-***********************************************************************************************************/
39 class SvtMenuOptions_Impl;
41 /*-************************************************************************************************************
42 @short collect information about menu features
43 @devstatus ready to use
44 **-***********************************************************************************************************/
46 class SAL_WARN_UNUSED SVT_DLLPUBLIC SvtMenuOptions final : public utl::detail::Options
48 public:
49 SvtMenuOptions();
50 virtual ~SvtMenuOptions() override;
52 /*-****************************************************************************************************
53 @short interface methods to get and set value of config key "org.openoffice.Office.Common/View/Menu/..."
54 @descr These options describe internal states to enable/disable features of installed office.
56 IsEntryHidingEnabled()
57 SetEntryHidingState() => Activate this field for viewing all deactivated menu entries.
58 Menu commands that are normally not necessary are hidden by default.
59 Default=false
61 IsFollowMouseEnabled()
62 SetFollowMouseState() => Automatic selection while moving the mouse on a menu.
63 Default=true
65 @seealso configuration package "org.openoffice.Office.Common/View/Menu"
66 **-***************************************************************************************************/
68 bool IsEntryHidingEnabled() const;
69 TriState GetMenuIconsState() const;
70 void SetMenuIconsState(TriState eState);
71 TriState GetContextMenuShortcuts() const;
72 void SetContextMenuShortcuts(TriState eState);
74 private:
75 /*-****************************************************************************************************
76 @short return a reference to a static mutex
77 @descr These class is partially threadsafe (for de-/initialization only).
78 All access methods aren't safe!
79 We create a static mutex only for one ime and use at different times.
80 @return A reference to a static mutex member.
81 **-***************************************************************************************************/
83 SVT_DLLPRIVATE static ::osl::Mutex& GetOwnStaticMutex();
85 private:
86 std::shared_ptr<SvtMenuOptions_Impl> m_pImpl;
88 }; // class SvtMenuOptions
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */