Update ooo320-m1
[ooovba.git] / chart2 / source / controller / dialogs / res_LegendPosition.hxx
blobb894dc598ea83b201c16196a8071a84eb3585601
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: res_LegendPosition.hxx,v $
10 * $Revision: 1.3 $
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_RES_LEGENPOSITION_HXX
31 #define _CHART2_RES_LEGENPOSITION_HXX
33 // header for class CheckBox
34 #ifndef _SV_BUTTON_HXX
35 #include <vcl/button.hxx>
36 #endif
37 #include <vcl/fixed.hxx>
38 // header for class SfxItemSet
39 #include <svtools/itemset.hxx>
40 #include <com/sun/star/frame/XModel.hpp>
41 #include <com/sun/star/uno/XComponentContext.hpp>
43 //.............................................................................
44 namespace chart
46 //.............................................................................
48 class LegendPositionResources
50 public:
51 //constructor without Display checkbox
52 LegendPositionResources( Window* pParent );
53 //constructor inclusive Display checkbox
54 LegendPositionResources( Window* pParent, const ::com::sun::star::uno::Reference<
55 ::com::sun::star::uno::XComponentContext>& xCC );
56 virtual ~LegendPositionResources();
58 void writeToResources( const ::com::sun::star::uno::Reference<
59 ::com::sun::star::frame::XModel >& xChartModel );
60 void writeToModel( const ::com::sun::star::uno::Reference<
61 ::com::sun::star::frame::XModel >& xChartModel ) const;
64 void initFromItemSet( const SfxItemSet& rInAttrs );
65 void writeToItemSet( SfxItemSet& rOutAttrs ) const;
67 void SetChangeHdl( const Link& rLink );
69 DECL_LINK( PositionEnableHdl, void* );
70 DECL_LINK( PositionChangeHdl, RadioButton* );
72 private:
73 void impl_setRadioButtonToggleHdl();
75 private:
76 ::com::sun::star::uno::Reference<
77 ::com::sun::star::uno::XComponentContext> m_xCC;
79 CheckBox m_aCbxShow;
81 RadioButton m_aRbtLeft;
82 RadioButton m_aRbtTop;
83 RadioButton m_aRbtRight;
84 RadioButton m_aRbtBottom;
86 Link m_aChangeLink;
89 //.............................................................................
90 } //namespace chart
91 //.............................................................................
93 #endif