LibreOffice Module sw (master) 1
StylePresetsPanel.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 */
10
11#pragma once
12
13#include <memory>
14
17#include <svtools/valueset.hxx>
18#include <utility>
19
20namespace sw::sidebar {
21
24{
25public:
26 static std::unique_ptr<PanelLayout> Create(weld::Widget* pParent);
27
29
30 virtual ~StylePresetsPanel() override;
31
32 virtual void NotifyItemUpdate(const sal_uInt16 nSId,
33 const SfxItemState eState,
34 const SfxPoolItem* pState) override;
35
36 virtual void GetControlState(
37 const sal_uInt16 /*nSId*/,
38 boost::property_tree::ptree& /*rState*/) override {};
39
40private:
42 {
43 explicit TemplateEntry(OUString aURL)
44 : maURL(std::move(aURL))
45 {}
46
47 OUString maURL;
48 };
49
50 void RefreshList();
51
52 std::unique_ptr<ValueSet> mxValueSet;
53 std::unique_ptr<weld::CustomWeld> mxValueSetWin;
54
55 std::vector<std::unique_ptr<TemplateEntry>> maTemplateEntries;
56
57 DECL_LINK(DoubleClickHdl, ValueSet*, void);
58};
59
60} // end of namespace sw::sidebar
61
62
63/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(DoubleClickHdl, ValueSet *, void)
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
StylePresetsPanel(weld::Widget *pParent)
std::unique_ptr< ValueSet > mxValueSet
std::unique_ptr< weld::CustomWeld > mxValueSetWin
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent)
std::vector< std::unique_ptr< TemplateEntry > > maTemplateEntries
URL aURL
SfxItemState