LibreOffice Module sw (master)  1
PageFooterPanel.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_PAGEFOOTERPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEFOOTERPANEL_HXX
21 
22 #include <memory>
23 #include <com/sun/star/frame/XFrame.hpp>
24 
26 
28 
29 #include <svx/rulritem.hxx>
30 
31 #include <svl/intitem.hxx>
32 #include <svl/poolitem.hxx>
33 #include <svl/eitem.hxx>
34 #include <svx/spacinglistbox.hxx>
36 
37 namespace sw::sidebar {
38 
40  public PanelLayout,
42 {
43 public:
45  vcl::Window* pParent,
46  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
47  SfxBindings* pBindings);
48 
49  virtual void NotifyItemUpdate(
50  const sal_uInt16 nSId,
51  const SfxItemState eState,
52  const SfxPoolItem* pState) override;
53 
54  virtual void GetControlState(
55  const sal_uInt16 /*nSId*/,
56  boost::property_tree::ptree& /*rState*/) override {};
57 
58  SfxBindings* GetBindings() const { return mpBindings; }
60  vcl::Window* pParent,
61  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
62  SfxBindings* pBindings);
63  virtual ~PageFooterPanel() override;
64  virtual void dispose() override;
65 
66 private:
67 
69 
75 
77 
78  OUString aCustomEntry;
79 
80  void Initialize();
82  void UpdateFooterCheck();
83  void UpdateMarginControl();
84  void UpdateSpacingControl();
85  void UpdateLayoutControl();
86 
87  ::std::unique_ptr<SfxBoolItem> mpFooterItem;
88  ::std::unique_ptr<SvxLongLRSpaceItem> mpFooterLRMarginItem;
89  ::std::unique_ptr<SvxLongULSpaceItem> mpFooterSpacingItem;
90  ::std::unique_ptr<SfxInt16Item> mpFooterLayoutItem;
91 
92  std::unique_ptr<weld::CheckButton> mxFooterToggle;
93  std::unique_ptr<weld::ComboBox> mxFooterSpacingLB;
94  std::unique_ptr<weld::ComboBox> mxFooterMarginPresetLB;
95  std::unique_ptr<weld::ComboBox> mxFooterLayoutLB;
96  std::unique_ptr<weld::Label> mxCustomEntry;
97 
98  static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem* pState);
99 
100  DECL_LINK( FooterToggleHdl, weld::ToggleButton&, void );
101  DECL_LINK( FooterLRMarginHdl, weld::ComboBox&, void);
102  DECL_LINK( FooterSpacingHdl, weld::ComboBox&, void);
103  DECL_LINK( FooterLayoutHdl, weld::ComboBox&, void);
104 };
105 
106 } //end of namespace sw::sidebar
107 
108 #endif
109 
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::unique_ptr< SvxLongLRSpaceItem > mpFooterLRMarginItem
FieldUnit
::sfx2::sidebar::ControllerItem maFooterSpacingController
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
::sfx2::sidebar::ControllerItem maFooterLRMarginController
std::unique_ptr< weld::Label > mxCustomEntry
SfxBindings * GetBindings() const
std::unique_ptr< weld::ComboBox > mxFooterMarginPresetLB
::sfx2::sidebar::ControllerItem maMetricController
std::unique_ptr< weld::ComboBox > mxFooterSpacingLB
::std::unique_ptr< SfxBoolItem > mpFooterItem
std::unique_ptr< weld::ComboBox > mxFooterLayoutLB
static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem *pState)
std::unique_ptr< weld::CheckButton > mxFooterToggle
virtual ~PageFooterPanel() override
SfxItemState
::std::unique_ptr< SfxInt16Item > mpFooterLayoutItem
::sfx2::sidebar::ControllerItem maHFToggleController
::sfx2::sidebar::ControllerItem maFooterLayoutController
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
virtual void dispose() override
DECL_LINK(FooterToggleHdl, weld::ToggleButton &, void)
static VclPtr< vcl::Window > Create(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::std::unique_ptr< SvxLongULSpaceItem > mpFooterSpacingItem
PageFooterPanel(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)