LibreOffice Module chart2 (master) 1
VButton.hxx
Go to the documentation of this file.
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
10#pragma once
11
12#include <tools/color.hxx>
13#include <com/sun/star/awt/Point.hpp>
14#include <com/sun/star/awt/Size.hpp>
15#include <com/sun/star/uno/Reference.hxx>
16#include <rtl/ref.hxx>
17#include <svx/unoshape.hxx>
18
19namespace com::sun::star::beans { class XPropertySet; }
20namespace com::sun::star::drawing { class XShape; }
21namespace com::sun::star::drawing { class XShapes; }
22namespace com::sun::star::lang { class XMultiServiceFactory; }
23
24namespace chart
25{
26
27class VButton final
28{
29private:
32 OUString m_sLabel;
33 OUString m_sCID;
34 css::awt::Point m_aPosition;
35 css::awt::Size m_aSize;
39
41 createTriangle(css::awt::Size aSize);
42
43public:
44 VButton();
45
46 void init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage);
47
48 void createShapes(const css::uno::Reference<css::beans::XPropertySet>& xTextProp);
49
50 void showArrow(bool bShowArrow)
51 {
52 m_bShowArrow = bShowArrow;
53 }
54 void setArrowColor(Color nArrowColor)
55 {
56 m_nArrowColor = nArrowColor;
57 }
58 void setBGColor(Color nBGColor)
59 {
60 m_nBGColor = nBGColor;
61 }
62 void setLabel(OUString const & rLabel)
63 {
64 m_sLabel = rLabel;
65 }
66 void setCID(OUString const & rCID)
67 {
68 m_sCID = rCID;
69 }
70 void setPosition(css::awt::Point const & rPosition)
71 {
72 m_aPosition = rPosition;
73 }
74 css::awt::Size const & getSize() const
75 {
76 return m_aSize;
77 }
78 void setSize(css::awt::Size const & rSize)
79 {
80 m_aSize = rSize;
81 }
82};
83
84} //namespace chart
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Color m_nBGColor
Definition: VButton.hxx:38
Color m_nArrowColor
Definition: VButton.hxx:37
rtl::Reference< SvxShapePolyPolygon > createTriangle(css::awt::Size aSize)
Definition: VButton.cxx:38
void createShapes(const css::uno::Reference< css::beans::XPropertySet > &xTextProp)
Definition: VButton.cxx:81
void setCID(OUString const &rCID)
Definition: VButton.hxx:66
void setLabel(OUString const &rLabel)
Definition: VButton.hxx:62
css::awt::Point m_aPosition
Definition: VButton.hxx:34
void setPosition(css::awt::Point const &rPosition)
Definition: VButton.hxx:70
OUString m_sLabel
Definition: VButton.hxx:32
rtl::Reference< SvxShapeGroup > m_xShape
Definition: VButton.hxx:31
void init(const rtl::Reference< SvxShapeGroupAnyD > &xTargetPage)
Definition: VButton.cxx:33
void setBGColor(Color nBGColor)
Definition: VButton.hxx:58
css::awt::Size const & getSize() const
Definition: VButton.hxx:74
OUString m_sCID
Definition: VButton.hxx:33
bool m_bShowArrow
Definition: VButton.hxx:36
css::awt::Size m_aSize
Definition: VButton.hxx:35
void showArrow(bool bShowArrow)
Definition: VButton.hxx:50
void setArrowColor(Color nArrowColor)
Definition: VButton.hxx:54
void setSize(css::awt::Size const &rSize)
Definition: VButton.hxx:78
rtl::Reference< SvxShapeGroupAnyD > m_xTarget
Definition: VButton.hxx:30
class SAL_NO_VTABLE XPropertySet