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