Bump version to 6.4.7.2.M8
[LibreOffice.git] / cui / source / inc / CommandCategoryListBox.hxx
blob4075d1e22839e93b01d300a74c08c2a8f6e25f5e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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_COMMANDCATEGORYLISTBOX_HXX
20 #define INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX
22 #include <i18nutil/searchopt.hxx>
23 #include "cfgutil.hxx"
25 class CommandCategoryListBox
27 SfxGroupInfoArr_Impl m_aGroupInfo;
28 OUString m_sModuleLongName;
29 css::uno::Reference< css::uno::XComponentContext > m_xContext;
30 css::uno::Reference< css::frame::XFrame > m_xFrame;
31 css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo;
32 css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo;
33 css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription;
35 // For search
36 i18nutil::SearchOptions2 m_searchOptions;
38 SfxStylesInfo_Impl* pStylesInfo;
39 SfxStylesInfo_Impl m_aStylesInfo;
41 std::unique_ptr<weld::ComboBox> m_xControl;
43 public:
44 CommandCategoryListBox(std::unique_ptr<weld::ComboBox> xControl);
45 ~CommandCategoryListBox();
46 void ClearAll();
48 void Init(
49 const css::uno::Reference< css::uno::XComponentContext >& xContext,
50 const css::uno::Reference< css::frame::XFrame >& xFrame,
51 const OUString& sModuleLongName);
52 void FillFunctionsList(
53 const css::uno::Sequence< css::frame::DispatchInformation >& xCommands,
54 CuiConfigFunctionListBox* pFunctionListBox,
55 const OUString& filterTerm,
56 SaveInData *pCurrentSaveInData );
57 OUString getCommandName(const OUString& sCommand);
59 void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
61 /**
62 Signals that a command category has been selected.
63 And updates the functions list box to include
64 the commands in the selected category.
66 void categorySelected(CuiConfigFunctionListBox* pFunctionListBox,
67 const OUString& filterTerm, SaveInData* pCurrentSaveInData = nullptr);
69 void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
71 // Adds children of the given macro group to the functions list
72 void addChildren(
73 const weld::TreeIter* parentEntry, const css::uno::Reference<com::sun::star::script::browse::XBrowseNode> &parentNode,
74 CuiConfigFunctionListBox* pFunctionListBox, const OUString &filterTerm , SaveInData *pCurrentSaveInData,
75 std::vector<std::unique_ptr<weld::TreeIter>> &rNodesToExpand);
77 void set_visible(bool bVisible) {m_xControl->set_visible(bVisible);}
80 #endif // INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */