Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / sidebar / ChartAxisPanel.hxx
blob0c9bd74ab182ad3f32b0b425e35a51d417a1d72f
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 */
11 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTAXISPANEL_HXX
12 #define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTAXISPANEL_HXX
14 #include <sfx2/sidebar/ControllerItem.hxx>
15 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
16 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
17 #include <svx/sidebar/PanelLayout.hxx>
18 #include <vcl/layout.hxx>
20 #include "ChartSidebarModifyListener.hxx"
21 #include "ChartSidebarSelectionListener.hxx"
23 namespace com { namespace sun { namespace star { namespace util { class XModifyListener; } } } }
24 namespace com { namespace sun { namespace star { namespace view { class XSelectionChangeListener; } } } }
26 class Edit;
27 class ListBox;
28 class MetricField;
30 namespace chart {
32 class ChartController;
34 namespace sidebar {
36 class ChartAxisPanel : public PanelLayout,
37 public ::sfx2::sidebar::IContextChangeReceiver,
38 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
39 public sfx2::sidebar::SidebarModelUpdate,
40 public ChartSidebarModifyListenerParent,
41 public ChartSidebarSelectionListenerParent
43 public:
44 static VclPtr<vcl::Window> Create(
45 vcl::Window* pParent,
46 const css::uno::Reference<css::frame::XFrame>& rxFrame,
47 ChartController* pController);
49 virtual void DataChanged(
50 const DataChangedEvent& rEvent) override;
52 virtual void HandleContextChange(
53 const vcl::EnumContext& rContext) override;
55 virtual void NotifyItemUpdate(
56 const sal_uInt16 nSId,
57 const SfxItemState eState,
58 const SfxPoolItem* pState) override;
60 // constructor/destructor
61 ChartAxisPanel(
62 vcl::Window* pParent,
63 const css::uno::Reference<css::frame::XFrame>& rxFrame,
64 ChartController* pController);
65 virtual ~ChartAxisPanel() override;
66 virtual void dispose() override;
68 virtual void updateData() override;
69 virtual void modelInvalid() override;
71 virtual void selectionChanged(bool bCorrectType) override;
73 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
75 private:
76 //ui controls
77 VclPtr<CheckBox> mpCBShowLabel;
78 VclPtr<CheckBox> mpCBReverse;
80 VclPtr<ListBox> mpLBLabelPos;
81 VclPtr<VclGrid> mpGridLabel;
83 VclPtr<MetricField> mpNFRotation;
85 css::uno::Reference<css::frame::XModel> mxModel;
86 css::uno::Reference<css::util::XModifyListener> mxModifyListener;
87 css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
89 bool mbModelValid;
91 void Initialize();
93 DECL_LINK(CheckBoxHdl, Button*, void);
94 DECL_LINK(ListBoxHdl, ListBox&, void);
95 DECL_LINK(TextRotationHdl, Edit&, void);
98 } } // end of namespace ::chart::sidebar
100 #endif
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */