1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <com/sun/star/uno/Sequence.h>
24 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/container/XIndexContainer.hpp>
27 #include <com/sun/star/frame/XController.hpp>
28 #include <com/sun/star/frame/XFrame.hpp>
29 #include <com/sun/star/script/XInvocation.hpp>
30 #include <com/sun/star/beans/XPropertySet.hpp>
31 #include <com/sun/star/beans/XMultiPropertySet.hpp>
32 #include <com/sun/star/awt/XControl.hpp>
33 #include <com/sun/star/awt/XControlModel.hpp>
34 #include <com/sun/star/container/XNameContainer.hpp>
35 #include <com/sun/star/container/XNameAccess.hpp>
36 #include <com/sun/star/uno/XComponentContext.hpp>
37 #include <com/sun/star/awt/XActionListener.hpp>
38 #include <com/sun/star/awt/XTextListener.hpp>
39 #include <com/sun/star/awt/XButton.hpp>
40 #include <com/sun/star/awt/XCheckBox.hpp>
41 #include <com/sun/star/awt/XComboBox.hpp>
42 #include <com/sun/star/awt/XTextComponent.hpp>
43 #include <com/sun/star/awt/XRadioButton.hpp>
44 #include <com/sun/star/awt/XListBox.hpp>
45 #include <com/sun/star/awt/XFixedText.hpp>
46 #include <com/sun/star/awt/XControlContainer.hpp>
47 #include <com/sun/star/awt/XReschedule.hpp>
48 #include <com/sun/star/awt/XDialog.hpp>
49 #include <com/sun/star/awt/Size.hpp>
50 #include <cppuhelper/implbase1.hxx>
51 #include <cppuhelper/implbase2.hxx>
52 #include <cppuhelper/implbase3.hxx>
58 ////////////////////////////////////////////////////////////////////////
64 UnoDialog( const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>& rxMSF
, com::sun::star::uno::Reference
< com::sun::star::frame::XFrame
>& rxFrame
);
68 void endExecute( sal_Bool bStatus
);
70 com::sun::star::uno::Reference
< com::sun::star::awt::XWindowPeer
> createWindowPeer( com::sun::star::uno::Reference
< com::sun::star::awt::XWindowPeer
> xParentPeer
)
71 throw ( com::sun::star::uno::Exception
);
73 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> insertControlModel( const OUString
& rServiceName
, const OUString
& rName
,
74 const com::sun::star::uno::Sequence
< OUString
>& rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
>& rPropertyValues
);
76 void setVisible( const OUString
& rName
, sal_Bool bVisible
);
78 com::sun::star::uno::Reference
< com::sun::star::awt::XButton
> insertButton( const OUString
& rName
,
79 com::sun::star::uno::Reference
< com::sun::star::awt::XActionListener
> xActionListener
, const com::sun::star::uno::Sequence
< OUString
>& rPropertyNames
,
80 const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
>& rPropertyValues
);
82 com::sun::star::uno::Reference
< com::sun::star::awt::XFixedText
> insertFixedText( const OUString
& rName
,
83 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
85 com::sun::star::uno::Reference
< com::sun::star::awt::XCheckBox
> insertCheckBox( const OUString
& rName
,
86 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
88 com::sun::star::uno::Reference
< com::sun::star::awt::XControl
> insertFormattedField( const OUString
& rName
,
89 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
91 com::sun::star::uno::Reference
< com::sun::star::awt::XComboBox
> insertComboBox( const OUString
& rName
,
92 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
94 com::sun::star::uno::Reference
< com::sun::star::awt::XRadioButton
> insertRadioButton( const OUString
& rName
,
95 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
97 com::sun::star::uno::Reference
< com::sun::star::awt::XListBox
> insertListBox( const OUString
& rName
,
98 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
100 com::sun::star::uno::Reference
< com::sun::star::awt::XControl
> insertImage( const OUString
& rName
,
101 const com::sun::star::uno::Sequence
< OUString
> rPropertyNames
, const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
> rPropertyValues
);
103 void setControlProperty( const OUString
& rControlName
, const OUString
& rPropertyName
, const com::sun::star::uno::Any
& rPropertyValue
);
104 com::sun::star::uno::Any
getControlProperty( const OUString
& rControlName
, const OUString
& rPropertyName
);
106 void enableControl( const OUString
& rControlName
);
107 void disableControl( const OUString
& rControlName
);
109 com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
> mxMSF
;
110 com::sun::star::uno::Reference
< com::sun::star::frame::XController
> mxController
;
111 com::sun::star::uno::Reference
< com::sun::star::awt::XReschedule
> mxReschedule
;
113 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> mxDialogModel
;
114 com::sun::star::uno::Reference
< com::sun::star::beans::XMultiPropertySet
> mxDialogModelMultiPropertySet
;
115 com::sun::star::uno::Reference
< com::sun::star::beans::XPropertySet
> mxDialogModelPropertySet
;
116 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> mxDialogModelMSF
;
117 com::sun::star::uno::Reference
< com::sun::star::container::XNameContainer
> mxDialogModelNameContainer
;
118 com::sun::star::uno::Reference
< com::sun::star::container::XNameAccess
> mxDialogModelNameAccess
;
120 com::sun::star::uno::Reference
< com::sun::star::awt::XControlModel
> mxControlModel
;
122 com::sun::star::uno::Reference
< com::sun::star::awt::XDialog
> mxDialog
;
123 com::sun::star::uno::Reference
< com::sun::star::awt::XControl
> mxControl
;
124 com::sun::star::uno::Reference
< com::sun::star::awt::XWindowPeer
> mxWindowPeer
;
126 com::sun::star::uno::Reference
< com::sun::star::awt::XControlContainer
> mxDialogControlContainer
;
127 com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> mxDialogComponent
;
128 com::sun::star::uno::Reference
< com::sun::star::awt::XWindow
> mxDialogWindow
;
133 #endif // UNODIALOG_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */