Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / view / main / VButton.hxx
blob4d87b3db7342237d699e4d89e3cca35af3dc4051
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/.
8 */
10 #ifndef INCLUDED_CHART2_SOURCE_VIEW_MAIN_VBUTTON_HXX
11 #define INCLUDED_CHART2_SOURCE_VIEW_MAIN_VBUTTON_HXX
13 #include <com/sun/star/drawing/XShapes.hpp>
14 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
15 #include <com/sun/star/beans/XPropertySet.hpp>
16 #include <tools/color.hxx>
18 namespace chart
21 class VButton final
23 private:
24 css::uno::Reference<css::lang::XMultiServiceFactory> m_xShapeFactory;
25 css::uno::Reference<css::drawing::XShapes> m_xTarget;
26 css::uno::Reference<css::drawing::XShape> m_xShape;
27 OUString m_sLabel;
28 OUString m_sCID;
29 css::awt::Point m_aPosition;
30 css::awt::Size m_aSize;
31 bool m_bShowArrow;
32 Color m_nArrowColor;
33 Color m_nBGColor;
35 css::uno::Reference<css::drawing::XShape>
36 createTriangle(css::awt::Size aSize);
38 public:
39 VButton();
41 void init(const css::uno::Reference<css::drawing::XShapes>& xTargetPage,
42 const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory);
44 void createShapes(const css::uno::Reference<css::beans::XPropertySet>& xTextProp);
46 void showArrow(bool bShowArrow)
48 m_bShowArrow = bShowArrow;
50 void setArrowColor(Color nArrowColor)
52 m_nArrowColor = nArrowColor;
54 void setBGColor(Color nBGColor)
56 m_nBGColor = nBGColor;
58 void setLabel(OUString const & rLabel)
60 m_sLabel = rLabel;
62 void setCID(OUString const & rCID)
64 m_sCID = rCID;
66 void setPosition(css::awt::Point const & rPosition)
68 m_aPosition = rPosition;
70 css::awt::Size const & getSize()
72 return m_aSize;
74 void setSize(css::awt::Size const & rSize)
76 m_aSize = rSize;
80 } //namespace chart
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */