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_CUI_SOURCE_INC_SVXMENUCONFIGPAGE_HXX
20 #define INCLUDED_CUI_SOURCE_INC_SVXMENUCONFIGPAGE_HXX
22 #include <vcl/weld.hxx>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/container/XIndexContainer.hpp>
25 #include <com/sun/star/container/XNameAccess.hpp>
26 #include <com/sun/star/ui/XUIConfigurationListener.hpp>
27 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
28 #include <com/sun/star/ui/XImageManager.hpp>
29 #include <com/sun/star/frame/XFrame.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
33 #include <sfx2/tabdlg.hxx>
37 #include "cfgutil.hxx"
38 #include "cfg.hxx" //for SvxConfigPage and SaveInData
40 class SvxMenuConfigPage
: public SvxConfigPage
45 DECL_LINK( SelectMenu
, weld::ComboBox
&, void );
46 DECL_LINK( SelectMenuEntry
, weld::TreeView
&, void );
48 DECL_LINK( GearHdl
, const OString
&, void );
50 DECL_LINK( SelectCategory
, weld::ComboBox
&, void );
52 DECL_LINK( AddCommandHdl
, weld::Button
&, void );
53 DECL_LINK( RemoveCommandHdl
, weld::Button
&, void );
55 DECL_LINK( InsertHdl
, const OString
&, void );
56 DECL_LINK( ModifyItemHdl
, const OString
&, void );
57 DECL_LINK( ResetMenuHdl
, weld::Button
&, void );
59 DECL_LINK( MenuEntriesSizeAllocHdl
, const Size
&, void );
61 DECL_LINK( ListModifiedHdl
, weld::TreeView
&, void );
64 void UpdateButtonStates() override
;
65 short QueryReset() override
;
66 void DeleteSelectedContent() override
;
67 void DeleteSelectedTopLevel() override
;
69 virtual void SelectElement() override
;
72 SvxMenuConfigPage(TabPageParent pParent
, const SfxItemSet
& rItemSet
, bool bIsMenuBar
= true);
73 virtual ~SvxMenuConfigPage() override
;
74 virtual void dispose() override
;
76 SaveInData
* CreateSaveInData(
77 const css::uno::Reference
<
78 css::ui::XUIConfigurationManager
>&,
79 const css::uno::Reference
<
80 css::ui::XUIConfigurationManager
>&,
81 const OUString
& aModuleId
,
82 bool docConfig
) override
;
85 #endif // INCLUDED_CUI_SOURCE_INC_SVXMENUCONFIGPAGE_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */