1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
23 module com
{ module sun
{ module star
{ module embed
{
25 /** represents common functionality for embedded objects.
27 published
interface XEmbeddedObject
30 /** represents common visualization functionality for embedded objects.
32 interface XVisualObject
;
34 /** allows to detect class ID of the object.
36 interface XClassifiedObject
;
38 /** allows to get access to the component handled by the object.
40 interface XComponentSupplier
;
42 /** allows to be notified when object changes the state.
44 interface XStateChangeBroadcaster
;
46 /** allows to be notified about object related events.
48 interface ::com
::sun
::star
::document
::XEventBroadcaster
;
50 /** allows to control lifetime of the object.
52 interface ::com
::sun
::star
::util
::XCloseable
;
55 /** changes the state of the object to the requested one.
58 specifies the new state, can take values from the constant set
59 com::sun::star::embed::EmbedStates
61 @throws com::sun::star::embed::UnreachableStateException
62 the specified state can not be reached
64 @throws com::sun::star::embed::WrongStateException
65 in case object is in invalid state
67 @throws com::sun::star::uno::Exception
68 in case of other problems
70 void changeState
( [in] long nNewState
)
71 raises
( ::com
::sun
::star
::embed
::UnreachableStateException
,
72 ::com
::sun
::star
::embed
::WrongStateException
,
73 ::com
::sun
::star
::uno
::Exception
);
75 /** returns supported states for the object.
78 the sequence of states the object can be set to
80 @throws com::sun::star::embed::NeedsRunningStateException
81 means that the object is in loaded state now and can be switched
82 to running state, other possible states can be detected only when
83 the object is not in loaded state any more
85 @throws com::sun::star::embed::WrongStateException
86 in case object is in invalid state
88 sequence
< long > getReachableStates
()
89 raises
( ::com
::sun
::star
::embed
::NeedsRunningStateException
,
90 ::com
::sun
::star
::embed
::WrongStateException
);
92 /** returns the current state of the object.
95 the current state of the object
97 @throws com::sun::star::embed::WrongStateException
98 in case object is in invalid state
100 long getCurrentState
()
101 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
103 /** lets object perform an action referenced by nVerbID.
106 specifies an action to perform, can take values from
109 @throws ::com::sun::star::lang::IllegalArgumentException
110 the verb is not supported
112 @throws com::sun::star::embed::WrongStateException
113 the object is in wrong state to call the function
115 @throws com::sun::star::embed::UnreachableStateException
116 the state, required by the verb, can not be reached
118 @throws com::sun::star::uno::Exception
119 in case of other problems
121 void doVerb
( [in] long nVerbID
)
122 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
,
123 ::com
::sun
::star
::embed
::WrongStateException
,
124 ::com
::sun
::star
::embed
::UnreachableStateException
,
125 ::com
::sun
::star
::uno
::Exception
);
127 /** returns supported verbs for the object.
130 the sequence of verbs the object supports
132 @throws com::sun::star::embed::NeedsRunningStateException
133 means that the object is in loaded state now and can be switched
134 to running state, acceptable verbs can be detected only when the
135 object is not in loaded state any more
137 @throws com::sun::star::embed::WrongStateException
138 the object is in wrong state to call the function
140 sequence
< VerbDescriptor
> getSupportedVerbs
()
141 raises
( ::com
::sun
::star
::embed
::NeedsRunningStateException
,
142 ::com
::sun
::star
::embed
::WrongStateException
);
144 /** sets a connection to the container's client.
147 provides a reference to a client implementation
149 @throws com::sun::star::embed::WrongStateException
150 the object is in wrong state
152 void setClientSite
( [in] XEmbeddedClient xClient
)
153 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
155 /** provides access to the internal link to the container client.
158 a reference to related container client if any is set
160 @throws com::sun::star::embed::WrongStateException
161 the object is in wrong state
163 XEmbeddedClient getClientSite
()
164 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
166 /** updates object's representations.
168 @throws com::sun::star::embed::WrongStateException
169 the object is in wrong state to call the function
171 @throws com::sun::star::uno::Exception
172 in case problems detected
175 raises
( ::com
::sun
::star
::embed
::WrongStateException
,
176 ::com
::sun
::star
::uno
::Exception
);
178 /** specifies how often the object's representation should be updated.
181 the new update mode, can take values from
184 @throws ::com::sun::star::embed::WrongStateException
185 the object is in wrong state
187 void setUpdateMode
( [in] long nMode
)
188 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
190 /** retrieves the status of the object.
193 the aspect specifying the form of object representation
196 the value specifying the status of the object for specified aspect
197 can take values from EmbedMisc constant set
199 @throws com::sun::star::embed::WrongStateException
200 the object is in wrong state
202 hyper getStatus
( [in] hyper nAspect
)
203 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
205 /** provides object with the name of container document.
208 name of the container document
210 void setContainerName
( [in] string sName
);
217 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */