1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _CHART2_TP_CHARTTYPE_HXX 25 #define _CHART2_TP_CHARTTYPE_HXX 26 27 #include <vector> 28 29 #include "ChartTypeDialogController.hxx" 30 #include "ChartTypeTemplateProvider.hxx" 31 #include "TimerTriggeredControllerLock.hxx" 32 33 #include <com/sun/star/chart2/XChartDocument.hpp> 34 #include <svtools/wizardmachine.hxx> 35 #include <svtools/valueset.hxx> 36 #include <vcl/fixed.hxx> 37 // header for class MetricField 38 #include <vcl/field.hxx> 39 // header for class ListBox 40 #include <vcl/lstbox.hxx> 41 #include <com/sun/star/uno/XComponentContext.hpp> 42 43 //............................................................................. 44 namespace chart 45 { 46 //............................................................................. 47 48 //----------------------------------------------------------------------------- 49 /** 50 */ 51 class ChartTypeResourceGroup; 52 class AxisTypeResourceGroup; 53 class Dim3DLookResourceGroup; 54 class StackingResourceGroup; 55 class SplineResourceGroup; 56 class GeometryResourceGroup; 57 class ChartTypeParameter; 58 class SortByXValuesResourceGroup; 59 60 class ChartTypeTabPage : public ResourceChangeListener, public svt::OWizardPage, public ChartTypeTemplateProvider 61 { 62 public: 63 ChartTypeTabPage( Window* pParent 64 , const ::com::sun::star::uno::Reference< 65 ::com::sun::star::chart2::XChartDocument >& xChartModel 66 , const ::com::sun::star::uno::Reference< 67 ::com::sun::star::uno::XComponentContext >& xContext 68 , bool bDoLiveUpdate, bool bHideDescription = false ); 69 virtual ~ChartTypeTabPage(); 70 71 virtual void initializePage(); 72 virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ); 73 74 virtual ::com::sun::star::uno::Reference< 75 ::com::sun::star::chart2::XChartTypeTemplate > getCurrentTemplate() const; 76 77 protected: 78 ChartTypeDialogController* getSelectedMainType(); 79 void showAllControls( ChartTypeDialogController& rTypeController ); 80 void fillAllControls( const ChartTypeParameter& rParameter, bool bAlsoResetSubTypeList=true ); 81 ChartTypeParameter getCurrentParamter() const; 82 83 virtual void stateChanged( ChangingResource* pResource ); 84 85 void commitToModel( const ChartTypeParameter& rParameter ); 86 87 DECL_LINK( SelectMainTypeHdl, void* ); 88 DECL_LINK( SelectSubTypeHdl, void* ); 89 90 protected: 91 FixedText m_aFT_ChooseType; 92 ListBox m_aMainTypeList; 93 ValueSet m_aSubTypeList; 94 95 AxisTypeResourceGroup* m_pAxisTypeResourceGroup; 96 Dim3DLookResourceGroup* m_pDim3DLookResourceGroup; 97 StackingResourceGroup* m_pStackingResourceGroup; 98 SplineResourceGroup* m_pSplineResourceGroup; 99 GeometryResourceGroup* m_pGeometryResourceGroup; 100 SortByXValuesResourceGroup* m_pSortByXValuesResourceGroup; 101 102 long m_nYTopPos;//top y position of the different ResourceGroups (AxisTypeResourceGroup, etc) 103 104 ::com::sun::star::uno::Reference< 105 ::com::sun::star::chart2::XChartDocument > m_xChartModel; 106 ::com::sun::star::uno::Reference< 107 ::com::sun::star::uno::XComponentContext > m_xCC; 108 109 ::std::vector< ChartTypeDialogController* > m_aChartTypeDialogControllerList; 110 ChartTypeDialogController* m_pCurrentMainType; 111 112 sal_Int32 m_nChangingCalls; 113 bool m_bDoLiveUpdate; 114 115 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; 116 }; 117 118 //............................................................................. 119 } //namespace chart 120 //............................................................................. 121 #endif 122