Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / sidebar / ChartElementsPanel.hxx
blobeca293645cc46aee634a63f1b5905558587d7e2a
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_SIDEBAR_CHARTELEMENTSPANEL_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTELEMENTSPANEL_HXX
22 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
23 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
24 #include <svx/sidebar/PanelLayout.hxx>
25 #include <vcl/layout.hxx>
26 #include "ChartSidebarModifyListener.hxx"
27 #include <TitleHelper.hxx>
29 namespace com { namespace sun { namespace star { namespace util { class XModifyListener; } } } }
31 class ListBox;
33 namespace chart {
35 class ChartController;
37 namespace sidebar {
39 class ChartElementsPanel : public PanelLayout,
40 public ::sfx2::sidebar::IContextChangeReceiver,
41 public sfx2::sidebar::SidebarModelUpdate,
42 public ChartSidebarModifyListenerParent
44 public:
45 static VclPtr<vcl::Window> Create(
46 vcl::Window* pParent,
47 const css::uno::Reference<css::frame::XFrame>& rxFrame,
48 ChartController* pController);
50 virtual void DataChanged(
51 const DataChangedEvent& rEvent) override;
53 virtual void HandleContextChange(
54 const vcl::EnumContext& rContext) override;
56 // constructor/destructor
57 ChartElementsPanel(
58 vcl::Window* pParent,
59 const css::uno::Reference<css::frame::XFrame>& rxFrame,
60 ChartController* pController);
62 virtual ~ChartElementsPanel() override;
64 virtual void dispose() override;
66 virtual void updateData() override;
67 virtual void modelInvalid() override;
69 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
71 private:
72 //ui controls
73 VclPtr<CheckBox> mpCBTitle;
74 VclPtr<CheckBox> mpCBSubtitle;
75 VclPtr<CheckBox> mpCBXAxis;
76 VclPtr<CheckBox> mpCBXAxisTitle;
77 VclPtr<CheckBox> mpCBYAxis;
78 VclPtr<CheckBox> mpCBYAxisTitle;
79 VclPtr<CheckBox> mpCBZAxis;
80 VclPtr<CheckBox> mpCBZAxisTitle;
81 VclPtr<CheckBox> mpCB2ndXAxis;
82 VclPtr<CheckBox> mpCB2ndXAxisTitle;
83 VclPtr<CheckBox> mpCB2ndYAxis;
84 VclPtr<CheckBox> mpCB2ndYAxisTitle;
85 VclPtr<CheckBox> mpCBLegend;
86 VclPtr<CheckBox> mpCBGridVerticalMajor;
87 VclPtr<CheckBox> mpCBGridHorizontalMajor;
88 VclPtr<CheckBox> mpCBGridVerticalMinor;
89 VclPtr<CheckBox> mpCBGridHorizontalMinor;
90 VclPtr<FixedText> mpTextTitle;
91 VclPtr<FixedText> mpTextSubTitle;
92 VclPtr<FixedText> mpLBAxis;
93 VclPtr<FixedText> mpLBGrid;
95 VclPtr<ListBox> mpLBLegendPosition;
96 VclPtr<VclHBox> mpBoxLegend;
98 vcl::EnumContext maContext;
100 css::uno::Reference<css::frame::XModel> mxModel;
101 css::uno::Reference<css::util::XModifyListener> mxListener;
103 bool mbModelValid;
105 OUString maTextTitle;
106 OUString maTextSubTitle;
108 void Initialize();
110 void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible);
112 DECL_LINK(CheckBoxHdl, Button*, void);
113 DECL_LINK(LegendPosHdl, ListBox&, void);
116 } } // end of namespace ::chart::sidebar
118 #endif
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */