/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_SHADOWPROPERTYPANEL_HXX #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_SHADOWPROPERTYPANEL_HXX #include #include class ColorListBox; namespace svx::sidebar { class ShadowPropertyPanel : public PanelLayout, public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: virtual ~ShadowPropertyPanel() override; static std::unique_ptr Create( weld::Widget* pParent, SfxBindings* pBindings); virtual void NotifyItemUpdate( const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem* pState) override; virtual void GetControlState( const sal_uInt16 /*nSId*/, boost::property_tree::ptree& /*rState*/) override {}; SfxBindings* GetBindings() { return mpBindings;} void Initialize(); ShadowPropertyPanel( weld::Widget* pParent, SfxBindings* pBindings); private: ::sfx2::sidebar::ControllerItem maShadowController; ::sfx2::sidebar::ControllerItem maShadowTransController; ::sfx2::sidebar::ControllerItem maShadowBlurController; ::sfx2::sidebar::ControllerItem maShadowColorController; ::sfx2::sidebar::ControllerItem maShadowXDistanceController; ::sfx2::sidebar::ControllerItem maShadowYDistanceController; SfxBindings* mpBindings; tools::Long nX,nY,nXY; std::unique_ptr mxShowShadow; std::unique_ptr mxShadowDistance; std::unique_ptr mxLBShadowColor; std::unique_ptr mxShadowAngle; std::unique_ptr mxFTAngle; std::unique_ptr mxFTDistance; std::unique_ptr mxFTTransparency; std::unique_ptr mxFTBlur; std::unique_ptr mxFTColor; std::unique_ptr mxShadowTransSlider; std::unique_ptr mxShadowTransMetric; std::unique_ptr mxShadowBlurMetric; void InsertAngleValues(); void SetTransparencyValue(tools::Long); void UpdateControls(); void ModifyShadowDistance(); DECL_LINK(ClickShadowHdl, weld::Toggleable&, void); DECL_LINK(ModifyShadowColorHdl, ColorListBox&, void); DECL_LINK(ModifyShadowTransMetricHdl, weld::MetricSpinButton&, void); DECL_LINK(ModifyShadowAngleHdl, weld::ComboBox&, void); DECL_LINK(ModifyShadowDistanceHdl, weld::MetricSpinButton&, void); DECL_LINK(ModifyShadowTransSliderHdl, weld::Scale&, void); DECL_LINK(ModifyShadowBlurMetricHdl, weld::MetricSpinButton&, void); }; } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */