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
20#pragma once
21
22#include <memory>
25#include <svl/intitem.hxx>
26#include <svl/poolitem.hxx>
27#include <svl/eitem.hxx>
28#include <svx/rulritem.hxx>
29
30namespace sw::sidebar {
31
33 public PanelLayout,
35{
36public:
37 static std::unique_ptr<PanelLayout> Create(
38 weld::Widget* pParent,
39 SfxBindings* pBindings);
40
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 SfxBindings* GetBindings() const { return mpBindings; }
52 weld::Widget* pParent,
53 SfxBindings* pBindings);
54 virtual ~PageHeaderPanel() override;
55
56private:
57
59
65
67
69
70 void Initialize();
72 void UpdateHeaderCheck();
76
77 ::std::unique_ptr<SfxBoolItem> mpHeaderItem;
78 ::std::unique_ptr<SvxLongLRSpaceItem> mpHeaderLRMarginItem;
79 ::std::unique_ptr<SvxLongULSpaceItem> mpHeaderSpacingItem;
80 ::std::unique_ptr<SfxInt16Item> mpHeaderLayoutItem;
81
82 std::unique_ptr<weld::CheckButton> mxHeaderToggle;
83 std::unique_ptr<weld::ComboBox> mxHeaderSpacingLB;
84 std::unique_ptr<weld::ComboBox> mxHeaderMarginPresetLB;
85 std::unique_ptr<weld::ComboBox> mxHeaderLayoutLB;
86 std::unique_ptr<weld::Label> mxCustomEntry;
87
88 static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem* pState);
89
90 DECL_LINK( HeaderToggleHdl, weld::Toggleable&, void );
91 DECL_LINK( HeaderLRMarginHdl, weld::ComboBox&, void);
92 DECL_LINK( HeaderSpacingHdl, weld::ComboBox&, void);
93 DECL_LINK( HeaderLayoutHdl, weld::ComboBox&, void);
94};
95
96} //end of namespace sw::sidebar
97
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CheckButton > mxHeaderToggle
::std::unique_ptr< SfxBoolItem > mpHeaderItem
std::unique_ptr< weld::ComboBox > mxHeaderMarginPresetLB
virtual ~PageHeaderPanel() override
DECL_LINK(HeaderLayoutHdl, weld::ComboBox &, void)
::std::unique_ptr< SvxLongLRSpaceItem > mpHeaderLRMarginItem
::std::unique_ptr< SfxInt16Item > mpHeaderLayoutItem
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< weld::ComboBox > mxHeaderLayoutLB
::std::unique_ptr< SvxLongULSpaceItem > mpHeaderSpacingItem
std::unique_ptr< weld::ComboBox > mxHeaderSpacingLB
PageHeaderPanel(weld::Widget *pParent, SfxBindings *pBindings)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, SfxBindings *pBindings)
static FieldUnit GetCurrentUnit(SfxItemState eState, const SfxPoolItem *pState)
std::unique_ptr< weld::Label > mxCustomEntry
::sfx2::sidebar::ControllerItem maHeaderLayoutController
::sfx2::sidebar::ControllerItem maHeaderSpacingController
SfxBindings * GetBindings() const
DECL_LINK(HeaderSpacingHdl, weld::ComboBox &, void)
::sfx2::sidebar::ControllerItem maHeaderLRMarginController
DECL_LINK(HeaderLRMarginHdl, weld::ComboBox &, void)
::sfx2::sidebar::ControllerItem maMetricController
::sfx2::sidebar::ControllerItem maHFToggleController
DECL_LINK(HeaderToggleHdl, weld::Toggleable &, void)
FieldUnit
SfxItemState