Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
20 : #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_3D_SCENEILLUMINATION_HXX
21 :
22 : #include "ModifyListenerCallBack.hxx"
23 : #include "TimerTriggeredControllerLock.hxx"
24 :
25 : #include <com/sun/star/beans/XPropertySet.hpp>
26 :
27 : #include <vcl/tabpage.hxx>
28 : #include <vcl/fixed.hxx>
29 : #include <vcl/button.hxx>
30 : #include <svx/dlgctrl.hxx>
31 : #include <svx/dlgctl3d.hxx>
32 :
33 : namespace chart
34 : {
35 :
36 0 : class LightButton : public ImageButton
37 : {
38 : public:
39 : explicit LightButton( vcl::Window* pParent);
40 :
41 : void switchLightOn(bool bOn);
42 0 : bool isLightOn() const { return m_bLightOn;}
43 :
44 : private:
45 : bool m_bLightOn;
46 : };
47 :
48 : struct LightSourceInfo;
49 :
50 : class ThreeD_SceneIllumination_TabPage : public TabPage
51 : {
52 : public:
53 : ThreeD_SceneIllumination_TabPage(
54 : vcl::Window* pWindow,
55 : const ::com::sun::star::uno::Reference<
56 : ::com::sun::star::beans::XPropertySet > & xSceneProperties,
57 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel,
58 : const XColorListRef &pColorTable );
59 : virtual ~ThreeD_SceneIllumination_TabPage();
60 : virtual void dispose() SAL_OVERRIDE;
61 :
62 : private:
63 : DECL_LINK( ClickLightSourceButtonHdl, LightButton* );
64 : DECL_LINK( SelectColorHdl, ColorLB* );
65 : DECL_LINK( ColorDialogHdl, Button* );
66 : DECL_LINK( PreviewChangeHdl, void* );
67 : DECL_LINK( PreviewSelectHdl, void* );
68 :
69 : void updatePreview();
70 :
71 : private:
72 : DECL_LINK(fillControlsFromModel, void *);
73 :
74 : void applyLightSourceToModel( sal_uInt32 nLightNumber );
75 : void applyLightSourcesToModel();
76 :
77 : VclPtr<LightButton> m_pBtn_Light1;
78 : VclPtr<LightButton> m_pBtn_Light2;
79 : VclPtr<LightButton> m_pBtn_Light3;
80 : VclPtr<LightButton> m_pBtn_Light4;
81 : VclPtr<LightButton> m_pBtn_Light5;
82 : VclPtr<LightButton> m_pBtn_Light6;
83 : VclPtr<LightButton> m_pBtn_Light7;
84 : VclPtr<LightButton> m_pBtn_Light8;
85 :
86 : VclPtr<ColorLB> m_pLB_LightSource;
87 : VclPtr<PushButton> m_pBtn_LightSource_Color;
88 :
89 : VclPtr<ColorLB> m_pLB_AmbientLight;
90 : VclPtr<PushButton> m_pBtn_AmbientLight_Color;
91 :
92 : VclPtr<SvxLightCtl3D> m_pCtl_Preview;
93 :
94 : LightSourceInfo* m_pLightSourceInfoList;
95 :
96 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSceneProperties;
97 :
98 : TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
99 :
100 : bool m_bInCommitToModel;
101 :
102 : ModifyListenerCallBack m_aModelChangeListener;
103 : ::com::sun::star::uno::Reference<
104 : ::com::sun::star::frame::XModel > m_xChartModel;
105 : };
106 :
107 : } //namespace chart
108 :
109 : #endif
110 :
111 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|