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