/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __com_sun_star_drawing_framework_XConfiguration_idl__ #define __com_sun_star_drawing_framework_XConfiguration_idl__ #include #include #include module com { module sun { module star { module drawing { module framework { published interface XResourceId; /** A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active or are requested to be activated. Resources are specified by ResourceId structures rather than references so that not only the current configuration but also a requested configuration can be represented.

Direct manipulation of a configuration object is not advised with the exception of the ConfigurationController and objects that implement the XConfigurationChangeRequest interface.

@see XConfigurationController */ published interface XConfiguration : ::com::sun::star::util::XCloneable { /** Returns the list of resources that are bound directly and/or indirectly to the given anchor. A URL filter can reduce the set of returned resource ids. @param xAnchorId This anchor typically is either a pane or an empty XResourceId object. An empty reference is treated like an XResourceId object. @param sURLPrefix When a non-empty string is given then resource ids are returned only when their resource URL matches this prefix, i.e. when it begins with this prefix or is equal to it. Characters with special meaning to URLs are not interpreted. In the typical usage the prefix specifies the type of a resource. A typical value is "private:resource/floater/", which is the prefix for pane URLs. In a recursive search, only resource ids at the top level are matched against this prefix.

Use an empty string to prevent filtering out resource ids.

@param eSearchMode This flag defines whether to return only resources that are directly bound to the given anchor or a recursive search is to be made. Note that for the recursive search and an empty anchor all resource ids are returned that belong to the configuration. @return The set of returned resource ids may be empty when there are no resource ids that match all conditions. The resources in the sequence are ordered with respect to the XResourceId::compareTo() method. */ sequence getResources ( [in] XResourceId xAnchorId, [in] string sTargetURLPrefix, [in] AnchorBindingMode eSearchMode); /**

Returns whether the specified resource is part of the configuration.

This is independent of whether the resource does really exist and is active, i.e. has a visible representation in the GUI. @param xResourceId The id of a resource. May be empty (empty reference or empty XResourceId object) in which case is returned. @return Returns when the resource is part of the configuration and when it is not. */ boolean hasResource ([in] XResourceId xResourceId); /** Add a resource to the configuration.

This method should be used only by objects that implement the XConfigurationRequest interface or by the configuration controller.

@param xResourceId The resource to add to the configuration. When the specified resource is already part of the configuration then this call is silently ignored. @throws IllegalArgumentException When an empty resource id is given then an IllegalArgumentException is thrown. */ void addResource ([in] XResourceId xResourceId); /** Remove a resource from the configuration.

This method should be used only by objects that implement the XConfigurationRequest interface or by the configuration controller.

@param xResourceId The resource to remove from the configuration. When the specified resource is not part of the configuration then this call is silently ignored. @throws IllegalArgumentException When an empty resource id is given then an IllegalArgumentException is thrown. */ void removeResource ([in] XResourceId xResource); }; }; }; }; }; }; // ::com::sun::star::drawing::framework #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */