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_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANEL_HXX 20 #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANEL_HXX 21 22 #include <sfx2/sidebar/ControllerItem.hxx> 23 #include <sfx2/sidebar/IContextChangeReceiver.hxx> 24 #include <svx/sidebar/LinePropertyPanelBase.hxx> 25 #include <vcl/EnumContext.hxx> 26 27 class XLineStyleItem; 28 class XLineDashItem; 29 class XLineStartItem; 30 class XLineEndItem; 31 class XLineEndList; 32 class XDashList; 33 class ListBox; 34 class ToolBox; 35 36 namespace svx::sidebar 37 { 38 39 class LinePropertyPanel : public LinePropertyPanelBase, 40 public sfx2::sidebar::IContextChangeReceiver, 41 public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 42 { 43 public: 44 virtual ~LinePropertyPanel() override; 45 46 static std::unique_ptr<PanelLayout> Create( 47 weld::Widget* pParent, 48 const css::uno::Reference<css::frame::XFrame>& rxFrame, 49 SfxBindings* pBindings); 50 51 virtual void HandleContextChange( 52 const vcl::EnumContext& rContext) override; 53 54 virtual void NotifyItemUpdate( 55 const sal_uInt16 nSId, 56 const SfxItemState eState, 57 const SfxPoolItem* pState) override; 58 GetControlState(const sal_uInt16,boost::property_tree::ptree &)59 virtual void GetControlState( 60 const sal_uInt16 /*nSId*/, 61 boost::property_tree::ptree& /*rState*/) override {}; 62 GetBindings()63 SfxBindings* GetBindings() { return mpBindings;} 64 65 // constructor/destructor 66 LinePropertyPanel( 67 weld::Widget* pParent, 68 const css::uno::Reference<css::frame::XFrame>& rxFrame, 69 SfxBindings* pBindings); 70 71 virtual void setLineWidth(const XLineWidthItem& rItem) override; 72 73 protected: 74 75 virtual void setLineTransparency(const XLineTransparenceItem& rItem) override; 76 virtual void setLineJoint(const XLineJointItem* pItem) override; 77 virtual void setLineCap(const XLineCapItem* pItem) override; 78 79 private: 80 //ControllerItem 81 sfx2::sidebar::ControllerItem maStyleControl; 82 sfx2::sidebar::ControllerItem maDashControl; 83 sfx2::sidebar::ControllerItem maWidthControl; 84 sfx2::sidebar::ControllerItem maTransControl; 85 sfx2::sidebar::ControllerItem maEdgeStyle; 86 sfx2::sidebar::ControllerItem maCapStyle; 87 88 SfxBindings* mpBindings; 89 vcl::EnumContext maContext; 90 }; 91 92 } // end of namespace svx::sidebar 93 94 #endif 95 96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 97