update dev300-m58
[ooovba.git] / extensions / source / propctrlr / selectlabeldialog.hxx
blob35e37d825a2e729048a8c6f5778aedfdc6bb941b
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: selectlabeldialog.hxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
31 #ifndef _EXTENSIONS_PROPCTRLR_SELECTLABELDIALOG_HXX_
32 #define _EXTENSIONS_PROPCTRLR_SELECTLABELDIALOG_HXX_
34 #include <vcl/fixed.hxx>
35 #include <svtools/svtreebx.hxx>
36 #ifndef _SV_BUTTON_HXX
37 #include <vcl/button.hxx>
38 #endif
39 #include <vcl/image.hxx>
40 #include <vcl/dialog.hxx>
41 #include <com/sun/star/beans/XPropertySet.hpp>
42 #ifndef _EXTENSIONS_PROPCTRLR_MODULEPRC_HXX_
43 #include "modulepcr.hxx"
44 #endif
46 //............................................................................
47 namespace pcr
49 //............................................................................
51 //========================================================================
52 // OSelectLabelDialog
53 //========================================================================
54 class OSelectLabelDialog
55 :public ModalDialog
56 ,public PcrClient
58 FixedText m_aMainDesc;
59 SvTreeListBox m_aControlTree;
60 CheckBox m_aNoAssignment;
61 FixedLine m_aSeparator;
62 OKButton m_aOk;
63 CancelButton m_aCancel;
65 ImageList m_aModelImages;
66 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel;
67 ::rtl::OUString m_sRequiredService;
68 Image m_aRequiredControlImage;
69 SvLBoxEntry* m_pInitialSelection;
70 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xInitialLabelControl;
72 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSelectedControl;
73 SvLBoxEntry* m_pLastSelected;
74 sal_Bool m_bHaveAssignableControl;
76 public:
77 OSelectLabelDialog(Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _xControlModel);
78 ~OSelectLabelDialog();
80 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetSelected() const { return m_aNoAssignment.IsChecked() ? ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > () : m_xSelectedControl; }
82 protected:
83 sal_Int32 InsertEntries(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xContainer, SvLBoxEntry* pContainerEntry);
85 DECL_LINK(OnEntrySelected, SvTreeListBox*);
86 DECL_LINK(OnNoAssignmentClicked, Button*);
89 //............................................................................
90 } // namespace pcr
91 //............................................................................
93 #endif // _EXTENSIONS_PROPCTRLR_SELECTLABELDIALOG_HXX_