1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMultiSelectionSupplier.idl,v $
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 ************************************************************************/
30 #ifndef __com_sun_star_view_XMultiSelectionSupplier_idl__
31 #define __com_sun_star_view_XMultiSelectionSupplier_idl__
33 #ifndef __com_sun_star_view_XSelectionSupplier_idl__
34 #include
<com
/sun
/star
/view
/XSelectionSupplier.idl
>
36 #ifndef __com_sun_star_container_XEnumeration_idl__
37 #include
<com
/sun
/star
/container
/XEnumeration.idl
>
40 //=============================================================================
42 module com
{ module sun
{ module star
{ module view
{
44 //=============================================================================
46 /** makes it possible to append and remove objects from a selection.
48 <p>The method <method>XSelectionSupplier::setSelection</method> for an
49 instance that also supports <type>XMultiSelectionSupplier</method> should
50 be implemented that it also takes either a selectable object or a sequence
51 of selectable objects.</p>
53 <p>Adding an object more than once to a selection should not toggle the
54 selection for that object but only select it once</p>
56 interface XMultiSelectionSupplier
: XSelectionSupplier
58 //-------------------------------------------------------------------------
60 /** adds the object or the objects represented by <var>Selection</var> to the selection
61 of this <type>XMultiSelectionSupplier</type>.
64 either an Object that is selectable or a sequence of objects that are selectable.
67 <TRUE/>/, if <var>Selection</var> was added to the current selection.
68 <FALSE/>, if <var>Selection</var> or parts of <var>Selection</var> could not be
69 added to the current selection. For example, if the selection already contains
70 objects that are forbidden to be selected together with <var>Selection</var>
72 @raises com::sun::star::lang::IllegalArgumentException
73 If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>.
74 <p>Adding an object to the selection that is already part of the selection should not raise this exception</p>
76 boolean addSelection
( [in] any Selection
)
77 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
79 //-------------------------------------------------------------------------
81 /** remove the object or objects represented by <var>Selection</var> from the
82 selection of this <type>XMultiSelectionSupplier</type>.
85 either an Object that is selectable or a sequence of objects that are selectable.
88 <TRUE/>/, if <var>Selection</var> was added to the current selection.
89 <FALSE/>, if <var>Selection</var> or parts of <var>Selection</var> could not be
90 added to the current selection. For example, if the selection already contains
91 objects that are forbidden to be selected together with <var>Selection</var>.
93 @raises com::sun::star::lang::IllegalArgumentException
94 If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>.
95 <p>Removing an object from the selection that is not part of the selection should not raise this exception</p>
97 void removeSelection
( [in] any Selection
)
98 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
100 //-------------------------------------------------------------------------
102 /** clears the selection of this <type>XMultiSelectionSupplier</type>.
104 void clearSelection
();
106 //-------------------------------------------------------------------------
108 /** returns the number of selected objects of this <type>XMultiSelectionSupplier</type>.
110 long getSelectionCount
();
112 //-------------------------------------------------------------------------
115 a new object to enumerate the selection of this <type>XMultiSelectionSupplier</type>.
116 It returns NULL if there are no objects in the selection.
118 com
::sun
::star
::container
::XEnumeration createSelectionEnumeration
();
122 a new object to enumerate the selection of this <type>XMultiSelectionSupplier</type>
123 in reverse order. If the order of the selected objects
124 It returns NULL if there are no objects in the selection.
126 com
::sun
::star
::container
::XEnumeration createReverseSelectionEnumeration
();
130 //=============================================================================