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 
19 namespace sw::sidebar {
20 
23 {
24 public:
25  static std::unique_ptr<PanelLayout> Create(weld::Widget* pParent);
26 
28 
29  virtual ~StylePresetsPanel() override;
30 
31  virtual void NotifyItemUpdate(const sal_uInt16 nSId,
32  const SfxItemState eState,
33  const SfxPoolItem* pState) override;
34 
35  virtual void GetControlState(
36  const sal_uInt16 /*nSId*/,
37  boost::property_tree::ptree& /*rState*/) override {};
38 
39 private:
41  {
42  explicit TemplateEntry(const OUString& rURL)
43  : maURL(rURL)
44  {}
45 
46  OUString maURL;
47  };
48 
49  void RefreshList();
50 
51  std::unique_ptr<ValueSet> mxValueSet;
52  std::unique_ptr<weld::CustomWeld> mxValueSetWin;
53 
54  std::vector<std::unique_ptr<TemplateEntry>> maTemplateEntries;
55 
56  DECL_LINK(DoubleClickHdl, ValueSet*, void);
57 };
58 
59 } // end of namespace sw::sidebar
60 
61 
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< std::unique_ptr< TemplateEntry > > maTemplateEntries
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
std::unique_ptr< ValueSet > mxValueSet
DECL_LINK(DoubleClickHdl, ValueSet *, void)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent)
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
SfxItemState
StylePresetsPanel(weld::Widget *pParent)
std::unique_ptr< weld::CustomWeld > mxValueSetWin