merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / drawing / framework / XConfiguration.idl
blobef7f7ee46c7753220e5c047faf00b250dd4c176f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XConfiguration.idl,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_drawing_framework_XConfiguration_idl__
32 #define __com_sun_star_drawing_framework_XConfiguration_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include <com/sun/star/uno/XInterface.idl>
36 #endif
37 #ifndef __com_sun_star_util_XCloneable_idl__
38 #include <com/sun/star/util/XCloneable.idl>
39 #endif
40 #ifndef __com_sun_star_drawing_framework_AnchorBindingMode_idl__
41 #include <com/sun/star/drawing/framework/AnchorBindingMode.idl>
42 #endif
44 module com { module sun { module star { module drawing { module framework {
46 interface XResourceId;
48 /** A configuration describes the resources of an application like panes,
49 views, and tool bars and their relationships that are currently active
50 or are requested to be activated. Resources are specified by ResourceId
51 structures rather than references so that not only the current
52 configuration but also a requested configuration can be represented.
54 <p>Direct manipulation of a configuration object is not advised with the
55 exception of the <type>ConfigurationController</type> and objects that
56 implement the <type>XConfigurationChangeRequest</type> interface.</p>
58 @see XConfigurationController
60 interface XConfiguration
61 : ::com::sun::star::util::XCloneable
63 /** Returns the list of resources that are bound directly and/or
64 indirectly to the given anchor. A URL filter can reduce the set of
65 returned resource ids.
66 @param xAnchorId
67 This anchor typically is either a pane or an empty
68 <type>XResourceId</type> object. An
69 empty reference is treated like an <type>XResourceId</type> object.
70 @param sURLPrefix
71 When a non-empty string is given then resource ids are returned
72 only when their resource URL matches this prefix, i.e. when it
73 begins with this prefix or is equal to it. Characters with
74 special meaning to URLs are not interpreted. In the typical
75 usage the prefix specifies the type of a resource. A typical
76 value is "private:resource/floater/", which is the prefix for
77 pane URLs. In a recursive search, only resource ids at the top
78 level are matched against this prefix.
79 <p>Use an empty string to prevent filtering out resource ids.</p>
80 @param eSearchMode
81 This flag defines whether to return only resources that are
82 directly bound to the given anchor or a recursive search is to
83 be made. Note that for the recursive search and an empty anchor
84 all resource ids are returned that belong to the configuration.
85 @return
86 The set of returned resource ids may be empty when there are no
87 resource ids that match all conditions. The resources in the
88 sequence are ordered with respect to the
89 XResourceId::compareTo() method.
91 sequence<XResourceId> getResources (
92 [in] XResourceId xAnchorId,
93 [in] string sTargetURLPrefix,
94 [in] AnchorBindingMode eSearchMode);
96 /** <p>Returns wether the specified resource is part of the
97 configuration.</p>
98 This is independent of whether the resource does really exist and is
99 active, i.e. has a visible representation in the GUI.
100 @param xResourceId
101 The id of a resource. May be empty (empty reference or empty
102 <type>XResourceId</type> object) in which case <FALSE/> is
103 returned.
104 @return
105 Returns <TRUE/> when the resource is part of the configuration
106 and <FALSE/> when it is not.
108 boolean hasResource ([in] XResourceId xResourceId);
110 /** Add a resource to the configuration.
111 <p>This method should be used only by objects that implement the
112 <type>XConfigurationRequest</type> interface or by the configuration
113 controller.</p>
114 @param xResourceId
115 The resource to add to the configuration. When the specified
116 resource is already part of the configuration then this call is
117 silently ignored.
118 @throws IllegalArgumentException
119 When an empty resource id is given then an
120 IllegalArgumentException is thrown.
122 void addResource ([in] XResourceId xResourceId);
124 /** Remove a resource from the configuration.
125 <p>This method should be used only by objects that implement the
126 <type>XConfigurationRequest</type> interface or by the configuration
127 controller.</p>
128 @param xResourceId
129 The resource to remove from the configuration. When the
130 specified resource is not part of the configuration then this
131 call is silently ignored.
132 @throws IllegalArgumentException
133 When an empty resource id is given then an
134 IllegalArgumentException is thrown.
136 void removeResource ([in] XResourceId xResource);
139 }; }; }; }; }; // ::com::sun::star::drawing::framework
141 #endif