Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / inc / res_LegendPosition.hxx
blobf5901ef33f41379a3b9009148e60b566368c9cf6
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_CHART2_SOURCE_CONTROLLER_INC_RES_LEGENDPOSITION_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_LEGENDPOSITION_HXX
22 #include <svl/itemset.hxx>
23 #include <tools/link.hxx>
25 namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
26 namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
27 namespace weld { class Builder; }
28 namespace weld { class CheckButton; }
29 namespace weld { class RadioButton; }
30 namespace weld { class ToggleButton; }
32 namespace chart
35 class LegendPositionResources final
38 public:
39 //constructor without Display checkbox
40 LegendPositionResources(weld::Builder& rBuilder);
41 //constructor inclusive Display checkbox
42 LegendPositionResources(weld::Builder& rBuilder, const css::uno::Reference<
43 css::uno::XComponentContext>& xCC );
44 ~LegendPositionResources();
46 void writeToResources( const css::uno::Reference< css::frame::XModel >& xChartModel );
47 void writeToModel( const css::uno::Reference< css::frame::XModel >& xChartModel ) const;
49 void initFromItemSet( const SfxItemSet& rInAttrs );
50 void writeToItemSet( SfxItemSet& rOutAttrs ) const;
52 void SetChangeHdl( const Link<LinkParamNone*,void>& rLink );
54 DECL_LINK( PositionEnableHdl, weld::ToggleButton&, void );
55 DECL_LINK( PositionChangeHdl, weld::ToggleButton&, void );
57 private:
58 void impl_setRadioButtonToggleHdl();
60 private:
61 css::uno::Reference< css::uno::XComponentContext> m_xCC;
62 Link<LinkParamNone*,void> m_aChangeLink;
64 std::unique_ptr<weld::CheckButton> m_xCbxShow;
65 std::unique_ptr<weld::RadioButton> m_xRbtLeft;
66 std::unique_ptr<weld::RadioButton> m_xRbtRight;
67 std::unique_ptr<weld::RadioButton> m_xRbtTop;
68 std::unique_ptr<weld::RadioButton> m_xRbtBottom;
71 } //namespace chart
73 #endif
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */