Version 7.1.7.1, tag libreoffice-7.1.7.1
[LibreOffice.git] / svx / source / inc / DefaultShapesPanel.hxx
blob6067c05b531259a2299401d4679a9eeec9aeb69e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_SOURCE_INC_DEFAULTSHAPESPANEL_HXX
20 #define INCLUDED_SVX_SOURCE_INC_DEFAULTSHAPESPANEL_HXX
22 #include <com/sun/star/frame/XFrame.hpp>
23 #include <sfx2/sidebar/PanelLayout.hxx>
24 #include <svtools/valueset.hxx>
25 #include <map>
26 #include "ShapesUtil.hxx"
28 using namespace css;
29 using namespace ::com::sun::star::uno;
30 using namespace ::com::sun::star::frame;
32 namespace svx::sidebar {
34 /** This panel provides buttons for inserting shapes into a document.
36 class DefaultShapesPanel
37 : public PanelLayout, public SvxShapeCommandsMap
39 public:
40 DefaultShapesPanel (
41 vcl::Window* pParent,
42 const css::uno::Reference<css::frame::XFrame>& rxFrame);
43 static VclPtr<vcl::Window> Create(
44 vcl::Window* pParent,
45 const css::uno::Reference<css::frame::XFrame>& rxFrame);
46 virtual ~DefaultShapesPanel() override;
47 virtual void dispose() override;
49 private:
50 std::unique_ptr<ValueSet> mxLineArrowSet;
51 std::unique_ptr<weld::CustomWeld> mxLineArrowSetWin;
52 std::unique_ptr<ValueSet> mxCurveSet;
53 std::unique_ptr<weld::CustomWeld> mxCurveSetWin;
54 std::unique_ptr<ValueSet> mxConnectorSet;
55 std::unique_ptr<weld::CustomWeld> mxConnectorSetWin;
56 std::unique_ptr<ValueSet> mxBasicShapeSet;
57 std::unique_ptr<weld::CustomWeld> mxBasicShapeSetWin;
58 std::unique_ptr<ValueSet> mxSymbolShapeSet;
59 std::unique_ptr<weld::CustomWeld> mxSymbolShapeSetWin;
60 std::unique_ptr<ValueSet> mxBlockArrowSet;
61 std::unique_ptr<weld::CustomWeld> mxBlockArrowSetWin;
62 std::unique_ptr<ValueSet> mxFlowchartSet;
63 std::unique_ptr<weld::CustomWeld> mxFlowchartSetWin;
64 std::unique_ptr<ValueSet> mxCalloutSet;
65 std::unique_ptr<weld::CustomWeld> mxCalloutSetWin;
66 std::unique_ptr<ValueSet> mxStarSet;
67 std::unique_ptr<weld::CustomWeld> mxStarSetWin;
68 std::unique_ptr<ValueSet> mx3DObjectSet;
69 std::unique_ptr<weld::CustomWeld> mx3DObjectSetWin;
71 Reference< XFrame > mxFrame;
72 std::map<ValueSet*, std::map<sal_uInt16, OUString>> mpShapesSetMap;
74 void populateShapes();
75 void Initialize();
76 DECL_LINK( ShapeSelectHdl, ValueSet*, void );
79 } // end of namespace sd::sidebar
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */