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 #ifndef _CHART2_RES_LEGENPOSITION_HXX 24 #define _CHART2_RES_LEGENPOSITION_HXX 25 26 // header for class CheckBox 27 #ifndef _SV_BUTTON_HXX 28 #include <vcl/button.hxx> 29 #endif 30 #include <vcl/fixed.hxx> 31 // header for class SfxItemSet 32 #include <svl/itemset.hxx> 33 #include <com/sun/star/frame/XModel.hpp> 34 #include <com/sun/star/uno/XComponentContext.hpp> 35 36 //............................................................................. 37 namespace chart 38 { 39 //............................................................................. 40 41 class LegendPositionResources 42 { 43 44 public: 45 //constructor without Display checkbox 46 LegendPositionResources( Window* pParent ); 47 //constructor inclusive Display checkbox 48 LegendPositionResources( Window* pParent, const ::com::sun::star::uno::Reference< 49 ::com::sun::star::uno::XComponentContext>& xCC ); 50 virtual ~LegendPositionResources(); 51 52 void writeToResources( const ::com::sun::star::uno::Reference< 53 ::com::sun::star::frame::XModel >& xChartModel ); 54 void writeToModel( const ::com::sun::star::uno::Reference< 55 ::com::sun::star::frame::XModel >& xChartModel ) const; 56 57 58 void initFromItemSet( const SfxItemSet& rInAttrs ); 59 void writeToItemSet( SfxItemSet& rOutAttrs ) const; 60 61 void SetChangeHdl( const Link& rLink ); 62 63 DECL_LINK( PositionEnableHdl, void* ); 64 DECL_LINK( PositionChangeHdl, RadioButton* ); 65 66 void SetAccessibleRelationMemberOf(Window* pMemberOf); 67 private: 68 void impl_setRadioButtonToggleHdl(); 69 70 private: 71 ::com::sun::star::uno::Reference< 72 ::com::sun::star::uno::XComponentContext> m_xCC; 73 74 CheckBox m_aCbxShow; 75 76 RadioButton m_aRbtLeft; 77 RadioButton m_aRbtRight; 78 RadioButton m_aRbtTop; 79 RadioButton m_aRbtBottom; 80 81 Link m_aChangeLink; 82 }; 83 84 //............................................................................. 85 } //namespace chart 86 //............................................................................. 87 88 #endif 89