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_drawing_XLayerManager_idl__
24#define __com_sun_star_drawing_XLayerManager_idl__
25
26#ifndef __com_sun_star_container_XIndexAccess_idl__
27#include <com/sun/star/container/XIndexAccess.idl>
28#endif
29
30#ifndef __com_sun_star_drawing_XLayer_idl__
31#include <com/sun/star/drawing/XLayer.idl>
32#endif
33
34#ifndef __com_sun_star_container_NoSuchElementException_idl__
35#include <com/sun/star/container/NoSuchElementException.idl>
36#endif
37
38#ifndef __com_sun_star_drawing_XShape_idl__
39#include <com/sun/star/drawing/XShape.idl>
40#endif
41
42
43//=============================================================================
44
45 module com {  module sun {  module star {  module drawing {
46
47//=============================================================================
48
49/** This interface makes it possible to access and manage the
50	<type>Layer</type>s	of a document.
51
52	@see LayerManager
53 */
54published interface XLayerManager: com::sun::star::container::XIndexAccess
55{
56	//-------------------------------------------------------------------------
57
58	/** creates a new <type>Layer</type>
59
60		@param nIndex
61			the index at which the new layer is inserted
62
63		@returns
64			the new created <type>Layer</type>
65	 */
66	com::sun::star::drawing::XLayer insertNewByIndex( [in] long nIndex );
67
68	//-------------------------------------------------------------------------
69
70	/** removes a <type>Layer</type> and all <type>Shape</type>s on
71		this <type>Layer</type>.
72
73		@param xLayer
74			this <type>Layer</type> will be removed and disposed
75	 */
76	void remove( [in] com::sun::star::drawing::XLayer xLayer )
77			raises( com::sun::star::container::NoSuchElementException );
78
79	//-------------------------------------------------------------------------
80
81	/** attaches a <type>Shape</type> to the given <type>Layer</type>.
82
83		@param xShape
84			this is the <type>Shape</type> that will be attached to a <type>Layer</type>
85
86		@param xLayer
87			this is the <type>Layer</type> that will be attached to a <type>Shape</type>
88	 */
89	void attachShapeToLayer( [in] com::sun::star::drawing::XShape xShape,
90			 [in] com::sun::star::drawing::XLayer xLayer );
91
92	//-------------------------------------------------------------------------
93
94	/** queries the <type>Layer</type> that a <type>Shape</type> is attached to
95
96		@param xShape
97			specifies the <type>Shape</type> for which the layer is requested.
98
99		@returns
100			the <type>Layer</type> to which the <type>Shape</type> is
101			attached.
102
103	 */
104	com::sun::star::drawing::XLayer getLayerForShape( [in] com::sun::star::drawing::XShape xShape );
105
106};
107
108//=============================================================================
109
110}; }; }; };
111
112#endif
113
114