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_XVisualObject_idl__
28*cdf0e10cSrcweir#define __com_sun_star_embed_XVisualObject_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_awt_Size_idl__
35*cdf0e10cSrcweir#include <com/sun/star/awt/Size.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_embed_VisualRepresentation_idl__
39*cdf0e10cSrcweir#include <com/sun/star/embed/VisualRepresentation.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir#ifndef __com_sun_star_embed_WrongStateException_idl__
43*cdf0e10cSrcweir#include <com/sun/star/embed/WrongStateException.idl>
44*cdf0e10cSrcweir#endif
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
48*cdf0e10cSrcweir#endif
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir//=============================================================================
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir module com {  module sun {  module star {  module embed {
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir//=============================================================================
56*cdf0e10cSrcweir/** represents common visualisation functionality for embedded objects.
57*cdf0e10cSrcweir */
58*cdf0e10cSrcweirpublished interface XVisualObject: ::com::sun::star::uno::XInterface
59*cdf0e10cSrcweir{
60*cdf0e10cSrcweir	//-------------------------------------------------------------------------
61*cdf0e10cSrcweir    /** sets the size of object's visual area.
62*cdf0e10cSrcweir
63*cdf0e10cSrcweir		<p>
64*cdf0e10cSrcweir		The size must be provided in logical units according to map mode the
65*cdf0e10cSrcweir		object communicates in.
66*cdf0e10cSrcweir		</p>
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir		<p>
69*cdf0e10cSrcweir		If an object is inplace- or ui-active the method must not initiate
70*cdf0e10cSrcweir		repainting itself.
71*cdf0e10cSrcweir		</p>
72*cdf0e10cSrcweir
73*cdf0e10cSrcweir		@param nAspect
74*cdf0e10cSrcweir			the aspect specifying the form of object representation.
75*cdf0e10cSrcweir			Can take values from <type>Aspects</type> constant set.
76*cdf0e10cSrcweir
77*cdf0e10cSrcweir		@param aSize
78*cdf0e10cSrcweir			the new size of the visual area
79*cdf0e10cSrcweir
80*cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
81*cdf0e10cSrcweir			one of arguments is illegal
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir        @throws ::com::sun::star::embed::WrongStateException
84*cdf0e10cSrcweir		    the object is in wrong state
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir        @throws ::com::sun::star::uno::Exception
87*cdf0e10cSrcweir			the object failed to resize
88*cdf0e10cSrcweir	 */
89*cdf0e10cSrcweir	void setVisualAreaSize( [in] hyper nAspect,
90*cdf0e10cSrcweir						 [in] ::com::sun::star::awt::Size aSize )
91*cdf0e10cSrcweir		raises( ::com::sun::star::lang::IllegalArgumentException,
92*cdf0e10cSrcweir				::com::sun::star::embed::WrongStateException,
93*cdf0e10cSrcweir				::com::sun::star::uno::Exception );
94*cdf0e10cSrcweir
95*cdf0e10cSrcweir	//-------------------------------------------------------------------------
96*cdf0e10cSrcweir    /** gets the size of object's visual area.
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir		<p>
99*cdf0e10cSrcweir		The size must be provided in logical units according to map mode the
100*cdf0e10cSrcweir		object communicates in.
101*cdf0e10cSrcweir		</p>
102*cdf0e10cSrcweir
103*cdf0e10cSrcweir		@param nAspect
104*cdf0e10cSrcweir			the aspect specifying the form of object representation.
105*cdf0e10cSrcweir			Can take values from <type>Aspects</type> constant set.
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir		@return
108*cdf0e10cSrcweir			the size of visual area
109*cdf0e10cSrcweir
110*cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
111*cdf0e10cSrcweir			one of arguments is illegal
112*cdf0e10cSrcweir
113*cdf0e10cSrcweir        @throws ::com::sun::star::embed::WrongStateException
114*cdf0e10cSrcweir		    the object is in wrong state
115*cdf0e10cSrcweir	 */
116*cdf0e10cSrcweir	::com::sun::star::awt::Size getVisualAreaSize( [in] hyper nAspect )
117*cdf0e10cSrcweir		raises( ::com::sun::star::lang::IllegalArgumentException,
118*cdf0e10cSrcweir				::com::sun::star::embed::WrongStateException,
119*cdf0e10cSrcweir				::com::sun::star::uno::Exception );
120*cdf0e10cSrcweir
121*cdf0e10cSrcweir	//------------------------------------------------------------------------
122*cdf0e10cSrcweir    /** retrieves visual representation of the object in preferable format.
123*cdf0e10cSrcweir
124*cdf0e10cSrcweir		<p>
125*cdf0e10cSrcweir		If the object persistance entry contains cached visual representation
126*cdf0e10cSrcweir		then it can be retrieved by using this method even in loaded state.
127*cdf0e10cSrcweir		</p>
128*cdf0e10cSrcweir
129*cdf0e10cSrcweir		@param nAspect
130*cdf0e10cSrcweir			the aspect the representation is requested for.
131*cdf0e10cSrcweir			Can take values from <type>Aspects</type> constant set.
132*cdf0e10cSrcweir
133*cdf0e10cSrcweir		@return
134*cdf0e10cSrcweir			the visual representation of the object in the default format and
135*cdf0e10cSrcweir			the format
136*cdf0e10cSrcweir
137*cdf0e10cSrcweir		@throws ::com::sun::star::lang::IllegalArgumentException
138*cdf0e10cSrcweir			one of arguments is illegal
139*cdf0e10cSrcweir
140*cdf0e10cSrcweir        @throws ::com::sun::star::embed::WrongStateException
141*cdf0e10cSrcweir		    the object is in wrong state
142*cdf0e10cSrcweir
143*cdf0e10cSrcweir        @throws ::com::sun::star::uno::Exception
144*cdf0e10cSrcweir			in case of problems
145*cdf0e10cSrcweir
146*cdf0e10cSrcweir	 */
147*cdf0e10cSrcweir	VisualRepresentation getPreferredVisualRepresentation( [in] hyper nAspect )
148*cdf0e10cSrcweir		raises( ::com::sun::star::lang::IllegalArgumentException,
149*cdf0e10cSrcweir				::com::sun::star::embed::WrongStateException,
150*cdf0e10cSrcweir				::com::sun::star::uno::Exception );
151*cdf0e10cSrcweir
152*cdf0e10cSrcweir
153*cdf0e10cSrcweir	//-------------------------------------------------------------------------
154*cdf0e10cSrcweir    /** retrieves map mode the object communicates in.
155*cdf0e10cSrcweir
156*cdf0e10cSrcweir		@param nAspect
157*cdf0e10cSrcweir			the aspect the map mode is requested for.
158*cdf0e10cSrcweir			Can take values from <type>Aspects</type> constant set.
159*cdf0e10cSrcweir
160*cdf0e10cSrcweir		@return
161*cdf0e10cSrcweir			the map mode the object communicates in, it can take values from
162*cdf0e10cSrcweir            <type>EmbedMapUnits</type> constant
163*cdf0e10cSrcweir
164*cdf0e10cSrcweir        @throws ::com::sun::star::embed::WrongStateException
165*cdf0e10cSrcweir		    the object is in wrong state
166*cdf0e10cSrcweir
167*cdf0e10cSrcweir        @throws ::com::sun::star::uno::Exception
168*cdf0e10cSrcweir			in case of problems
169*cdf0e10cSrcweir	 */
170*cdf0e10cSrcweir    long getMapUnit( [in] hyper nAspect )
171*cdf0e10cSrcweir		raises( ::com::sun::star::uno::Exception );
172*cdf0e10cSrcweir};
173*cdf0e10cSrcweir
174*cdf0e10cSrcweir//=============================================================================
175*cdf0e10cSrcweir
176*cdf0e10cSrcweir}; }; }; };
177*cdf0e10cSrcweir
178*cdf0e10cSrcweir#endif
179*cdf0e10cSrcweir
180