1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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 #include <com/sun/star/util/XModifyListener.hpp>
24 #include <com/sun/star/view/XSelectionChangeListener.hpp>
32 class ChartController
;
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
44 static VclPtr
<vcl::Window
> Create(
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
,
59 const bool bIsEnabled
) override
;
61 // constructor/destructor
64 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
65 ChartController
* pController
);
66 virtual ~ChartAxisPanel() override
;
67 virtual void dispose() override
;
69 virtual void updateData() override
;
70 virtual void modelInvalid() override
;
72 virtual void selectionChanged(bool bCorrectType
) override
;
73 virtual void SelectionInvalid() override
;
75 virtual void updateModel(css::uno::Reference
<css::frame::XModel
> xModel
) override
;
79 VclPtr
<CheckBox
> mpCBShowLabel
;
80 VclPtr
<CheckBox
> mpCBReverse
;
82 VclPtr
<ListBox
> mpLBLabelPos
;
83 VclPtr
<VclGrid
> mpGridLabel
;
85 VclPtr
<MetricField
> mpNFRotation
;
87 css::uno::Reference
<css::frame::XModel
> mxModel
;
88 css::uno::Reference
<css::util::XModifyListener
> mxModifyListener
;
89 css::uno::Reference
<css::view::XSelectionChangeListener
> mxSelectionListener
;
95 DECL_LINK(CheckBoxHdl
, Button
*, void);
96 DECL_LINK(ListBoxHdl
, ListBox
&, void);
97 DECL_LINK(TextRotationHdl
, Edit
&, void);
100 } } // end of namespace ::chart::sidebar
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */