xref: /trunk/main/offapi/com/sun/star/embed/XInplaceClient.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_embed_XInplaceClient_idl__
28#define __com_sun_star_embed_XInplaceClient_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_container_XIndexAccess_idl__
35#include <com/sun/star/container/XIndexAccess.idl>
36#endif
37
38#ifndef __com_sun_star_frame_XDispatchProvider_idl__
39#include <com/sun/star/frame/XDispatchProvider.idl>
40#endif
41
42#ifndef __com_sun_star_frame_XLayoutManager_idl__
43#include <com/sun/star/frame/XLayoutManager.idl>
44#endif
45
46#ifndef __com_sun_star_awt_XWindow_idl__
47#include <com/sun/star/awt/XWindow.idl>
48#endif
49
50#ifndef __com_sun_star_awt_Rectangle_idl__
51#include <com/sun/star/awt/Rectangle.idl>
52#endif
53
54#ifndef __com_sun_star_awt_Size_idl__
55#include <com/sun/star/awt/Size.idl>
56#endif
57
58#ifndef __com_sun_star_awt_KeyEvent_idl__
59#include <com/sun/star/awt/KeyEvent.idl>
60#endif
61
62#ifndef __com_sun_star_embed_WrongStateException_idl__
63#include <com/sun/star/embed/WrongStateException.idl>
64#endif
65
66
67//============================================================================
68
69 module com {  module sun {  module star {  module embed {
70
71//============================================================================
72/** represents common functionality for inplace clients.
73 */
74interface XInplaceClient: com::sun::star::uno::XInterface
75{
76    //------------------------------------------------------------------------
77    /** checks if the container can activate the object inplace.
78
79        @return
80            <TRUE/> the container can activate the object inplace.
81            <FALSE/> otherwise.
82     */
83    boolean canInplaceActivate();
84
85    //------------------------------------------------------------------------
86    /** notifies container through the client that the object is to be
87        inplace activated.
88
89        @throws com::sun::star::embed::WrongStateException
90            the container is not ready for activation
91     */
92    void activatingInplace()
93        raises( ::com::sun::star::embed::WrongStateException );
94
95    //------------------------------------------------------------------------
96    /** notifies container through the client that the object is to be
97        UI-activated.
98
99        @throws com::sun::star::embed::WrongStateException
100            the container is not ready for activation
101     */
102    void activatingUI()
103        raises( ::com::sun::star::embed::WrongStateException );
104
105    //------------------------------------------------------------------------
106    /** notifies container through the client that the object is deactivated.
107
108        @throws com::sun::star::embed::WrongStateException
109            the container is not ready for deactivation
110     */
111    void deactivatedInplace()
112        raises( ::com::sun::star::embed::WrongStateException );
113
114    //------------------------------------------------------------------------
115    /** notifies container through the client that the object is
116        UI-deactivated.
117
118        <p>
119        After this notification the container can restore it's own UI and take focus.
120        </p>
121
122        @throws com::sun::star::embed::WrongStateException
123            the container is not ready for deactivation
124     */
125    void deactivatedUI()
126        raises( ::com::sun::star::embed::WrongStateException );
127
128    //------------------------------------------------------------------------
129    /** allows to retrieve the
130        <type scope="com::sun::star::frame">LayoutManager</type> of the
131        container.
132
133        @return
134            reference to object representing the
135            <type scope="com::sun::star::frame">LayoutManager</type> of the
136            container
137
138        @throws com::sun::star::embed::WrongStateException
139            the object is in unexpected state to make such request
140     */
141    ::com::sun::star::frame::XLayoutManager getLayoutManager()
142        raises( ::com::sun::star::embed::WrongStateException );
143
144    //------------------------------------------------------------------------
145    /** allows to retrieve the container's dispatch provider.
146
147        @return
148            reference to object implementing the
149            <type scope="com::sun::star::frame">XDispatchProvider</type>
150
151        @throws com::sun::star::embed::WrongStateException
152            the object is in unexpected state to make such request
153     */
154    ::com::sun::star::frame::XDispatchProvider getInplaceDispatchProvider()
155        raises( ::com::sun::star::embed::WrongStateException );
156
157    //------------------------------------------------------------------------
158    /** gets the inplace object position rectangle.
159
160        <p>
161        The rectangle is provided in object's parent window coordinates in
162        pixels. The intersection of position and clip rectangles specifies
163        the visible part of the object. In case the position window has a size
164        that is bigger than object's size, the object should either scale or
165        deactivate.
166        </p>
167
168        @return
169            specifies a new position rectangle
170
171        @throws com::sun::star::embed::WrongStateException
172            the object is in unexpected state to make such request
173     */
174    ::com::sun::star::awt::Rectangle getPlacement()
175        raises( ::com::sun::star::embed::WrongStateException );
176
177    //------------------------------------------------------------------------
178    /** gets the inplace object clip rectangle.
179
180        <p>
181        The rectangle is provided in object's parent window coordinates in
182        pixels. The intersection of position and clip rectangles specifies
183        the visible part of the object.
184        </p>
185
186        @return
187            specifies a new clip rectangle
188
189        @throws com::sun::star::embed::WrongStateException
190            the object is in unexpected state to make such request
191     */
192    ::com::sun::star::awt::Rectangle getClipRectangle()
193        raises( ::com::sun::star::embed::WrongStateException );
194
195    //------------------------------------------------------------------------
196    /** provides accelerator table the object whants to use while it is
197        inplace active.
198
199        @param aKeys
200            an accelerator table from object
201
202        @throws com::sun::star::embed::WrongStateException
203            the object is in unexpected state
204    */
205    void translateAccelerators( [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys )
206        raises( ::com::sun::star::embed::WrongStateException );
207
208    //------------------------------------------------------------------------
209    /** scrolls the object.
210
211        @param aOffset
212            scrolls the object to specified offset in pixels
213
214        @throws com::sun::star::embed::WrongStateException
215            the object is in unexpected state
216     */
217    void scrollObject( [in] ::com::sun::star::awt::Size aOffset )
218        raises( ::com::sun::star::embed::WrongStateException );
219
220    //------------------------------------------------------------------------
221    /** notifies the container that the position of the object is changed.
222
223        @param aPosRect
224            specifies a new position rectangle
225
226        @throws com::sun::star::embed::WrongStateException
227            the object state is not correct
228
229        @throws com::sun::star::uno::Exception
230            in case of other problems
231     */
232    void changedPlacement( [in] ::com::sun::star::awt::Rectangle aPosRect )
233        raises( ::com::sun::star::embed::WrongStateException,
234                ::com::sun::star::uno::Exception );
235};
236
237//============================================================================
238
239}; }; }; };
240
241#endif
242
243