merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / controller / dialogs / tp_3D_SceneIllumination.hxx
blob5a561442ad958ef4bef84c9131bbaebe9d82e76d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tp_3D_SceneIllumination.hxx,v $
10 * $Revision: 1.3.68.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CHART2_TP_3D_SCENE_ILLUMIMATION_HXX
31 #define _CHART2_TP_3D_SCENE_ILLUMIMATION_HXX
33 #include "ModifyListenerCallBack.hxx"
34 #include "TimerTriggeredControllerLock.hxx"
36 // #ifndef _COM_SUN_STAR_CHART2_SCENEDESCRIPTOR_HPP_
37 // #include <com/sun/star/chart2/SceneDescriptor.hpp>
38 // #endif
39 #include <com/sun/star/beans/XPropertySet.hpp>
41 // header for class TabPage
42 #include <vcl/tabpage.hxx>
43 // header for class FixedText
44 #include <vcl/fixed.hxx>
45 // header for class CheckBox
46 #ifndef _SV_BUTTON_HXX
47 #include <vcl/button.hxx>
48 #endif
49 // header for class ColorLB
50 #include <svx/dlgctrl.hxx>
51 // header for class SvxLightCtl3D
52 #include <svx/dlgctl3d.hxx>
54 //.............................................................................
55 namespace chart
57 //.............................................................................
59 class LightButton : public ImageButton
61 public:
62 LightButton( Window* pParent, const ResId& rResId, sal_Int32 nLightNumber );
63 virtual ~LightButton();
65 void switchLightOn(bool bOn);
66 bool isLightOn() const;
68 private:
69 bool m_bLightOn;
72 class ColorButton : public ImageButton
74 public:
75 ColorButton( Window* pParent, const ResId& rResId );
76 virtual ~ColorButton();
79 struct LightSourceInfo;
81 class ThreeD_SceneIllumination_TabPage : public TabPage
83 public:
84 ThreeD_SceneIllumination_TabPage(
85 Window* pWindow,
86 const ::com::sun::star::uno::Reference<
87 ::com::sun::star::beans::XPropertySet > & xSceneProperties,
88 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel,
89 XColorTable* pColorTable=0 );
90 virtual ~ThreeD_SceneIllumination_TabPage();
92 // has to be called in case the dialog was closed with OK
93 void commitPendingChanges();
95 private:
96 DECL_LINK( ClickLightSourceButtonHdl, LightButton* );
97 DECL_LINK( SelectColorHdl, ColorLB* );
98 DECL_LINK( ColorDialogHdl, Button* );
99 DECL_LINK( PreviewChangeHdl, void* );
100 DECL_LINK( PreviewSelectHdl, void* );
102 void updatePreview();
104 private:
105 DECL_LINK(fillControlsFromModel, void *);
107 void applyLightSourceToModel( sal_uInt32 nLightNumber );
108 void applyLightSourcesToModel();
110 FixedText m_aFT_LightSource;
112 LightButton m_aBtn_Light1;
113 LightButton m_aBtn_Light2;
114 LightButton m_aBtn_Light3;
115 LightButton m_aBtn_Light4;
116 LightButton m_aBtn_Light5;
117 LightButton m_aBtn_Light6;
118 LightButton m_aBtn_Light7;
119 LightButton m_aBtn_Light8;
121 ColorLB m_aLB_LightSource;
122 ColorButton m_aBtn_LightSource_Color;
124 FixedText m_aFT_AmbientLight;
125 ColorLB m_aLB_AmbientLight;
126 ColorButton m_aBtn_AmbientLight_Color;
128 SvxLightCtl3D m_aCtl_Preview;
130 LightSourceInfo* m_pLightSourceInfoList;
132 ::com::sun::star::uno::Reference<
133 ::com::sun::star::beans::XPropertySet > m_xSceneProperties;
135 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
137 bool m_bInCommitToModel;
139 ModifyListenerCallBack m_aModelChangeListener;
140 ::com::sun::star::uno::Reference<
141 ::com::sun::star::frame::XModel > m_xChartModel;
144 //.............................................................................
145 } //namespace chart
146 //.............................................................................
148 #endif