LibreOffice Module sw (master)  1
PageStylesPanel.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_PAGESTYLESPANEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGESTYLESPANEL_HXX
21 
22 #include <memory>
23 #include <com/sun/star/frame/XFrame.hpp>
24 
26 
28 
29 #include <svx/pageitem.hxx>
30 
31 #include <svl/intitem.hxx>
32 #include <svl/poolitem.hxx>
33 #include <svx/xbtmpit.hxx>
34 #include <svx/xflclit.hxx>
35 #include <svx/xflgrit.hxx>
36 #include <svx/xflhtit.hxx>
37 #include <svx/itemwin.hxx>
39 
40 class List;
41 class ColorListBox;
42 namespace sw { namespace sidebar {
43 
45  public PanelLayout,
47 {
48 public:
50  vcl::Window* pParent,
51  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
52  SfxBindings* pBindings);
53 
54  virtual void NotifyItemUpdate(
55  const sal_uInt16 nSId,
56  const SfxItemState eState,
57  const SfxPoolItem* pState) override;
58 
59  virtual void GetControlState(
60  const sal_uInt16 /*nSId*/,
61  boost::property_tree::ptree& /*rState*/) override {};
62 
63  SfxBindings* GetBindings() const { return mpBindings; }
65  vcl::Window* pParent,
66  const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
67  SfxBindings* pBindings);
68  virtual ~PageStylesPanel() override;
69  virtual void dispose() override;
70 
71 private:
72 
74 
75  ::std::unique_ptr<SfxInt16Item> mpPageColumnItem;
76  ::std::unique_ptr<SvxPageItem> mpPageItem;
77  ::std::unique_ptr<XFillColorItem> mpBgColorItem;
78  ::std::unique_ptr<XFillGradientItem> mpBgGradientItem;
79  ::std::unique_ptr<XFillHatchItem> mpBgHatchItem;
80  ::std::unique_ptr<XFillBitmapItem> mpBgBitmapItem;
81 
89 
90  std::unique_ptr<ColorListBox> mxBgColorLB;
91  std::unique_ptr<weld::ComboBox> mxBgHatchingLB;
92  std::unique_ptr<ColorListBox> mxBgGradientLB;
93  std::unique_ptr<weld::ComboBox> mxBgBitmapLB;
94  std::unique_ptr<weld::ComboBox> mxLayoutSelectLB;
95  std::unique_ptr<weld::ComboBox> mxColumnCount;
96  std::unique_ptr<SvxPageNumberListBox> mxNumberSelectLB;
97  std::unique_ptr<weld::ComboBox> mxBgFillType;
98  std::unique_ptr<weld::Label> mxCustomEntry;
99  OUString aCustomEntry;
100 
101  void Initialize();
102  void Update();
103  Color const & GetColorSetOrDefault();
105  OUString const & GetHatchingSetOrDefault();
106  OUString const & GetBitmapSetOrDefault();
107  OUString const & GetPatternSetOrDefault();
108 
109  void ModifyFillColor();
110 
111  DECL_LINK( ModifyColumnCountHdl, weld::ComboBox&, void );
112  DECL_LINK( ModifyNumberingHdl, weld::ComboBox&, void );
113  DECL_LINK( ModifyLayoutHdl, weld::ComboBox&, void );
114  DECL_LINK( ModifyFillStyleHdl, weld::ComboBox&, void );
115  DECL_LINK( ModifyFillColorHdl, weld::ComboBox&, void );
116  DECL_LINK( ModifyFillColorListHdl, ColorListBox&, void );
117 };
118 
119 } } //end of namespace sw::sidebar
120 
121 #endif
122 
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SvxPageNumberListBox > mxNumberSelectLB
std::unique_ptr< weld::ComboBox > mxBgBitmapLB
::sfx2::sidebar::ControllerItem maBgColorControl
std::unique_ptr< weld::ComboBox > mxBgHatchingLB
Dialog to specify the properties of date form field.
virtual void dispose() override
OUString const & GetPatternSetOrDefault()
::sfx2::sidebar::ControllerItem maPageNumFormatControl
static VclPtr< vcl::Window > Create(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
DECL_LINK(ModifyColumnCountHdl, weld::ComboBox &, void)
::sfx2::sidebar::ControllerItem maBgBitmapControl
::sfx2::sidebar::ControllerItem maPageColumnControl
std::unique_ptr< weld::ComboBox > mxLayoutSelectLB
std::unique_ptr< ColorListBox > mxBgColorLB
::std::unique_ptr< SfxInt16Item > mpPageColumnItem
XGradient const & GetGradientSetOrDefault()
::std::unique_ptr< XFillGradientItem > mpBgGradientItem
std::unique_ptr< weld::Label > mxCustomEntry
::std::unique_ptr< XFillColorItem > mpBgColorItem
PageStylesPanel(vcl::Window *pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::std::unique_ptr< SvxPageItem > mpPageItem
virtual ~PageStylesPanel() override
::std::unique_ptr< XFillHatchItem > mpBgHatchItem
::sfx2::sidebar::ControllerItem maBgHatchingControl
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
::sfx2::sidebar::ControllerItem maBgGradientControl
SfxItemState
SfxBindings * GetBindings() const
std::unique_ptr< ColorListBox > mxBgGradientLB
std::unique_ptr< weld::ComboBox > mxBgFillType
OUString const & GetBitmapSetOrDefault()
std::unique_ptr< weld::ComboBox > mxColumnCount
::sfx2::sidebar::ControllerItem maBgFillStyleControl
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
OUString const & GetHatchingSetOrDefault()
::std::unique_ptr< XFillBitmapItem > mpBgBitmapItem