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/.
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/ControllerItem.hxx>
23 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
24 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
25 #include <svx/sidebar/PanelLayout.hxx>
26 #include <vcl/layout.hxx>
27 #include "ChartSidebarModifyListener.hxx"
28 #include <TitleHelper.hxx>
30 #include <com/sun/star/util/XModifyListener.hpp>
38 class ChartController
;
42 class ChartElementsPanel
: public PanelLayout
,
43 public ::sfx2::sidebar::IContextChangeReceiver
,
44 public sfx2::sidebar::SidebarModelUpdate
,
45 public ChartSidebarModifyListenerParent
48 static VclPtr
<vcl::Window
> Create(
50 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
51 ChartController
* pController
);
53 virtual void DataChanged(
54 const DataChangedEvent
& rEvent
) override
;
56 virtual void HandleContextChange(
57 const vcl::EnumContext
& rContext
) override
;
59 // constructor/destructor
62 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
63 ChartController
* pController
);
65 virtual ~ChartElementsPanel() override
;
67 virtual void dispose() override
;
69 virtual void updateData() override
;
70 virtual void modelInvalid() override
;
72 virtual void updateModel(css::uno::Reference
<css::frame::XModel
> xModel
) override
;
76 VclPtr
<CheckBox
> mpCBTitle
;
77 VclPtr
<CheckBox
> mpCBSubtitle
;
78 VclPtr
<CheckBox
> mpCBXAxis
;
79 VclPtr
<CheckBox
> mpCBXAxisTitle
;
80 VclPtr
<CheckBox
> mpCBYAxis
;
81 VclPtr
<CheckBox
> mpCBYAxisTitle
;
82 VclPtr
<CheckBox
> mpCBZAxis
;
83 VclPtr
<CheckBox
> mpCBZAxisTitle
;
84 VclPtr
<CheckBox
> mpCB2ndXAxis
;
85 VclPtr
<CheckBox
> mpCB2ndXAxisTitle
;
86 VclPtr
<CheckBox
> mpCB2ndYAxis
;
87 VclPtr
<CheckBox
> mpCB2ndYAxisTitle
;
88 VclPtr
<CheckBox
> mpCBLegend
;
89 VclPtr
<CheckBox
> mpCBGridVerticalMajor
;
90 VclPtr
<CheckBox
> mpCBGridHorizontalMajor
;
91 VclPtr
<CheckBox
> mpCBGridVerticalMinor
;
92 VclPtr
<CheckBox
> mpCBGridHorizontalMinor
;
93 VclPtr
<FixedText
> mpTextTitle
;
94 VclPtr
<FixedText
> mpTextSubTitle
;
95 VclPtr
<FixedText
> mpLBAxis
;
96 VclPtr
<FixedText
> mpLBGrid
;
98 VclPtr
<ListBox
> mpLBLegendPosition
;
99 VclPtr
<VclHBox
> mpBoxLegend
;
101 vcl::EnumContext maContext
;
103 css::uno::Reference
<css::frame::XModel
> mxModel
;
104 css::uno::Reference
<css::util::XModifyListener
> mxListener
;
108 OUString maTextTitle
;
109 OUString maTextSubTitle
;
113 void setTitleVisible(TitleHelper::eTitleType eTitle
, bool bVisible
);
115 DECL_LINK(CheckBoxHdl
, Button
*, void);
116 DECL_LINK(LegendPosHdl
, ListBox
&, void);
119 } } // end of namespace ::chart::sidebar
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */