1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_embed_XVisualObject_idl__ 28#define __com_sun_star_embed_XVisualObject_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_awt_Size_idl__ 35#include <com/sun/star/awt/Size.idl> 36#endif 37 38#ifndef __com_sun_star_embed_VisualRepresentation_idl__ 39#include <com/sun/star/embed/VisualRepresentation.idl> 40#endif 41 42#ifndef __com_sun_star_embed_WrongStateException_idl__ 43#include <com/sun/star/embed/WrongStateException.idl> 44#endif 45 46#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 47#include <com/sun/star/lang/IllegalArgumentException.idl> 48#endif 49 50 51//============================================================================= 52 53 module com { module sun { module star { module embed { 54 55//============================================================================= 56/** represents common visualisation functionality for embedded objects. 57 */ 58published interface XVisualObject: ::com::sun::star::uno::XInterface 59{ 60 //------------------------------------------------------------------------- 61 /** sets the size of object's visual area. 62 63 <p> 64 The size must be provided in logical units according to map mode the 65 object communicates in. 66 </p> 67 68 <p> 69 If an object is inplace- or ui-active the method must not initiate 70 repainting itself. 71 </p> 72 73 @param nAspect 74 the aspect specifying the form of object representation. 75 Can take values from <type>Aspects</type> constant set. 76 77 @param aSize 78 the new size of the visual area 79 80 @throws ::com::sun::star::lang::IllegalArgumentException 81 one of arguments is illegal 82 83 @throws ::com::sun::star::embed::WrongStateException 84 the object is in wrong state 85 86 @throws ::com::sun::star::uno::Exception 87 the object failed to resize 88 */ 89 void setVisualAreaSize( [in] hyper nAspect, 90 [in] ::com::sun::star::awt::Size aSize ) 91 raises( ::com::sun::star::lang::IllegalArgumentException, 92 ::com::sun::star::embed::WrongStateException, 93 ::com::sun::star::uno::Exception ); 94 95 //------------------------------------------------------------------------- 96 /** gets the size of object's visual area. 97 98 <p> 99 The size must be provided in logical units according to map mode the 100 object communicates in. 101 </p> 102 103 @param nAspect 104 the aspect specifying the form of object representation. 105 Can take values from <type>Aspects</type> constant set. 106 107 @return 108 the size of visual area 109 110 @throws ::com::sun::star::lang::IllegalArgumentException 111 one of arguments is illegal 112 113 @throws ::com::sun::star::embed::WrongStateException 114 the object is in wrong state 115 */ 116 ::com::sun::star::awt::Size getVisualAreaSize( [in] hyper nAspect ) 117 raises( ::com::sun::star::lang::IllegalArgumentException, 118 ::com::sun::star::embed::WrongStateException, 119 ::com::sun::star::uno::Exception ); 120 121 //------------------------------------------------------------------------ 122 /** retrieves visual representation of the object in preferable format. 123 124 <p> 125 If the object persistance entry contains cached visual representation 126 then it can be retrieved by using this method even in loaded state. 127 </p> 128 129 @param nAspect 130 the aspect the representation is requested for. 131 Can take values from <type>Aspects</type> constant set. 132 133 @return 134 the visual representation of the object in the default format and 135 the format 136 137 @throws ::com::sun::star::lang::IllegalArgumentException 138 one of arguments is illegal 139 140 @throws ::com::sun::star::embed::WrongStateException 141 the object is in wrong state 142 143 @throws ::com::sun::star::uno::Exception 144 in case of problems 145 146 */ 147 VisualRepresentation getPreferredVisualRepresentation( [in] hyper nAspect ) 148 raises( ::com::sun::star::lang::IllegalArgumentException, 149 ::com::sun::star::embed::WrongStateException, 150 ::com::sun::star::uno::Exception ); 151 152 153 //------------------------------------------------------------------------- 154 /** retrieves map mode the object communicates in. 155 156 @param nAspect 157 the aspect the map mode is requested for. 158 Can take values from <type>Aspects</type> constant set. 159 160 @return 161 the map mode the object communicates in, it can take values from 162 <type>EmbedMapUnits</type> constant 163 164 @throws ::com::sun::star::embed::WrongStateException 165 the object is in wrong state 166 167 @throws ::com::sun::star::uno::Exception 168 in case of problems 169 */ 170 long getMapUnit( [in] hyper nAspect ) 171 raises( ::com::sun::star::uno::Exception ); 172}; 173 174//============================================================================= 175 176}; }; }; }; 177 178#endif 179 180