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