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