vcl: allow for overriding the default PDF rendering resolution
[LibreOffice.git] / chart2 / source / controller / sidebar / ChartElementsPanel.hxx
blobdfb624b48362a5e943130b8f85a6ecb6d7e703fa
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/edit.hxx>
26 #include <vcl/layout.hxx>
27 #include "ChartSidebarModifyListener.hxx"
28 #include <TitleHelper.hxx>
30 namespace com { namespace sun { namespace star { namespace util { class XModifyListener; } } } }
32 class ListBox;
34 namespace chart {
36 class ChartController;
38 namespace sidebar {
40 class ChartElementsPanel : public PanelLayout,
41 public ::sfx2::sidebar::IContextChangeReceiver,
42 public sfx2::sidebar::SidebarModelUpdate,
43 public ChartSidebarModifyListenerParent
45 public:
46 static VclPtr<vcl::Window> Create(
47 vcl::Window* pParent,
48 const css::uno::Reference<css::frame::XFrame>& rxFrame,
49 ChartController* pController);
51 virtual void DataChanged(
52 const DataChangedEvent& rEvent) override;
54 virtual void HandleContextChange(
55 const vcl::EnumContext& rContext) override;
57 // constructor/destructor
58 ChartElementsPanel(
59 vcl::Window* pParent,
60 const css::uno::Reference<css::frame::XFrame>& rxFrame,
61 ChartController* pController);
63 virtual ~ChartElementsPanel() override;
65 virtual void dispose() override;
67 virtual void updateData() override;
68 virtual void modelInvalid() override;
70 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
72 private:
73 //ui controls
74 VclPtr<CheckBox> mpCBTitle;
75 VclPtr<Edit> mpEditTitle;
76 VclPtr<CheckBox> mpCBSubtitle;
77 VclPtr<Edit> mpEditSubtitle;
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;
106 bool mbModelValid;
108 OUString maTextTitle;
109 OUString maTextSubTitle;
111 void Initialize();
113 void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible);
115 DECL_LINK(CheckBoxHdl, Button*, void);
116 DECL_LINK(EditHdl, Edit&, void);
117 DECL_LINK(LegendPosHdl, ListBox&, void);
120 } } // end of namespace ::chart::sidebar
122 #endif
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */