Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / XVisualObject.idl
blob81536a92bb7c9768b5821a84ab96a72e72891039
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_XVisualObject_idl__
20 #define __com_sun_star_embed_XVisualObject_idl__
22 #include <com/sun/star/uno/XInterface.idl>
23 #include <com/sun/star/awt/Size.idl>
24 #include <com/sun/star/embed/VisualRepresentation.idl>
25 #include <com/sun/star/embed/WrongStateException.idl>
26 #include <com/sun/star/lang/IllegalArgumentException.idl>
30 module com { module sun { module star { module embed {
32 /** represents common visualization functionality for embedded objects.
34 published interface XVisualObject: ::com::sun::star::uno::XInterface
36 /** sets the size of object's visual area.
38 <p>
39 The size must be provided in logical units according to map mode the
40 object communicates in.
41 </p>
43 <p>
44 If an object is inplace- or ui-active the method must not initiate
45 repainting itself.
46 </p>
48 @param nAspect
49 the aspect specifying the form of object representation.
50 Can take values from Aspects constant set.
52 @param aSize
53 the new size of the visual area
55 @throws ::com::sun::star::lang::IllegalArgumentException
56 one of arguments is illegal
58 @throws ::com::sun::star::embed::WrongStateException
59 the object is in wrong state
61 @throws ::com::sun::star::uno::Exception
62 the object failed to resize
64 void setVisualAreaSize( [in] hyper nAspect,
65 [in] ::com::sun::star::awt::Size aSize )
66 raises( ::com::sun::star::lang::IllegalArgumentException,
67 ::com::sun::star::embed::WrongStateException,
68 ::com::sun::star::uno::Exception );
70 /** gets the size of object's visual area.
72 <p>
73 The size must be provided in logical units according to map mode the
74 object communicates in.
75 </p>
77 @param nAspect
78 the aspect specifying the form of object representation.
79 Can take values from Aspects constant set.
81 @return
82 the size of visual area
84 @throws ::com::sun::star::lang::IllegalArgumentException
85 one of arguments is illegal
87 @throws ::com::sun::star::embed::WrongStateException
88 the object is in wrong state
90 ::com::sun::star::awt::Size getVisualAreaSize( [in] hyper nAspect )
91 raises( ::com::sun::star::lang::IllegalArgumentException,
92 ::com::sun::star::embed::WrongStateException,
93 ::com::sun::star::uno::Exception );
95 /** retrieves visual representation of the object in preferable format.
97 <p>
98 If the object persistence entry contains cached visual representation
99 then it can be retrieved by using this method even in loaded state.
100 </p>
102 @param nAspect
103 the aspect the representation is requested for.
104 Can take values from Aspects constant set.
106 @return
107 the visual representation of the object in the default format and
108 the format
110 @throws ::com::sun::star::lang::IllegalArgumentException
111 one of arguments is illegal
113 @throws ::com::sun::star::embed::WrongStateException
114 the object is in wrong state
116 @throws ::com::sun::star::uno::Exception
117 in case of problems
120 VisualRepresentation getPreferredVisualRepresentation( [in] hyper nAspect )
121 raises( ::com::sun::star::lang::IllegalArgumentException,
122 ::com::sun::star::embed::WrongStateException,
123 ::com::sun::star::uno::Exception );
126 /** retrieves map mode the object communicates in.
128 @param nAspect
129 the aspect the map mode is requested for.
130 Can take values from Aspects constant set.
132 @return
133 the map mode the object communicates in, it can take values from
134 EmbedMapUnits constant
136 @throws ::com::sun::star::embed::WrongStateException
137 the object is in wrong state
139 @throws ::com::sun::star::uno::Exception
140 in case of problems
142 long getMapUnit( [in] hyper nAspect )
143 raises( ::com::sun::star::uno::Exception );
147 }; }; }; };
149 #endif
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */