update dev300-m58
[ooovba.git] / sdext / source / minimizer / unodialog.hxx
blob03f9fb82e5b5131d94f54ca07e7ccd0d151616a8
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: unodialog.hxx,v $
10 * $Revision: 1.4 $
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 UNODIALOG_HXX
32 #define UNODIALOG_HXX
34 #include <com/sun/star/uno/Sequence.h>
35 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
36 #ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
37 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
38 #endif
39 #include <com/sun/star/container/XIndexContainer.hpp>
40 #include <com/sun/star/frame/XController.hpp>
41 #include <com/sun/star/frame/XFrame.hpp>
42 #include <com/sun/star/script/XInvocation.hpp>
43 #include <com/sun/star/beans/XPropertySet.hpp>
44 #include <com/sun/star/beans/XMultiPropertySet.hpp>
45 #include <com/sun/star/awt/XControl.hpp>
46 #include <com/sun/star/awt/XControlModel.hpp>
47 #include <com/sun/star/container/XNameContainer.hpp>
48 #include <com/sun/star/container/XNameAccess.hpp>
49 #include <com/sun/star/uno/XComponentContext.hpp>
50 #include <com/sun/star/awt/XActionListener.hpp>
51 #include <com/sun/star/awt/XTextListener.hpp>
52 #include <com/sun/star/awt/XButton.hpp>
53 #include <com/sun/star/awt/XCheckBox.hpp>
54 #include <com/sun/star/awt/XComboBox.hpp>
55 #include <com/sun/star/awt/XTextComponent.hpp>
56 #include <com/sun/star/awt/XRadioButton.hpp>
57 #include <com/sun/star/awt/XListBox.hpp>
58 #include <com/sun/star/awt/XFixedText.hpp>
59 #include <com/sun/star/awt/XControlContainer.hpp>
60 #include <com/sun/star/awt/XReschedule.hpp>
61 #include <com/sun/star/awt/XDialog.hpp>
62 #include <com/sun/star/awt/Size.hpp>
63 #include <cppuhelper/implbase1.hxx>
64 #include <cppuhelper/implbase2.hxx>
65 #include <cppuhelper/implbase3.hxx>
67 // -------------
68 // - UnoDialog -
69 // -------------
71 ////////////////////////////////////////////////////////////////////////
73 class UnoDialog
75 public :
77 UnoDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame );
78 ~UnoDialog();
80 void execute();
81 void endExecute( sal_Bool bStatus );
83 com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > createWindowPeer( com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > xParentPeer )
84 throw ( com::sun::star::uno::Exception );
86 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > insertControlModel( const rtl::OUString& rServiceName, const rtl::OUString& rName,
87 const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& rPropertyValues );
89 void setVisible( const rtl::OUString& rName, sal_Bool bVisible );
91 sal_Bool isHighContrast();
93 sal_Int32 getMapsFromPixels( sal_Int32 nPixels ) const;
95 com::sun::star::uno::Reference< com::sun::star::awt::XButton > insertButton( const rtl::OUString& rName,
96 com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > xActionListener, const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
97 const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& rPropertyValues );
99 com::sun::star::uno::Reference< com::sun::star::awt::XFixedText > insertFixedText( const rtl::OUString& rName,
100 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
102 com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > insertCheckBox( const rtl::OUString& rName,
103 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
105 com::sun::star::uno::Reference< com::sun::star::awt::XControl > insertFormattedField( const rtl::OUString& rName,
106 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
108 com::sun::star::uno::Reference< com::sun::star::awt::XComboBox > insertComboBox( const rtl::OUString& rName,
109 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
111 com::sun::star::uno::Reference< com::sun::star::awt::XRadioButton > insertRadioButton( const rtl::OUString& rName,
112 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
114 com::sun::star::uno::Reference< com::sun::star::awt::XListBox > insertListBox( const rtl::OUString& rName,
115 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
117 com::sun::star::uno::Reference< com::sun::star::awt::XControl > insertImage( const rtl::OUString& rName,
118 const com::sun::star::uno::Sequence< rtl::OUString > rPropertyNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > rPropertyValues );
120 void setControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName, const com::sun::star::uno::Any& rPropertyValue );
121 com::sun::star::uno::Any getControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName );
122 #if 0
123 void showMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage, sal_Bool bErrorBox ) const;
124 #endif
125 void enableControl( const rtl::OUString& rControlName );
126 void disableControl( const rtl::OUString& rControlName );
128 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
129 com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
130 com::sun::star::uno::Reference< com::sun::star::awt::XReschedule > mxReschedule;
132 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > mxDialogModel;
133 com::sun::star::uno::Reference< com::sun::star::beans::XMultiPropertySet > mxDialogModelMultiPropertySet;
134 com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > mxDialogModelPropertySet;
135 com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxDialogModelMSF;
136 com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > mxDialogModelNameContainer;
137 com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > mxDialogModelNameAccess;
139 com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > mxControlModel;
141 com::sun::star::uno::Reference< com::sun::star::awt::XDialog > mxDialog;
142 com::sun::star::uno::Reference< com::sun::star::awt::XControl > mxControl;
143 com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > mxWindowPeer;
145 com::sun::star::uno::Reference< com::sun::star::awt::XControlContainer > mxDialogControlContainer;
146 com::sun::star::uno::Reference< com::sun::star::lang::XComponent > mxDialogComponent;
147 com::sun::star::uno::Reference< com::sun::star::awt::XWindow > mxDialogWindow;
149 sal_Bool mbStatus;
152 #endif // UNODIALOG_HXX