merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / embed / XInplaceClient.idl
blobb4edc9794c7eac92c2ee83c293e50d3185aab4fc
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_embed_XInplaceClient_idl__
28 #define __com_sun_star_embed_XInplaceClient_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_container_XIndexAccess_idl__
35 #include <com/sun/star/container/XIndexAccess.idl>
36 #endif
38 #ifndef __com_sun_star_frame_XDispatchProvider_idl__
39 #include <com/sun/star/frame/XDispatchProvider.idl>
40 #endif
42 #ifndef __com_sun_star_frame_XLayoutManager_idl__
43 #include <com/sun/star/frame/XLayoutManager.idl>
44 #endif
46 #ifndef __com_sun_star_awt_XWindow_idl__
47 #include <com/sun/star/awt/XWindow.idl>
48 #endif
50 #ifndef __com_sun_star_awt_Rectangle_idl__
51 #include <com/sun/star/awt/Rectangle.idl>
52 #endif
54 #ifndef __com_sun_star_awt_Size_idl__
55 #include <com/sun/star/awt/Size.idl>
56 #endif
58 #ifndef __com_sun_star_awt_KeyEvent_idl__
59 #include <com/sun/star/awt/KeyEvent.idl>
60 #endif
62 #ifndef __com_sun_star_embed_WrongStateException_idl__
63 #include <com/sun/star/embed/WrongStateException.idl>
64 #endif
67 //============================================================================
69 module com { module sun { module star { module embed {
71 //============================================================================
72 /** represents common functionality for inplace clients.
74 interface XInplaceClient: com::sun::star::uno::XInterface
76 //------------------------------------------------------------------------
77 /** checks if the container can activate the object inplace.
79 @return
80 <TRUE/> the container can activate the object inplace.
81 <FALSE/> otherwise.
83 boolean canInplaceActivate();
85 //------------------------------------------------------------------------
86 /** notifies container through the client that the object is to be
87 inplace activated.
89 @throws com::sun::star::embed::WrongStateException
90 the container is not ready for activation
92 void activatingInplace()
93 raises( ::com::sun::star::embed::WrongStateException );
95 //------------------------------------------------------------------------
96 /** notifies container through the client that the object is to be
97 UI-activated.
99 @throws com::sun::star::embed::WrongStateException
100 the container is not ready for activation
102 void activatingUI()
103 raises( ::com::sun::star::embed::WrongStateException );
105 //------------------------------------------------------------------------
106 /** notifies container through the client that the object is deactivated.
108 @throws com::sun::star::embed::WrongStateException
109 the container is not ready for deactivation
111 void deactivatedInplace()
112 raises( ::com::sun::star::embed::WrongStateException );
114 //------------------------------------------------------------------------
115 /** notifies container through the client that the object is
116 UI-deactivated.
119 After this notification the container can restore it's own UI and take focus.
120 </p>
122 @throws com::sun::star::embed::WrongStateException
123 the container is not ready for deactivation
125 void deactivatedUI()
126 raises( ::com::sun::star::embed::WrongStateException );
128 //------------------------------------------------------------------------
129 /** allows to retrieve the
130 <type scope="com::sun::star::frame">LayoutManager</type> of the
131 container.
133 @return
134 reference to object representing the
135 <type scope="com::sun::star::frame">LayoutManager</type> of the
136 container
138 @throws com::sun::star::embed::WrongStateException
139 the object is in unexpected state to make such request
141 ::com::sun::star::frame::XLayoutManager getLayoutManager()
142 raises( ::com::sun::star::embed::WrongStateException );
144 //------------------------------------------------------------------------
145 /** allows to retrieve the container's dispatch provider.
147 @return
148 reference to object implementing the
149 <type scope="com::sun::star::frame">XDispatchProvider</type>
151 @throws com::sun::star::embed::WrongStateException
152 the object is in unexpected state to make such request
154 ::com::sun::star::frame::XDispatchProvider getInplaceDispatchProvider()
155 raises( ::com::sun::star::embed::WrongStateException );
157 //------------------------------------------------------------------------
158 /** gets the inplace object position rectangle.
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>
168 @return
169 specifies a new position rectangle
171 @throws com::sun::star::embed::WrongStateException
172 the object is in unexpected state to make such request
174 ::com::sun::star::awt::Rectangle getPlacement()
175 raises( ::com::sun::star::embed::WrongStateException );
177 //------------------------------------------------------------------------
178 /** gets the inplace object clip rectangle.
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>
186 @return
187 specifies a new clip rectangle
189 @throws com::sun::star::embed::WrongStateException
190 the object is in unexpected state to make such request
192 ::com::sun::star::awt::Rectangle getClipRectangle()
193 raises( ::com::sun::star::embed::WrongStateException );
195 //------------------------------------------------------------------------
196 /** provides accelerator table the object whants to use while it is
197 inplace active.
199 @param aKeys
200 an accelerator table from object
202 @throws com::sun::star::embed::WrongStateException
203 the object is in unexpected state
205 void translateAccelerators( [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys )
206 raises( ::com::sun::star::embed::WrongStateException );
208 //------------------------------------------------------------------------
209 /** scrolls the object.
211 @param aOffset
212 scrolls the object to specified offset in pixels
214 @throws com::sun::star::embed::WrongStateException
215 the object is in unexpected state
217 void scrollObject( [in] ::com::sun::star::awt::Size aOffset )
218 raises( ::com::sun::star::embed::WrongStateException );
220 //------------------------------------------------------------------------
221 /** notifies the container that the position of the object is changed.
223 @param aPosRect
224 specifies a new position rectangle
226 @throws com::sun::star::embed::WrongStateException
227 the object state is not correct
229 @throws com::sun::star::uno::Exception
230 in case of other problems
232 void changedPlacement( [in] ::com::sun::star::awt::Rectangle aPosRect )
233 raises( ::com::sun::star::embed::WrongStateException,
234 ::com::sun::star::uno::Exception );
237 //============================================================================
239 }; }; }; };
241 #endif