vcl: allow for overriding the default PDF rendering resolution
[LibreOffice.git] / chart2 / source / controller / dialogs / tp_3D_SceneIllumination.hxx
blob81bb278e28ebae77f381761fd6ac24e1706c5ade
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_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
22 #include <TimerTriggeredControllerLock.hxx>
23 #include <vcl/weld.hxx>
24 #include <svx/dlgctl3d.hxx>
26 namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
28 class ColorListBox;
30 namespace chart
33 class LightButton
35 public:
36 explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton);
38 void switchLightOn(bool bOn);
39 bool isLightOn() const { return m_bLightOn;}
41 bool get_active() const { return m_xButton->get_active(); }
42 void set_active(bool bActive) { m_xButton->set_active(bActive); }
44 weld::ToggleButton* get_widget() const { return m_xButton.get(); }
46 void connect_clicked(const Link<weld::Button&, void>& rLink)
48 m_xButton->connect_clicked(rLink);
51 private:
52 std::unique_ptr<weld::ToggleButton> m_xButton;
53 bool m_bLightOn;
56 struct LightSourceInfo;
58 class ThreeD_SceneIllumination_TabPage
60 public:
61 ThreeD_SceneIllumination_TabPage(
62 weld::Container* pParent, weld::Window* pTopLevel,
63 const css::uno::Reference< css::beans::XPropertySet > & xSceneProperties,
64 const css::uno::Reference< css::frame::XModel >& xChartModel );
65 ~ThreeD_SceneIllumination_TabPage();
67 private:
68 DECL_LINK( ClickLightSourceButtonHdl, weld::Button&, void );
69 DECL_LINK( SelectColorHdl, ColorListBox&, void );
70 DECL_LINK( ColorDialogHdl, weld::Button&, void );
71 DECL_LINK( PreviewChangeHdl, LightCtl3D*, void );
72 DECL_LINK( PreviewSelectHdl, LightCtl3D*, void );
74 void updatePreview();
76 private:
77 DECL_LINK(fillControlsFromModel, void *, void);
79 void applyLightSourceToModel( sal_uInt32 nLightNumber );
80 void applyLightSourcesToModel();
82 std::unique_ptr<LightSourceInfo[]> m_pLightSourceInfoList;
84 css::uno::Reference< css::beans::XPropertySet > m_xSceneProperties;
86 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
88 bool m_bInCommitToModel;
90 css::uno::Reference<css::frame::XModel> m_xChartModel;
92 weld::Window* m_pTopLevel;
93 std::unique_ptr<weld::Builder> m_xBuilder;
94 std::unique_ptr<weld::Container> m_xContainer;
95 std::unique_ptr<LightButton> m_xBtn_Light1;
96 std::unique_ptr<LightButton> m_xBtn_Light2;
97 std::unique_ptr<LightButton> m_xBtn_Light3;
98 std::unique_ptr<LightButton> m_xBtn_Light4;
99 std::unique_ptr<LightButton> m_xBtn_Light5;
100 std::unique_ptr<LightButton> m_xBtn_Light6;
101 std::unique_ptr<LightButton> m_xBtn_Light7;
102 std::unique_ptr<LightButton> m_xBtn_Light8;
103 std::unique_ptr<ColorListBox> m_xLB_LightSource;
104 std::unique_ptr<weld::Button> m_xBtn_LightSource_Color;
105 std::unique_ptr<ColorListBox> m_xLB_AmbientLight;
106 std::unique_ptr<weld::Button> m_xBtn_AmbientLight_Color;
107 std::unique_ptr<weld::Scale> m_xHoriScale;
108 std::unique_ptr<weld::Scale> m_xVertScale;
109 std::unique_ptr<weld::Button> m_xBtn_Corner;
110 std::unique_ptr<LightControl3D> m_xPreview;
111 std::unique_ptr<weld::CustomWeld> m_xPreviewWnd;
112 std::unique_ptr<LightCtl3D> m_xCtl_Preview;
115 } //namespace chart
117 #endif
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */