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_PAGESTYLESPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGESTYLESPANEL_HXX
24 #include <sfx2/sidebar/PanelLayout.hxx>
25 #include <sfx2/sidebar/ControllerItem.hxx>
26 #include <svl/intitem.hxx>
27 #include <svl/poolitem.hxx>
28 #include <svx/xbtmpit.hxx>
29 #include <svx/xflclit.hxx>
30 #include <svx/xflgrit.hxx>
31 #include <svx/xflhtit.hxx>
32 #include <svx/pageitem.hxx>
33 #include <svx/pagenumberlistbox.hxx>
37 namespace sw::sidebar
{
39 class PageStylesPanel
:
41 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
44 static std::unique_ptr
<PanelLayout
> Create(
45 weld::Widget
* pParent
,
46 SfxBindings
* pBindings
);
48 virtual void NotifyItemUpdate(
49 const sal_uInt16 nSId
,
50 const SfxItemState eState
,
51 const SfxPoolItem
* pState
) override
;
53 virtual void GetControlState(
54 const sal_uInt16
/*nSId*/,
55 boost::property_tree::ptree
& /*rState*/) override
{};
57 SfxBindings
* GetBindings() const { return mpBindings
; }
59 weld::Widget
* pParent
,
60 SfxBindings
* pBindings
);
61 virtual ~PageStylesPanel() override
;
65 SfxBindings
* mpBindings
;
67 ::std::unique_ptr
<SfxInt16Item
> mpPageColumnItem
;
68 ::std::unique_ptr
<SvxPageItem
> mpPageItem
;
69 ::std::unique_ptr
<XFillColorItem
> mpBgColorItem
;
70 ::std::unique_ptr
<XFillGradientItem
> mpBgGradientItem
;
71 ::std::unique_ptr
<XFillHatchItem
> mpBgHatchItem
;
72 ::std::unique_ptr
<XFillBitmapItem
> mpBgBitmapItem
;
74 ::sfx2::sidebar::ControllerItem maPageColumnControl
;
75 ::sfx2::sidebar::ControllerItem maPageNumFormatControl
;
76 ::sfx2::sidebar::ControllerItem maBgColorControl
;
77 ::sfx2::sidebar::ControllerItem maBgHatchingControl
;
78 ::sfx2::sidebar::ControllerItem maBgGradientControl
;
79 ::sfx2::sidebar::ControllerItem maBgBitmapControl
;
80 ::sfx2::sidebar::ControllerItem maBgFillStyleControl
;
82 std::unique_ptr
<ColorListBox
> mxBgColorLB
;
83 std::unique_ptr
<weld::ComboBox
> mxBgHatchingLB
;
84 std::unique_ptr
<ColorListBox
> mxBgGradientLB
;
85 std::unique_ptr
<weld::ComboBox
> mxBgBitmapLB
;
86 std::unique_ptr
<weld::ComboBox
> mxLayoutSelectLB
;
87 std::unique_ptr
<weld::ComboBox
> mxColumnCount
;
88 std::unique_ptr
<SvxPageNumberListBox
> mxNumberSelectLB
;
89 std::unique_ptr
<weld::ComboBox
> mxBgFillType
;
90 std::unique_ptr
<weld::Label
> mxCustomEntry
;
91 OUString m_aCustomEntry
;
95 Color
const & GetColorSetOrDefault();
96 basegfx::BGradient
const & GetGradientSetOrDefault();
97 OUString
const & GetHatchingSetOrDefault();
98 OUString
const & GetBitmapSetOrDefault();
99 OUString
const & GetPatternSetOrDefault();
101 void ModifyFillColor();
103 DECL_LINK( ModifyColumnCountHdl
, weld::ComboBox
&, void );
104 DECL_LINK( ModifyNumberingHdl
, weld::ComboBox
&, void );
105 DECL_LINK( ModifyLayoutHdl
, weld::ComboBox
&, void );
106 DECL_LINK( ModifyFillStyleHdl
, weld::ComboBox
&, void );
107 DECL_LINK( ModifyFillColorHdl
, weld::ComboBox
&, void );
108 DECL_LINK( ModifyFillColorListHdl
, ColorListBox
&, void );
111 } //end of namespace sw::sidebar
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */