LibreOffice Module cui (master) 1
SvxNotebookbarConfigPage.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <libxml/parser.h>
23#include <vcl/weld.hxx>
24#include <com/sun/star/ui/XUIConfigurationManager.hpp>
25
26#include <memory>
27#include <vector>
28
29#include "cfg.hxx" //for SvxConfigPage and SaveInData
30
32{
33private:
34 void UpdateButtonStates() override;
35 short QueryReset() override;
36 void Init() override;
37 void DeleteSelectedContent() override;
38 void DeleteSelectedTopLevel() override;
39 virtual void SelectElement() override;
40 void SetElement();
41
42public:
44 {
45 OUString sUIItemId;
46 OUString sClassId;
47 OUString sActionName;
48 OUString sDisplayName;
49 OUString sVisibleValue;
50 };
52 {
53 OUString sDisplayName;
54 OUString sUIItemId;
55 OUString sClassType;
56 };
58 const SfxItemSet& rItemSet);
59 virtual ~SvxNotebookbarConfigPage() override;
60 SaveInData* CreateSaveInData(const css::uno::Reference<css::ui::XUIConfigurationManager>&,
61 const css::uno::Reference<css::ui::XUIConfigurationManager>&,
62 const OUString& aModuleId, bool docConfig) override;
63 static void FillFunctionsList(xmlNodePtr pRootNodePtr,
64 std::vector<NotebookbarEntries>& aEntries,
65 std::vector<CategoriesEntries>& aCategoryList,
66 OUString& sActiveCategory);
67 static void searchNodeandAttribute(std::vector<NotebookbarEntries>& aEntries,
68 std::vector<CategoriesEntries>& aCategoryList,
69 OUString& sActiveCategory,
70 CategoriesEntries& aCurCategoryEntry, xmlNode* pNodePtr,
71 bool isCategory);
72 static void getNodeValue(xmlNode* pNodePtr, NotebookbarEntries& aNodeEntries);
73};
74
76{
77 typedef std::unordered_map<OUString, OUString> TooltipMap;
79
80 void ChangedVisibility(int nRow);
81 DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col&, void);
82 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
83 DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
84
85public:
86 SvxNotebookbarEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPg);
87 virtual ~SvxNotebookbarEntriesListBox() override;
88
90};
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SvxNotebookbarConfigPage() override
static void getNodeValue(xmlNode *pNodePtr, NotebookbarEntries &aNodeEntries)
static void searchNodeandAttribute(std::vector< NotebookbarEntries > &aEntries, std::vector< CategoriesEntries > &aCategoryList, OUString &sActiveCategory, CategoriesEntries &aCurCategoryEntry, xmlNode *pNodePtr, bool isCategory)
SvxNotebookbarConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rItemSet)
virtual void SelectElement() override
SaveInData * CreateSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig) override
static void FillFunctionsList(xmlNodePtr pRootNodePtr, std::vector< NotebookbarEntries > &aEntries, std::vector< CategoriesEntries > &aCategoryList, OUString &sActiveCategory)
std::unordered_map< OUString, OUString > TooltipMap
DECL_LINK(CheckButtonHdl, const weld::TreeView::iter_col &, void)
SvxNotebookbarEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPg)
DECL_LINK(QueryTooltip, const weld::TreeIter &rIter, OUString)
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
std::pair< const TreeIter &, int > iter_col