Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / embed / XInplaceClient.idl
blob8dcdebb2927199429cc58c460b05ff474b222b9d
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: XInplaceClient.idl,v $
10 * $Revision: 1.7 $
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 __com_sun_star_embed_XInplaceClient_idl__
31 #define __com_sun_star_embed_XInplaceClient_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_container_XIndexAccess_idl__
38 #include <com/sun/star/container/XIndexAccess.idl>
39 #endif
41 #ifndef __com_sun_star_frame_XDispatchProvider_idl__
42 #include <com/sun/star/frame/XDispatchProvider.idl>
43 #endif
45 #ifndef __com_sun_star_frame_XLayoutManager_idl__
46 #include <com/sun/star/frame/XLayoutManager.idl>
47 #endif
49 #ifndef __com_sun_star_awt_XWindow_idl__
50 #include <com/sun/star/awt/XWindow.idl>
51 #endif
53 #ifndef __com_sun_star_awt_Rectangle_idl__
54 #include <com/sun/star/awt/Rectangle.idl>
55 #endif
57 #ifndef __com_sun_star_awt_Size_idl__
58 #include <com/sun/star/awt/Size.idl>
59 #endif
61 #ifndef __com_sun_star_awt_KeyEvent_idl__
62 #include <com/sun/star/awt/KeyEvent.idl>
63 #endif
65 #ifndef __com_sun_star_embed_WrongStateException_idl__
66 #include <com/sun/star/embed/WrongStateException.idl>
67 #endif
70 //============================================================================
72 module com { module sun { module star { module embed {
74 //============================================================================
75 /** represents common functionality for inplace clients.
77 interface XInplaceClient: com::sun::star::uno::XInterface
79 //------------------------------------------------------------------------
80 /** checks if the container can activate the object inplace.
82 @return
83 <TRUE/> the container can activate the object inplace.
84 <FALSE/> otherwise.
86 boolean canInplaceActivate();
88 //------------------------------------------------------------------------
89 /** notifies container through the client that the object is to be
90 inplace activated.
92 @throws com::sun::star::embed::WrongStateException
93 the container is not ready for activation
95 void activatingInplace()
96 raises( ::com::sun::star::embed::WrongStateException );
98 //------------------------------------------------------------------------
99 /** notifies container through the client that the object is to be
100 UI-activated.
102 @throws com::sun::star::embed::WrongStateException
103 the container is not ready for activation
105 void activatingUI()
106 raises( ::com::sun::star::embed::WrongStateException );
108 //------------------------------------------------------------------------
109 /** notifies container through the client that the object is deactivated.
111 @throws com::sun::star::embed::WrongStateException
112 the container is not ready for deactivation
114 void deactivatedInplace()
115 raises( ::com::sun::star::embed::WrongStateException );
117 //------------------------------------------------------------------------
118 /** notifies container through the client that the object is
119 UI-deactivated.
122 After this notification the container can restore it's own UI and take focus.
123 </p>
125 @throws com::sun::star::embed::WrongStateException
126 the container is not ready for deactivation
128 void deactivatedUI()
129 raises( ::com::sun::star::embed::WrongStateException );
131 //------------------------------------------------------------------------
132 /** allows to retrieve the
133 <type scope="com::sun::star::frame">LayoutManager</type> of the
134 container.
136 @return
137 reference to object representing the
138 <type scope="com::sun::star::frame">LayoutManager</type> of the
139 container
141 @throws com::sun::star::embed::WrongStateException
142 the object is in unexpected state to make such request
144 ::com::sun::star::frame::XLayoutManager getLayoutManager()
145 raises( ::com::sun::star::embed::WrongStateException );
147 //------------------------------------------------------------------------
148 /** allows to retrieve the container's dispatch provider.
150 @return
151 reference to object implementing the
152 <type scope="com::sun::star::frame">XDispatchProvider</type>
154 @throws com::sun::star::embed::WrongStateException
155 the object is in unexpected state to make such request
157 ::com::sun::star::frame::XDispatchProvider getInplaceDispatchProvider()
158 raises( ::com::sun::star::embed::WrongStateException );
160 //------------------------------------------------------------------------
161 /** gets the inplace object position rectangle.
164 The rectangle is provided in object's parent window coordinates in
165 pixels. The intersection of position and clip rectangles specifies
166 the visible part of the object. In case the position window has a size
167 that is bigger than object's size, the object should either scale or
168 deactivate.
169 </p>
171 @return
172 specifies a new position rectangle
174 @throws com::sun::star::embed::WrongStateException
175 the object is in unexpected state to make such request
177 ::com::sun::star::awt::Rectangle getPlacement()
178 raises( ::com::sun::star::embed::WrongStateException );
180 //------------------------------------------------------------------------
181 /** gets the inplace object clip rectangle.
184 The rectangle is provided in object's parent window coordinates in
185 pixels. The intersection of position and clip rectangles specifies
186 the visible part of the object.
187 </p>
189 @return
190 specifies a new clip rectangle
192 @throws com::sun::star::embed::WrongStateException
193 the object is in unexpected state to make such request
195 ::com::sun::star::awt::Rectangle getClipRectangle()
196 raises( ::com::sun::star::embed::WrongStateException );
198 //------------------------------------------------------------------------
199 /** provides accelerator table the object whants to use while it is
200 inplace active.
202 @param aKeys
203 an accelerator table from object
205 @throws com::sun::star::embed::WrongStateException
206 the object is in unexpected state
208 void translateAccelerators( [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys )
209 raises( ::com::sun::star::embed::WrongStateException );
211 //------------------------------------------------------------------------
212 /** scrolls the object.
214 @param aOffset
215 scrolls the object to specified offset in pixels
217 @throws com::sun::star::embed::WrongStateException
218 the object is in unexpected state
220 void scrollObject( [in] ::com::sun::star::awt::Size aOffset )
221 raises( ::com::sun::star::embed::WrongStateException );
223 //------------------------------------------------------------------------
224 /** notifies the container that the position of the object is changed.
226 @param aPosRect
227 specifies a new position rectangle
229 @throws com::sun::star::embed::WrongStateException
230 the object state is not correct
232 @throws com::sun::star::uno::Exception
233 in case of other problems
235 void changedPlacement( [in] ::com::sun::star::awt::Rectangle aPosRect )
236 raises( ::com::sun::star::embed::WrongStateException,
237 ::com::sun::star::uno::Exception );
240 //============================================================================
242 }; }; }; };
244 #endif