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