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 <vcl/fixed.hxx>
32 #include <vcl/button.hxx>
33 #include <vcl/lstbox.hxx>
34 #include <svl/intitem.hxx>
35 #include <svl/poolitem.hxx>
36 #include <svl/eitem.hxx>
37 #include <svx/spacinglistbox.hxx>
39 
40 namespace sw { namespace sidebar {
41 
43  public PanelLayout,
45 {
46 public:
48  vcl::Window* pParent,
49  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
50  SfxBindings* pBindings);
51 
52  virtual void NotifyItemUpdate(
53  const sal_uInt16 nSId,
54  const SfxItemState eState,
55  const SfxPoolItem* pState,
56  const bool bIsEnabled) 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 ~PageHeaderPanel() override;
64  virtual void dispose() override;
65 
66 private:
67 
69 
74 
80  OUString aCustomEntry;
81 
82  void Initialize();
83  void UpdateHeaderCheck();
84  void UpdateMarginControl();
85  void UpdateSpacingControl();
86  void UpdateLayoutControl();
87 
88  ::std::unique_ptr<SfxBoolItem> mpHeaderItem;
89  ::std::unique_ptr<SvxLongLRSpaceItem> mpHeaderLRMarginItem;
90  ::std::unique_ptr<SvxLongULSpaceItem> mpHeaderSpacingItem;
91  ::std::unique_ptr<SfxInt16Item> mpHeaderLayoutItem;
92 
93  DECL_LINK( HeaderToggleHdl, Button*, void );
94  DECL_LINK( HeaderLRMarginHdl, ListBox&, void);
95  DECL_LINK( HeaderSpacingHdl, ListBox&, void);
96  DECL_LINK( HeaderLayoutHdl, ListBox&, void);
97 };
98 
99 } } //end of namespace sw::sidebar
100 
101 #endif
102 
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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.
Definition: accfrmobj.cxx:40
::sfx2::sidebar::ControllerItem maHeaderLayoutController
VclPtr< SpacingListBox > mpHeaderSpacingLB
VclPtr< SpacingListBox > mpHeaderMarginPresetLB
virtual ~PageHeaderPanel() override
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState, const bool bIsEnabled) override
VclPtr< CheckBox > mpHeaderToggle
::std::unique_ptr< SfxInt16Item > mpHeaderLayoutItem
SfxBindings * GetBindings() const
::std::unique_ptr< SvxLongLRSpaceItem > mpHeaderLRMarginItem
::sfx2::sidebar::ControllerItem maHeaderSpacingController
DECL_LINK(HeaderToggleHdl, Button *, void)
SfxItemState
::std::unique_ptr< SfxBoolItem > mpHeaderItem
VclPtr< SameContentListBox > mpHeaderLayoutLB
::sfx2::sidebar::ControllerItem maHeaderLRMarginController
virtual void dispose() override
VclPtr< FixedText > mpCustomEntry
PageHeaderPanel(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::std::unique_ptr< SvxLongULSpaceItem > mpHeaderSpacingItem