Bump version to 6.4.7.2.M8
[LibreOffice.git] / cui / source / inc / SvxToolbarConfigPage.hxx
blob542eee2006d152f57e42b50b07bdded15eeb2efe
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 #ifndef INCLUDED_CUI_SOURCE_INC_SVXTOOLBARCONFIGPAGE_HXX
20 #define INCLUDED_CUI_SOURCE_INC_SVXTOOLBARCONFIGPAGE_HXX
22 #include <vcl/weld.hxx>
23 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
25 #include <memory>
27 #include "cfg.hxx" //for SvxConfigPage and SaveInData
29 class SvxToolbarConfigPage : public SvxConfigPage
31 private:
33 DECL_LINK( SelectToolbar, weld::ComboBox&, void );
34 DECL_LINK( SelectToolbarEntry, weld::TreeView&, void );
35 DECL_LINK( MoveHdl, weld::Button&, void );
37 DECL_LINK( GearHdl, const OString&, void );
39 DECL_LINK( SelectCategory, weld::ComboBox&, void );
41 DECL_LINK( AddCommandHdl, weld::Button&, void );
42 DECL_LINK( RemoveCommandHdl, weld::Button&, void );
44 DECL_LINK( InsertHdl, const OString&, void );
45 DECL_LINK( ModifyItemHdl, const OString&, void );
46 DECL_LINK( ResetToolbarHdl, weld::Button&, void );
48 virtual void ListModified() override;
50 void UpdateButtonStates() override;
51 short QueryReset() override;
52 void Init() override;
53 void DeleteSelectedContent() override;
54 void DeleteSelectedTopLevel() override;
55 virtual void SelectElement() override;
57 public:
58 SvxToolbarConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rItemSet);
59 virtual ~SvxToolbarConfigPage() override;
61 void AddFunction(int nTarget = -1);
63 void MoveEntry( bool bMoveUp ) override;
65 SaveInData* CreateSaveInData(
66 const css::uno::Reference <
67 css::ui::XUIConfigurationManager >&,
68 const css::uno::Reference <
69 css::ui::XUIConfigurationManager >&,
70 const OUString& aModuleId,
71 bool docConfig ) override;
74 class SvxToolbarEntriesListBox final : public SvxMenuEntriesListBox
76 void ChangedVisibility(int nRow);
78 typedef std::pair<int, int> row_col;
79 DECL_LINK(CheckButtonHdl, const row_col&, void);
80 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
82 public:
84 SvxToolbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxToolbarConfigPage* pPg);
85 virtual ~SvxToolbarEntriesListBox() override;
88 #endif // INCLUDED_CUI_SOURCE_INC_SVXTOOLBARCONFIGPAGE_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */