LibreOffice Module sw (master)  1
WrapPropertyPanel.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 #ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_WRAPPROPERTYPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_WRAPPROPERTYPANEL_HXX
21 
24 #include <sfx2/weldutils.hxx>
25 #include <com/sun/star/frame/XFrame.hpp>
26 #include <vcl/weld.hxx>
27 
28 namespace sw::sidebar {
29 
31  : public PanelLayout
33  {
34  public:
35  static std::unique_ptr<PanelLayout> Create(
36  weld::Widget* pParent,
37  const css::uno::Reference< css::frame::XFrame>& rxFrame,
38  SfxBindings* pBindings );
39 
40  // interface of ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
41  virtual void NotifyItemUpdate(
42  const sal_uInt16 nSId,
43  const SfxItemState eState,
44  const SfxPoolItem* pState) override;
45 
46  virtual void GetControlState(
47  const sal_uInt16 /*nSId*/,
48  boost::property_tree::ptree& /*rState*/) override {};
49 
50  virtual ~WrapPropertyPanel() override;
51 
53  weld::Widget* pParent,
54  const css::uno::Reference< css::frame::XFrame >& rxFrame,
55  SfxBindings* pBindings );
56  private:
58 
59  //Spacing
60  sal_uInt16 nTop;
61  sal_uInt16 nBottom;
62  sal_uInt16 nLeft;
63  sal_uInt16 nRight;
64 
65  //custom entry
66  OUString aCustomEntry;
67 
68  // Controller Items
71 
72  std::unique_ptr<weld::Toolbar> mxWrapOptions;
73  std::unique_ptr<ToolbarUnoDispatcher> mxWrapOptionsDispatch;
74 
75  std::unique_ptr<weld::ComboBox> mxSpacingLB;
76 
77  void Initialize();
78  void UpdateSpacingLB();
79 
80  DECL_LINK(SpacingLBHdl, weld::ComboBox&, void);
81  };
82 
83 } // end of namespace ::sw::sidebar
84 
85 #endif
86 
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< weld::Toolbar > mxWrapOptions
DECL_LINK(SpacingLBHdl, weld::ComboBox &, void)
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
std::unique_ptr< ToolbarUnoDispatcher > mxWrapOptionsDispatch
::sfx2::sidebar::ControllerItem maSwULSpacingControl
std::unique_ptr< weld::ComboBox > mxSpacingLB
WrapPropertyPanel(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
SfxItemState
::sfx2::sidebar::ControllerItem maSwLRSpacingControl