1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEFOOTERPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEFOOTERPANEL_HXX
23 #include <com/sun/star/frame/XFrame.hpp>
25 #include <svx/sidebar/PanelLayout.hxx>
27 #include <sfx2/sidebar/ControllerItem.hxx>
29 #include <i18nutil/paper.hxx>
31 #include <svx/pageitem.hxx>
32 #include <svx/rulritem.hxx>
33 #include <editeng/sizeitem.hxx>
35 #include <vcl/ctrl.hxx>
36 #include <vcl/fixed.hxx>
37 #include <vcl/button.hxx>
38 #include <vcl/toolbox.hxx>
39 #include <vcl/lstbox.hxx>
40 #include <vcl/field.hxx>
41 #include <svl/intitem.hxx>
42 #include <tools/fldunit.hxx>
43 #include <svl/poolitem.hxx>
44 #include <svl/eitem.hxx>
45 #include <svx/spacinglistbox.hxx>
46 #include <svx/samecontentlistbox.hxx>
48 namespace sw
{ namespace sidebar
{
50 class PageFooterPanel
:
52 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
55 static VclPtr
<vcl::Window
> Create(
57 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rxFrame
,
58 SfxBindings
* pBindings
);
60 virtual void NotifyItemUpdate(
61 const sal_uInt16 nSId
,
62 const SfxItemState eState
,
63 const SfxPoolItem
* pState
,
64 const bool bIsEnabled
) override
;
66 SfxBindings
* GetBindings() const { return mpBindings
; }
69 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rxFrame
,
70 SfxBindings
* pBindings
);
71 virtual ~PageFooterPanel() override
;
72 virtual void dispose() override
;
76 SfxBindings
* mpBindings
;
78 ::sfx2::sidebar::ControllerItem maHFToggleController
;
79 ::sfx2::sidebar::ControllerItem maFooterLRMarginController
;
80 ::sfx2::sidebar::ControllerItem maFooterSpacingController
;
81 ::sfx2::sidebar::ControllerItem maFooterLayoutController
;
83 VclPtr
<CheckBox
> mpFooterToggle
;
84 VclPtr
<SpacingListBox
> mpFooterSpacingLB
;
85 VclPtr
<SpacingListBox
> mpFooterMarginPresetLB
;
86 VclPtr
<SameContentListBox
> mpFooterLayoutLB
;
87 VclPtr
<FixedText
> mpCustomEntry
;
88 OUString aCustomEntry
;
91 void UpdateFooterCheck();
92 void UpdateMarginControl();
93 void UpdateSpacingControl();
94 void UpdateLayoutControl();
96 ::std::unique_ptr
<SfxBoolItem
> mpFooterItem
;
97 ::std::unique_ptr
<SvxLongLRSpaceItem
> mpFooterLRMarginItem
;
98 ::std::unique_ptr
<SvxLongULSpaceItem
> mpFooterSpacingItem
;
99 ::std::unique_ptr
<SfxInt16Item
> mpFooterLayoutItem
;
101 DECL_LINK( FooterToggleHdl
, Button
*, void );
102 DECL_LINK( FooterLRMarginHdl
, ListBox
&, void);
103 DECL_LINK( FooterSpacingHdl
, ListBox
&, void);
104 DECL_LINK( FooterLayoutHdl
, ListBox
&, void);
107 } } //end of namespace sw::sidebar
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */