Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / view / XMultiSelectionSupplier.idl
blob93c90b0df0d45a6d75fdde78ff0e963be7bba904
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_view_XMultiSelectionSupplier_idl__
29 #define __com_sun_star_view_XMultiSelectionSupplier_idl__
31 #include <com/sun/star/view/XSelectionSupplier.idl>
32 #include <com/sun/star/container/XEnumeration.idl>
34 //=============================================================================
36 module com { module sun { module star { module view {
38 //=============================================================================
40 /** makes it possible to append and remove objects from a selection.
42 <p>The method <method>XSelectionSupplier::setSelection</method> for an
43 instance that also supports <type>XMultiSelectionSupplier</method> should
44 be implemented that it also takes either a selectable object or a sequence
45 of selectable objects.</p>
47 <p>Adding an object more than once to a selection should not toggle the
48 selection for that object but only select it once</p>
50 interface XMultiSelectionSupplier: XSelectionSupplier
52 //-------------------------------------------------------------------------
54 /** adds the object or the objects represented by <var>Selection</var> to the selection
55 of this <type>XMultiSelectionSupplier</type>.
57 @param Selection
58 either an Object that is selectable or a sequence of objects that are selectable.
60 @returns
61 <TRUE/>/, if <var>Selection</var> was added to the current selection.
62 <FALSE/>, if <var>Selection</var> or parts of <var>Selection</var> could not be
63 added to the current selection. For example, if the selection already contains
64 objects that are forbidden to be selected together with <var>Selection</var>
66 @throws com::sun::star::lang::IllegalArgumentException
67 If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>.
68 <p>Adding an object to the selection that is already part of the selection should not raise this exception</p>
70 boolean addSelection( [in] any Selection )
71 raises( com::sun::star::lang::IllegalArgumentException );
73 //-------------------------------------------------------------------------
75 /** remove the object or objects represented by <var>Selection</var> from the
76 selection of this <type>XMultiSelectionSupplier</type>.
78 @param Selection
79 either an Object that is selectable or a sequence of objects that are selectable.
81 @returns
82 <TRUE/>/, if <var>Selection</var> was added to the current selection.
83 <FALSE/>, if <var>Selection</var> or parts of <var>Selection</var> could not be
84 added to the current selection. For example, if the selection already contains
85 objects that are forbidden to be selected together with <var>Selection</var>.
87 @throws com::sun::star::lang::IllegalArgumentException
88 If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>.
89 <p>Removing an object from the selection that is not part of the selection should not raise this exception</p>
91 void removeSelection( [in] any Selection )
92 raises( com::sun::star::lang::IllegalArgumentException );
94 //-------------------------------------------------------------------------
96 /** clears the selection of this <type>XMultiSelectionSupplier</type>.
98 void clearSelection();
100 //-------------------------------------------------------------------------
102 /** returns the number of selected objects of this <type>XMultiSelectionSupplier</type>.
104 long getSelectionCount();
106 //-------------------------------------------------------------------------
108 /** @returns
109 a new object to enumerate the selection of this <type>XMultiSelectionSupplier</type>.
110 It returns NULL if there are no objects in the selection.
112 com::sun::star::container::XEnumeration createSelectionEnumeration();
115 /** @returns
116 a new object to enumerate the selection of this <type>XMultiSelectionSupplier</type>
117 in reverse order. If the order of the selected objects
118 It returns NULL if there are no objects in the selection.
120 com::sun::star::container::XEnumeration createReverseSelectionEnumeration();
124 //=============================================================================
126 }; }; }; };
128 #endif
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */