1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_drawing_framework_XConfiguration_idl__
25*b1cdbd2cSJim Jagielski#define __com_sun_star_drawing_framework_XConfiguration_idl__
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_uno_XInterface_idl__
28*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl>
29*b1cdbd2cSJim Jagielski#endif
30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_util_XCloneable_idl__
31*b1cdbd2cSJim Jagielski#include <com/sun/star/util/XCloneable.idl>
32*b1cdbd2cSJim Jagielski#endif
33*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_drawing_framework_AnchorBindingMode_idl__
34*b1cdbd2cSJim Jagielski#include <com/sun/star/drawing/framework/AnchorBindingMode.idl>
35*b1cdbd2cSJim Jagielski#endif
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module drawing { module framework {
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim Jagielskipublished interface XResourceId;
40*b1cdbd2cSJim Jagielski
41*b1cdbd2cSJim Jagielski/** A configuration describes the resources of an application like panes,
42*b1cdbd2cSJim Jagielski    views, and tool bars and their relationships that are currently active
43*b1cdbd2cSJim Jagielski    or are requested to be activated.  Resources are specified by ResourceId
44*b1cdbd2cSJim Jagielski    structures rather than references so that not only the current
45*b1cdbd2cSJim Jagielski    configuration but also a requested configuration can be represented.
46*b1cdbd2cSJim Jagielski
47*b1cdbd2cSJim Jagielski    <p>Direct manipulation of a configuration object is not advised with the
48*b1cdbd2cSJim Jagielski    exception of the <type>ConfigurationController</type> and objects that
49*b1cdbd2cSJim Jagielski    implement the <type>XConfigurationChangeRequest</type> interface.</p>
50*b1cdbd2cSJim Jagielski
51*b1cdbd2cSJim Jagielski    @see XConfigurationController
52*b1cdbd2cSJim Jagielski*/
53*b1cdbd2cSJim Jagielskipublished interface XConfiguration
54*b1cdbd2cSJim Jagielski    : ::com::sun::star::util::XCloneable
55*b1cdbd2cSJim Jagielski{
56*b1cdbd2cSJim Jagielski    /** Returns the list of resources that are bound directly and/or
57*b1cdbd2cSJim Jagielski        indirectly to the given anchor.  A URL filter can reduce the set of
58*b1cdbd2cSJim Jagielski        returned resource ids.
59*b1cdbd2cSJim Jagielski        @param xAnchorId
60*b1cdbd2cSJim Jagielski            This anchor typically is either a pane or an empty
61*b1cdbd2cSJim Jagielski            <type>XResourceId</type> object.  An
62*b1cdbd2cSJim Jagielski            empty reference is treated like an <type>XResourceId</type> object.
63*b1cdbd2cSJim Jagielski        @param sURLPrefix
64*b1cdbd2cSJim Jagielski            When a non-empty string is given then resource ids are returned
65*b1cdbd2cSJim Jagielski            only when their resource URL matches this prefix, i.e. when it
66*b1cdbd2cSJim Jagielski            begins with this prefix or is equal to it.  Characters with
67*b1cdbd2cSJim Jagielski            special meaning to URLs are not interpreted.  In the typical
68*b1cdbd2cSJim Jagielski            usage the prefix specifies the type of a resource.  A typical
69*b1cdbd2cSJim Jagielski            value is "private:resource/floater/", which is the prefix for
70*b1cdbd2cSJim Jagielski            pane URLs.  In a recursive search, only resource ids at the top
71*b1cdbd2cSJim Jagielski            level are matched against this prefix.
72*b1cdbd2cSJim Jagielski            <p>Use an empty string to prevent filtering out resource ids.</p>
73*b1cdbd2cSJim Jagielski        @param eSearchMode
74*b1cdbd2cSJim Jagielski            This flag defines whether to return only resources that are
75*b1cdbd2cSJim Jagielski            directly bound to the given anchor or a recursive search is to
76*b1cdbd2cSJim Jagielski            be made.  Note that for the recursive search and an empty anchor
77*b1cdbd2cSJim Jagielski            all resource ids are returned that belong to the configuration.
78*b1cdbd2cSJim Jagielski        @return
79*b1cdbd2cSJim Jagielski            The set of returned resource ids may be empty when there are no
80*b1cdbd2cSJim Jagielski            resource ids that match all conditions.  The resources in the
81*b1cdbd2cSJim Jagielski            sequence are ordered with respect to the
82*b1cdbd2cSJim Jagielski            XResourceId::compareTo() method.
83*b1cdbd2cSJim Jagielski    */
84*b1cdbd2cSJim Jagielski    sequence<XResourceId> getResources (
85*b1cdbd2cSJim Jagielski        [in] XResourceId xAnchorId,
86*b1cdbd2cSJim Jagielski        [in] string sTargetURLPrefix,
87*b1cdbd2cSJim Jagielski        [in] AnchorBindingMode eSearchMode);
88*b1cdbd2cSJim Jagielski
89*b1cdbd2cSJim Jagielski    /** <p>Returns wether the specified resource is part of the
90*b1cdbd2cSJim Jagielski        configuration.</p>
91*b1cdbd2cSJim Jagielski        This is independent of whether the resource does really exist and is
92*b1cdbd2cSJim Jagielski        active, i.e. has a visible representation in the GUI.
93*b1cdbd2cSJim Jagielski        @param xResourceId
94*b1cdbd2cSJim Jagielski            The id of a resource.  May be empty (empty reference or empty
95*b1cdbd2cSJim Jagielski            <type>XResourceId</type> object) in which case <FALSE/> is
96*b1cdbd2cSJim Jagielski            returned.
97*b1cdbd2cSJim Jagielski        @return
98*b1cdbd2cSJim Jagielski            Returns <TRUE/> when the resource is part of the configuration
99*b1cdbd2cSJim Jagielski            and <FALSE/> when it is not.
100*b1cdbd2cSJim Jagielski    */
101*b1cdbd2cSJim Jagielski    boolean hasResource ([in] XResourceId xResourceId);
102*b1cdbd2cSJim Jagielski
103*b1cdbd2cSJim Jagielski    /** Add a resource to the configuration.
104*b1cdbd2cSJim Jagielski        <p>This method should be used only by objects that implement the
105*b1cdbd2cSJim Jagielski        <type>XConfigurationRequest</type> interface or by the configuration
106*b1cdbd2cSJim Jagielski        controller.</p>
107*b1cdbd2cSJim Jagielski        @param xResourceId
108*b1cdbd2cSJim Jagielski            The resource to add to the configuration.  When the specified
109*b1cdbd2cSJim Jagielski            resource is already part of the configuration then this call is
110*b1cdbd2cSJim Jagielski            silently ignored.
111*b1cdbd2cSJim Jagielski        @throws IllegalArgumentException
112*b1cdbd2cSJim Jagielski            When an empty resource id is given then an
113*b1cdbd2cSJim Jagielski            IllegalArgumentException is thrown.
114*b1cdbd2cSJim Jagielski    */
115*b1cdbd2cSJim Jagielski    void addResource ([in] XResourceId xResourceId);
116*b1cdbd2cSJim Jagielski
117*b1cdbd2cSJim Jagielski    /** Remove a resource from the configuration.
118*b1cdbd2cSJim Jagielski        <p>This method should be used only by objects that implement the
119*b1cdbd2cSJim Jagielski        <type>XConfigurationRequest</type> interface or by the configuration
120*b1cdbd2cSJim Jagielski        controller.</p>
121*b1cdbd2cSJim Jagielski        @param xResourceId
122*b1cdbd2cSJim Jagielski            The resource to remove from the configuration. When the
123*b1cdbd2cSJim Jagielski            specified resource is not part of the configuration then this
124*b1cdbd2cSJim Jagielski            call is silently ignored.
125*b1cdbd2cSJim Jagielski        @throws IllegalArgumentException
126*b1cdbd2cSJim Jagielski            When an empty resource id is given then an
127*b1cdbd2cSJim Jagielski            IllegalArgumentException is thrown.
128*b1cdbd2cSJim Jagielski    */
129*b1cdbd2cSJim Jagielski    void removeResource ([in] XResourceId xResource);
130*b1cdbd2cSJim Jagielski};
131*b1cdbd2cSJim Jagielski
132*b1cdbd2cSJim Jagielski}; }; }; }; }; // ::com::sun::star::drawing::framework
133*b1cdbd2cSJim Jagielski
134*b1cdbd2cSJim Jagielski#endif
135