Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / XInplaceClient.idl
blobc0f92682b42331d6d8e741a1cef7e52f2da6c1cf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_embed_XInplaceClient_idl__
20 #define __com_sun_star_embed_XInplaceClient_idl__
22 #include <com/sun/star/uno/XInterface.idl>
23 #include <com/sun/star/container/XIndexAccess.idl>
24 #include <com/sun/star/frame/XDispatchProvider.idl>
25 #include <com/sun/star/frame/XLayoutManager.idl>
26 #include <com/sun/star/awt/XWindow.idl>
27 #include <com/sun/star/awt/Rectangle.idl>
28 #include <com/sun/star/awt/Size.idl>
29 #include <com/sun/star/awt/KeyEvent.idl>
30 #include <com/sun/star/embed/WrongStateException.idl>
34 module com { module sun { module star { module embed {
36 /** represents common functionality for inplace clients.
38 interface XInplaceClient: com::sun::star::uno::XInterface
40 /** checks if the container can activate the object inplace.
42 @return
43 `TRUE` the container can activate the object inplace.
44 `FALSE` otherwise.
46 boolean canInplaceActivate();
48 /** notifies container through the client that the object is to be
49 inplace activated.
51 @throws com::sun::star::embed::WrongStateException
52 the container is not ready for activation
54 void activatingInplace()
55 raises( ::com::sun::star::embed::WrongStateException );
57 /** notifies container through the client that the object is to be
58 UI-activated.
60 @throws com::sun::star::embed::WrongStateException
61 the container is not ready for activation
63 void activatingUI()
64 raises( ::com::sun::star::embed::WrongStateException );
66 /** notifies container through the client that the object is deactivated.
68 @throws com::sun::star::embed::WrongStateException
69 the container is not ready for deactivation
71 void deactivatedInplace()
72 raises( ::com::sun::star::embed::WrongStateException );
74 /** notifies container through the client that the object is
75 UI-deactivated.
77 <p>
78 After this notification the container can restore it's own UI and take focus.
79 </p>
81 @throws com::sun::star::embed::WrongStateException
82 the container is not ready for deactivation
84 void deactivatedUI()
85 raises( ::com::sun::star::embed::WrongStateException );
87 /** allows to retrieve the
88 com::sun::star::frame::LayoutManager of the
89 container.
91 @return
92 reference to object representing the
93 com::sun::star::frame::LayoutManager of the
94 container
96 @throws com::sun::star::embed::WrongStateException
97 the object is in unexpected state to make such request
99 ::com::sun::star::frame::XLayoutManager getLayoutManager()
100 raises( ::com::sun::star::embed::WrongStateException );
102 /** allows to retrieve the container's dispatch provider.
104 @return
105 reference to object implementing the
106 com::sun::star::frame::XDispatchProvider
108 @throws com::sun::star::embed::WrongStateException
109 the object is in unexpected state to make such request
111 ::com::sun::star::frame::XDispatchProvider getInplaceDispatchProvider()
112 raises( ::com::sun::star::embed::WrongStateException );
114 /** gets the inplace object position rectangle.
117 The rectangle is provided in object's parent window coordinates in
118 pixels. The intersection of position and clip rectangles specifies
119 the visible part of the object. In case the position window has a size
120 that is bigger than object's size, the object should either scale or
121 deactivate.
122 </p>
124 @return
125 specifies a new position rectangle
127 @throws com::sun::star::embed::WrongStateException
128 the object is in unexpected state to make such request
130 ::com::sun::star::awt::Rectangle getPlacement()
131 raises( ::com::sun::star::embed::WrongStateException );
133 /** gets the inplace object clip rectangle.
136 The rectangle is provided in object's parent window coordinates in
137 pixels. The intersection of position and clip rectangles specifies
138 the visible part of the object.
139 </p>
141 @return
142 specifies a new clip rectangle
144 @throws com::sun::star::embed::WrongStateException
145 the object is in unexpected state to make such request
147 ::com::sun::star::awt::Rectangle getClipRectangle()
148 raises( ::com::sun::star::embed::WrongStateException );
150 /** provides accelerator table the object wants to use while it is
151 inplace active.
153 @param aKeys
154 an accelerator table from object
156 @throws com::sun::star::embed::WrongStateException
157 the object is in unexpected state
159 void translateAccelerators( [in] sequence< ::com::sun::star::awt::KeyEvent > aKeys )
160 raises( ::com::sun::star::embed::WrongStateException );
162 /** scrolls the object.
164 @param aOffset
165 scrolls the object to specified offset in pixels
167 @throws com::sun::star::embed::WrongStateException
168 the object is in unexpected state
170 void scrollObject( [in] ::com::sun::star::awt::Size aOffset )
171 raises( ::com::sun::star::embed::WrongStateException );
173 /** notifies the container that the position of the object is changed.
175 @param aPosRect
176 specifies a new position rectangle
178 @throws com::sun::star::embed::WrongStateException
179 the object state is not correct
181 @throws com::sun::star::uno::Exception
182 in case of other problems
184 void changedPlacement( [in] ::com::sun::star::awt::Rectangle aPosRect )
185 raises( ::com::sun::star::embed::WrongStateException,
186 ::com::sun::star::uno::Exception );
190 }; }; }; };
192 #endif
194 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */