1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_embed_XInplaceClient_idl__
24cdf0e10cSrcweir#define __com_sun_star_embed_XInplaceClient_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_container_XIndexAccess_idl__
31cdf0e10cSrcweir#include <com/sun/star/container/XIndexAccess.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDispatchProvider_idl__
35cdf0e10cSrcweir#include <com/sun/star/frame/XDispatchProvider.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_frame_XLayoutManager_idl__
39cdf0e10cSrcweir#include <com/sun/star/frame/XLayoutManager.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_awt_XWindow_idl__
43cdf0e10cSrcweir#include <com/sun/star/awt/XWindow.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir#ifndef __com_sun_star_awt_Rectangle_idl__
47cdf0e10cSrcweir#include <com/sun/star/awt/Rectangle.idl>
48cdf0e10cSrcweir#endif
49cdf0e10cSrcweir
50cdf0e10cSrcweir#ifndef __com_sun_star_awt_Size_idl__
51cdf0e10cSrcweir#include <com/sun/star/awt/Size.idl>
52cdf0e10cSrcweir#endif
53cdf0e10cSrcweir
54cdf0e10cSrcweir#ifndef __com_sun_star_awt_KeyEvent_idl__
55cdf0e10cSrcweir#include <com/sun/star/awt/KeyEvent.idl>
56cdf0e10cSrcweir#endif
57cdf0e10cSrcweir
58cdf0e10cSrcweir#ifndef __com_sun_star_embed_WrongStateException_idl__
59cdf0e10cSrcweir#include <com/sun/star/embed/WrongStateException.idl>
60cdf0e10cSrcweir#endif
61cdf0e10cSrcweir
62cdf0e10cSrcweir
63cdf0e10cSrcweir//============================================================================
64cdf0e10cSrcweir
65cdf0e10cSrcweir module com {  module sun {  module star {  module embed {
66cdf0e10cSrcweir
67cdf0e10cSrcweir//============================================================================
68cdf0e10cSrcweir/** represents common functionality for inplace clients.
69cdf0e10cSrcweir */
70cdf0e10cSrcweirinterface XInplaceClient: com::sun::star::uno::XInterface
71cdf0e10cSrcweir{
72cdf0e10cSrcweir	//------------------------------------------------------------------------
73cdf0e10cSrcweir    /** checks if the container can activate the object inplace.
74cdf0e10cSrcweir
75cdf0e10cSrcweir		@return
76cdf0e10cSrcweir			<TRUE/> the container can activate the object inplace.
77cdf0e10cSrcweir			<FALSE/> otherwise.
78cdf0e10cSrcweir	 */
79cdf0e10cSrcweir	boolean canInplaceActivate();
80cdf0e10cSrcweir
81cdf0e10cSrcweir	//------------------------------------------------------------------------
82cdf0e10cSrcweir    /** notifies container through the client that the object is to be
83cdf0e10cSrcweir		inplace activated.
84cdf0e10cSrcweir
85cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
86cdf0e10cSrcweir			the container is not ready for activation
87cdf0e10cSrcweir	 */
88cdf0e10cSrcweir	void activatingInplace()
89cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
90cdf0e10cSrcweir
91cdf0e10cSrcweir	//------------------------------------------------------------------------
92cdf0e10cSrcweir    /** notifies container through the client that the object is to be
93cdf0e10cSrcweir		UI-activated.
94cdf0e10cSrcweir
95cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
96cdf0e10cSrcweir			the container is not ready for activation
97cdf0e10cSrcweir	 */
98cdf0e10cSrcweir	void activatingUI()
99cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
100cdf0e10cSrcweir
101cdf0e10cSrcweir	//------------------------------------------------------------------------
102cdf0e10cSrcweir    /** notifies container through the client that the object is deactivated.
103cdf0e10cSrcweir
104cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
105cdf0e10cSrcweir			the container is not ready for deactivation
106cdf0e10cSrcweir	 */
107cdf0e10cSrcweir	void deactivatedInplace()
108cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
109cdf0e10cSrcweir
110cdf0e10cSrcweir	//------------------------------------------------------------------------
111cdf0e10cSrcweir    /** notifies container through the client that the object is
112cdf0e10cSrcweir		UI-deactivated.
113cdf0e10cSrcweir
114cdf0e10cSrcweir		<p>
115cdf0e10cSrcweir		After this notification the container can restore it's own UI and take focus.
116cdf0e10cSrcweir		</p>
117cdf0e10cSrcweir
118cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
119cdf0e10cSrcweir			the container is not ready for deactivation
120cdf0e10cSrcweir	 */
121cdf0e10cSrcweir	void deactivatedUI()
122cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
123cdf0e10cSrcweir
124cdf0e10cSrcweir	//------------------------------------------------------------------------
125cdf0e10cSrcweir	/** allows to retrieve the
126cdf0e10cSrcweir		<type scope="com::sun::star::frame">LayoutManager</type> of the
127cdf0e10cSrcweir		container.
128cdf0e10cSrcweir
129cdf0e10cSrcweir		@return
130cdf0e10cSrcweir			reference to object representing the
131cdf0e10cSrcweir			<type scope="com::sun::star::frame">LayoutManager</type> of the
132cdf0e10cSrcweir			container
133cdf0e10cSrcweir
134cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
135cdf0e10cSrcweir		    the object is in unexpected state to make such request
136cdf0e10cSrcweir	 */
137cdf0e10cSrcweir	::com::sun::star::frame::XLayoutManager getLayoutManager()
138cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
139cdf0e10cSrcweir
140cdf0e10cSrcweir	//------------------------------------------------------------------------
141cdf0e10cSrcweir	/** allows to retrieve the container's dispatch provider.
142cdf0e10cSrcweir
143cdf0e10cSrcweir		@return
144cdf0e10cSrcweir			reference to object implementing the
145cdf0e10cSrcweir			<type scope="com::sun::star::frame">XDispatchProvider</type>
146cdf0e10cSrcweir
147cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
148cdf0e10cSrcweir		    the object is in unexpected state to make such request
149cdf0e10cSrcweir	 */
150cdf0e10cSrcweir	::com::sun::star::frame::XDispatchProvider getInplaceDispatchProvider()
151cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
152cdf0e10cSrcweir
153cdf0e10cSrcweir	//------------------------------------------------------------------------
154cdf0e10cSrcweir    /** gets the inplace object position rectangle.
155cdf0e10cSrcweir
156cdf0e10cSrcweir		<p>
157cdf0e10cSrcweir		The rectangle is provided in object's parent window coordinates in
158cdf0e10cSrcweir		pixels. The intersection of position and clip rectangles specifies
159cdf0e10cSrcweir		the visible part of the object. In case the position window has a size
160cdf0e10cSrcweir		that is bigger than object's size, the object should either scale or
161cdf0e10cSrcweir		deactivate.
162cdf0e10cSrcweir		</p>
163cdf0e10cSrcweir
164cdf0e10cSrcweir        @return
165cdf0e10cSrcweir			specifies a new position rectangle
166cdf0e10cSrcweir
167cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
168cdf0e10cSrcweir		    the object is in unexpected state to make such request
169cdf0e10cSrcweir	 */
170cdf0e10cSrcweir	::com::sun::star::awt::Rectangle getPlacement()
171cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
172cdf0e10cSrcweir
173cdf0e10cSrcweir	//------------------------------------------------------------------------
174cdf0e10cSrcweir    /** gets the inplace object clip rectangle.
175cdf0e10cSrcweir
176cdf0e10cSrcweir		<p>
177cdf0e10cSrcweir		The rectangle is provided in object's parent window coordinates in
178cdf0e10cSrcweir		pixels. The intersection of position and clip rectangles specifies
179cdf0e10cSrcweir		the visible part of the object.
180cdf0e10cSrcweir		</p>
181cdf0e10cSrcweir
182cdf0e10cSrcweir		@return
183cdf0e10cSrcweir			specifies a new clip rectangle
184cdf0e10cSrcweir
185cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
186cdf0e10cSrcweir		    the object is in unexpected state to make such request
187cdf0e10cSrcweir	 */
188cdf0e10cSrcweir	::com::sun::star::awt::Rectangle getClipRectangle()
189cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
190cdf0e10cSrcweir
191cdf0e10cSrcweir	//------------------------------------------------------------------------
192cdf0e10cSrcweir	/** provides accelerator table the object whants to use while it is
193cdf0e10cSrcweir		inplace active.
194cdf0e10cSrcweir
195cdf0e10cSrcweir		@param aKeys
196cdf0e10cSrcweir			an accelerator table from object
197cdf0e10cSrcweir
198cdf0e10cSrcweir		@throws com::sun::star::embed::WrongStateException
199cdf0e10cSrcweir			the object is in unexpected state
200cdf0e10cSrcweir	*/
201cdf0e10cSrcweir	void translateAccelerators( [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys )
202cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
203cdf0e10cSrcweir
204cdf0e10cSrcweir	//------------------------------------------------------------------------
205cdf0e10cSrcweir    /** scrolls the object.
206cdf0e10cSrcweir
207cdf0e10cSrcweir		@param aOffset
208cdf0e10cSrcweir			scrolls the object to specified offset in pixels
209cdf0e10cSrcweir
210cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
211cdf0e10cSrcweir		    the object is in unexpected state
212cdf0e10cSrcweir	 */
213cdf0e10cSrcweir	void scrollObject( [in] ::com::sun::star::awt::Size aOffset )
214cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException );
215cdf0e10cSrcweir
216cdf0e10cSrcweir	//------------------------------------------------------------------------
217cdf0e10cSrcweir    /** notifies the container that the position of the object is changed.
218cdf0e10cSrcweir
219cdf0e10cSrcweir        @param aPosRect
220cdf0e10cSrcweir			specifies a new position rectangle
221cdf0e10cSrcweir
222cdf0e10cSrcweir        @throws com::sun::star::embed::WrongStateException
223cdf0e10cSrcweir		    the object state is not correct
224cdf0e10cSrcweir
225cdf0e10cSrcweir        @throws com::sun::star::uno::Exception
226cdf0e10cSrcweir			in case of other problems
227cdf0e10cSrcweir	 */
228cdf0e10cSrcweir	void changedPlacement( [in] ::com::sun::star::awt::Rectangle aPosRect )
229cdf0e10cSrcweir		raises( ::com::sun::star::embed::WrongStateException,
230cdf0e10cSrcweir		        ::com::sun::star::uno::Exception );
231cdf0e10cSrcweir};
232cdf0e10cSrcweir
233cdf0e10cSrcweir//============================================================================
234cdf0e10cSrcweir
235cdf0e10cSrcweir}; }; }; };
236cdf0e10cSrcweir
237cdf0e10cSrcweir#endif
238cdf0e10cSrcweir
239