LibreOffice Module sw (master)  1
PageHeaderPanel.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_PAGEHEADERPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEHEADERPANEL_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 { namespace 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  SfxBindings* GetBindings() const { return mpBindings; }
56  vcl::Window* pParent,
57  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
58  SfxBindings* pBindings);
59  virtual ~PageHeaderPanel() override;
60  virtual void dispose() override;
61 
62 private:
63 
65 
71 
73 
74  OUString aCustomEntry;
75 
76  void Initialize();
78  void UpdateHeaderCheck();
79  void UpdateMarginControl();
80  void UpdateSpacingControl();
81  void UpdateLayoutControl();
82 
83  ::std::unique_ptr<SfxBoolItem> mpHeaderItem;
84  ::std::unique_ptr<SvxLongLRSpaceItem> mpHeaderLRMarginItem;
85  ::std::unique_ptr<SvxLongULSpaceItem> mpHeaderSpacingItem;
86  ::std::unique_ptr<SfxInt16Item> mpHeaderLayoutItem;
87 
88  std::unique_ptr<weld::CheckButton> mxHeaderToggle;
89  std::unique_ptr<weld::ComboBox> mxHeaderSpacingLB;
90  std::unique_ptr<weld::ComboBox> mxHeaderMarginPresetLB;
91  std::unique_ptr<weld::ComboBox> mxHeaderLayoutLB;
92  std::unique_ptr<weld::Label> mxCustomEntry;
93 
94  static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem* pState);
95 
96  DECL_LINK( HeaderToggleHdl, weld::ToggleButton&, void );
97  DECL_LINK( HeaderLRMarginHdl, weld::ComboBox&, void);
98  DECL_LINK( HeaderSpacingHdl, weld::ComboBox&, void);
99  DECL_LINK( HeaderLayoutHdl, weld::ComboBox&, void);
100 };
101 
102 } } //end of namespace sw::sidebar
103 
104 #endif
105 
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FieldUnit
std::unique_ptr< weld::ComboBox > mxHeaderSpacingLB
static VclPtr< vcl::Window > Create(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::sfx2::sidebar::ControllerItem maHFToggleController
Dialog to specify the properties of date form field.
::sfx2::sidebar::ControllerItem maHeaderLayoutController
::sfx2::sidebar::ControllerItem maMetricController
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< weld::ComboBox > mxHeaderMarginPresetLB
virtual ~PageHeaderPanel() override
std::unique_ptr< weld::CheckButton > mxHeaderToggle
static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem *pState)
::std::unique_ptr< SfxInt16Item > mpHeaderLayoutItem
std::unique_ptr< weld::ComboBox > mxHeaderLayoutLB
SfxBindings * GetBindings() const
::std::unique_ptr< SvxLongLRSpaceItem > mpHeaderLRMarginItem
::sfx2::sidebar::ControllerItem maHeaderSpacingController
SfxItemState
::std::unique_ptr< SfxBoolItem > mpHeaderItem
::sfx2::sidebar::ControllerItem maHeaderLRMarginController
virtual void dispose() override
std::unique_ptr< weld::Label > mxCustomEntry
DECL_LINK(HeaderToggleHdl, weld::ToggleButton &, void)
PageHeaderPanel(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::std::unique_ptr< SvxLongULSpaceItem > mpHeaderSpacingItem