1*de7b3f82SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*de7b3f82SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*de7b3f82SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*de7b3f82SAndrew Rist * distributed with this work for additional information 6*de7b3f82SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*de7b3f82SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*de7b3f82SAndrew Rist * "License"); you may not use this file except in compliance 9*de7b3f82SAndrew Rist * with the License. You may obtain a copy of the License at 10*de7b3f82SAndrew Rist * 11*de7b3f82SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*de7b3f82SAndrew Rist * 13*de7b3f82SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*de7b3f82SAndrew Rist * software distributed under the License is distributed on an 15*de7b3f82SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*de7b3f82SAndrew Rist * KIND, either express or implied. See the License for the 17*de7b3f82SAndrew Rist * specific language governing permissions and limitations 18*de7b3f82SAndrew Rist * under the License. 19*de7b3f82SAndrew Rist * 20*de7b3f82SAndrew Rist *************************************************************/ 21*de7b3f82SAndrew Rist 22*de7b3f82SAndrew Rist 23cdf0e10cSrcweir #ifndef _CHART2_TP_3D_SCENE_ILLUMIMATION_HXX 24cdf0e10cSrcweir #define _CHART2_TP_3D_SCENE_ILLUMIMATION_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "ModifyListenerCallBack.hxx" 27cdf0e10cSrcweir #include "TimerTriggeredControllerLock.hxx" 28cdf0e10cSrcweir 29cdf0e10cSrcweir // #ifndef _COM_SUN_STAR_CHART2_SCENEDESCRIPTOR_HPP_ 30cdf0e10cSrcweir // #include <com/sun/star/chart2/SceneDescriptor.hpp> 31cdf0e10cSrcweir // #endif 32cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir // header for class TabPage 35cdf0e10cSrcweir #include <vcl/tabpage.hxx> 36cdf0e10cSrcweir // header for class FixedText 37cdf0e10cSrcweir #include <vcl/fixed.hxx> 38cdf0e10cSrcweir // header for class CheckBox 39cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX 40cdf0e10cSrcweir #include <vcl/button.hxx> 41cdf0e10cSrcweir #endif 42cdf0e10cSrcweir // header for class ColorLB 43cdf0e10cSrcweir #include <svx/dlgctrl.hxx> 44cdf0e10cSrcweir // header for class SvxLightCtl3D 45cdf0e10cSrcweir #include <svx/dlgctl3d.hxx> 46cdf0e10cSrcweir 47cdf0e10cSrcweir //............................................................................. 48cdf0e10cSrcweir namespace chart 49cdf0e10cSrcweir { 50cdf0e10cSrcweir //............................................................................. 51cdf0e10cSrcweir 52cdf0e10cSrcweir class LightButton : public ImageButton 53cdf0e10cSrcweir { 54cdf0e10cSrcweir public: 55cdf0e10cSrcweir LightButton( Window* pParent, const ResId& rResId, sal_Int32 nLightNumber ); 56cdf0e10cSrcweir virtual ~LightButton(); 57cdf0e10cSrcweir 58cdf0e10cSrcweir void switchLightOn(bool bOn); 59cdf0e10cSrcweir bool isLightOn() const; 60cdf0e10cSrcweir 61cdf0e10cSrcweir private: 62cdf0e10cSrcweir bool m_bLightOn; 63cdf0e10cSrcweir }; 64cdf0e10cSrcweir 65cdf0e10cSrcweir class ColorButton : public ImageButton 66cdf0e10cSrcweir { 67cdf0e10cSrcweir public: 68cdf0e10cSrcweir ColorButton( Window* pParent, const ResId& rResId ); 69cdf0e10cSrcweir virtual ~ColorButton(); 70cdf0e10cSrcweir }; 71cdf0e10cSrcweir 72cdf0e10cSrcweir struct LightSourceInfo; 73cdf0e10cSrcweir 74cdf0e10cSrcweir class ThreeD_SceneIllumination_TabPage : public TabPage 75cdf0e10cSrcweir { 76cdf0e10cSrcweir public: 77cdf0e10cSrcweir ThreeD_SceneIllumination_TabPage( 78cdf0e10cSrcweir Window* pWindow, 79cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 80cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & xSceneProperties, 81cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, 82cdf0e10cSrcweir XColorTable* pColorTable=0 ); 83cdf0e10cSrcweir virtual ~ThreeD_SceneIllumination_TabPage(); 84cdf0e10cSrcweir 85cdf0e10cSrcweir // has to be called in case the dialog was closed with OK 86cdf0e10cSrcweir void commitPendingChanges(); 87cdf0e10cSrcweir 88cdf0e10cSrcweir private: 89cdf0e10cSrcweir DECL_LINK( ClickLightSourceButtonHdl, LightButton* ); 90cdf0e10cSrcweir DECL_LINK( SelectColorHdl, ColorLB* ); 91cdf0e10cSrcweir DECL_LINK( ColorDialogHdl, Button* ); 92cdf0e10cSrcweir DECL_LINK( PreviewChangeHdl, void* ); 93cdf0e10cSrcweir DECL_LINK( PreviewSelectHdl, void* ); 94cdf0e10cSrcweir 95cdf0e10cSrcweir void updatePreview(); 96cdf0e10cSrcweir 97cdf0e10cSrcweir private: 98cdf0e10cSrcweir DECL_LINK(fillControlsFromModel, void *); 99cdf0e10cSrcweir 100cdf0e10cSrcweir void applyLightSourceToModel( sal_uInt32 nLightNumber ); 101cdf0e10cSrcweir void applyLightSourcesToModel(); 102cdf0e10cSrcweir 103cdf0e10cSrcweir FixedText m_aFT_LightSource; 104cdf0e10cSrcweir 105cdf0e10cSrcweir LightButton m_aBtn_Light1; 106cdf0e10cSrcweir LightButton m_aBtn_Light2; 107cdf0e10cSrcweir LightButton m_aBtn_Light3; 108cdf0e10cSrcweir LightButton m_aBtn_Light4; 109cdf0e10cSrcweir LightButton m_aBtn_Light5; 110cdf0e10cSrcweir LightButton m_aBtn_Light6; 111cdf0e10cSrcweir LightButton m_aBtn_Light7; 112cdf0e10cSrcweir LightButton m_aBtn_Light8; 113cdf0e10cSrcweir 114cdf0e10cSrcweir ColorLB m_aLB_LightSource; 115cdf0e10cSrcweir ColorButton m_aBtn_LightSource_Color; 116cdf0e10cSrcweir 117cdf0e10cSrcweir FixedText m_aFT_AmbientLight; 118cdf0e10cSrcweir ColorLB m_aLB_AmbientLight; 119cdf0e10cSrcweir ColorButton m_aBtn_AmbientLight_Color; 120cdf0e10cSrcweir 121cdf0e10cSrcweir SvxLightCtl3D m_aCtl_Preview; 122cdf0e10cSrcweir 123cdf0e10cSrcweir LightSourceInfo* m_pLightSourceInfoList; 124cdf0e10cSrcweir 125cdf0e10cSrcweir ::com::sun::star::uno::Reference< 126cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > m_xSceneProperties; 127cdf0e10cSrcweir 128cdf0e10cSrcweir TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; 129cdf0e10cSrcweir 130cdf0e10cSrcweir bool m_bInCommitToModel; 131cdf0e10cSrcweir 132cdf0e10cSrcweir ModifyListenerCallBack m_aModelChangeListener; 133cdf0e10cSrcweir ::com::sun::star::uno::Reference< 134cdf0e10cSrcweir ::com::sun::star::frame::XModel > m_xChartModel; 135cdf0e10cSrcweir }; 136cdf0e10cSrcweir 137cdf0e10cSrcweir //............................................................................. 138cdf0e10cSrcweir } //namespace chart 139cdf0e10cSrcweir //............................................................................. 140cdf0e10cSrcweir 141cdf0e10cSrcweir #endif 142