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 #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_SHADOWPROPERTYPANEL_HXX 10 #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_SHADOWPROPERTYPANEL_HXX 11 12 #include <vcl/slider.hxx> 13 #include <vcl/button.hxx> 14 #include <vcl/fixed.hxx> 15 #include <vcl/vclptr.hxx> 16 #include <sfx2/sidebar/SidebarPanelBase.hxx> 17 #include <vcl/ctrl.hxx> 18 #include <sfx2/sidebar/ControllerItem.hxx> 19 #include <svx/sidebar/PanelLayout.hxx> 20 #include <svl/intitem.hxx> 21 #include <vcl/field.hxx> 22 #include <com/sun/star/ui/XUIElement.hpp> 23 #include <sfx2/request.hxx> 24 #include <svx/dlgctrl.hxx> 25 26 class SvxColorListBox; 27 28 namespace svx { namespace sidebar { 29 30 class ShadowPropertyPanel 31 : public PanelLayout, 32 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 33 { 34 public: 35 virtual ~ShadowPropertyPanel() override; 36 virtual void dispose() override; 37 38 static VclPtr<vcl::Window> Create( 39 vcl::Window* pParent, 40 const css::uno::Reference<css::frame::XFrame>& rxFrame, 41 SfxBindings* pBindings); 42 43 virtual void DataChanged( 44 const DataChangedEvent& rEvent) override; 45 46 virtual void NotifyItemUpdate( 47 const sal_uInt16 nSId, 48 const SfxItemState eState, 49 const SfxPoolItem* pState) override; 50 GetBindings()51 SfxBindings* GetBindings() { return mpBindings;} 52 53 void Initialize(); 54 55 ShadowPropertyPanel( 56 vcl::Window* pParent, 57 const css::uno::Reference<css::frame::XFrame>& rxFrame, 58 SfxBindings* pBindings); 59 60 private: 61 VclPtr<CheckBox> mpShowShadow; 62 VclPtr<MetricBox> mpShadowDistance; 63 VclPtr<SvxColorListBox> mpLBShadowColor; 64 VclPtr<MetricBox> mpShadowAngle; 65 VclPtr<FixedText> mpFTAngle; 66 VclPtr<FixedText> mpFTDistance; 67 VclPtr<FixedText> mpFTTransparency; 68 VclPtr<FixedText> mpFTColor; 69 VclPtr<Slider> mpShadowTransSlider; 70 VclPtr<MetricField> mpShadowTransMetric; 71 72 ::sfx2::sidebar::ControllerItem maShadowController; 73 ::sfx2::sidebar::ControllerItem maShadowTransController; 74 ::sfx2::sidebar::ControllerItem maShadowColorController; 75 ::sfx2::sidebar::ControllerItem maShadowXDistanceController; 76 ::sfx2::sidebar::ControllerItem maShadowYDistanceController; 77 78 SfxBindings* const mpBindings; 79 long nX,nY,nXY; 80 81 void InsertAngleValues(); 82 void SetTransparencyValue(long); 83 void UpdateControls(); 84 DECL_LINK(ClickShadowHdl, Button*, void); 85 DECL_LINK(ModifyShadowColorHdl, SvxColorListBox&, void); 86 DECL_LINK(ModifyShadowTransMetricHdl, Edit&, void); 87 DECL_LINK(ModifyShadowDistanceHdl, Edit&, void); 88 DECL_LINK(ModifyShadowTransSliderHdl, Slider*, void); 89 }; 90 } 91 } 92 93 #endif 94 95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 96