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 #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_SHADOWPROPERTYPANEL_HXX
10 #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_SHADOWPROPERTYPANEL_HXX
12 #include <sfx2/sidebar/ControllerItem.hxx>
13 #include <sfx2/sidebar/PanelLayout.hxx>
17 namespace svx::sidebar
{
19 class ShadowPropertyPanel
21 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
24 virtual ~ShadowPropertyPanel() override
;
26 static std::unique_ptr
<PanelLayout
> Create(
27 weld::Widget
* pParent
,
28 SfxBindings
* pBindings
);
30 virtual void NotifyItemUpdate(
31 const sal_uInt16 nSId
,
32 const SfxItemState eState
,
33 const SfxPoolItem
* pState
) override
;
35 virtual void GetControlState(
36 const sal_uInt16
/*nSId*/,
37 boost::property_tree::ptree
& /*rState*/) override
{};
39 SfxBindings
* GetBindings() { return mpBindings
;}
44 weld::Widget
* pParent
,
45 SfxBindings
* pBindings
);
48 ::sfx2::sidebar::ControllerItem maShadowController
;
49 ::sfx2::sidebar::ControllerItem maShadowTransController
;
50 ::sfx2::sidebar::ControllerItem maShadowBlurController
;
51 ::sfx2::sidebar::ControllerItem maShadowColorController
;
52 ::sfx2::sidebar::ControllerItem maShadowXDistanceController
;
53 ::sfx2::sidebar::ControllerItem maShadowYDistanceController
;
55 SfxBindings
* mpBindings
;
56 tools::Long nX
,nY
,nXY
;
58 std::unique_ptr
<weld::CheckButton
> mxShowShadow
;
59 std::unique_ptr
<weld::MetricSpinButton
> mxShadowDistance
;
60 std::unique_ptr
<ColorListBox
> mxLBShadowColor
;
61 std::unique_ptr
<weld::ComboBox
> mxShadowAngle
;
62 std::unique_ptr
<weld::Label
> mxFTAngle
;
63 std::unique_ptr
<weld::Label
> mxFTDistance
;
64 std::unique_ptr
<weld::Label
> mxFTTransparency
;
65 std::unique_ptr
<weld::Label
> mxFTBlur
;
66 std::unique_ptr
<weld::Label
> mxFTColor
;
67 std::unique_ptr
<weld::Scale
> mxShadowTransSlider
;
68 std::unique_ptr
<weld::MetricSpinButton
> mxShadowTransMetric
;
69 std::unique_ptr
<weld::MetricSpinButton
> mxShadowBlurMetric
;
71 void InsertAngleValues();
72 void SetTransparencyValue(tools::Long
);
73 void UpdateControls();
74 void ModifyShadowDistance();
76 DECL_LINK(ClickShadowHdl
, weld::Toggleable
&, void);
77 DECL_LINK(ModifyShadowColorHdl
, ColorListBox
&, void);
78 DECL_LINK(ModifyShadowTransMetricHdl
, weld::MetricSpinButton
&, void);
79 DECL_LINK(ModifyShadowAngleHdl
, weld::ComboBox
&, void);
80 DECL_LINK(ModifyShadowDistanceHdl
, weld::MetricSpinButton
&, void);
81 DECL_LINK(ModifyShadowTransSliderHdl
, weld::Scale
&, void);
82 DECL_LINK(ModifyShadowBlurMetricHdl
, weld::MetricSpinButton
&, void);
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */