1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_view_XMultiSelectionSupplier_idl__
28 #define __com_sun_star_view_XMultiSelectionSupplier_idl__
30 #ifndef __com_sun_star_view_XSelectionSupplier_idl__
31 #include
<com
/sun
/star
/view
/XSelectionSupplier.idl
>
33 #ifndef __com_sun_star_container_XEnumeration_idl__
34 #include
<com
/sun
/star
/container
/XEnumeration.idl
>
37 //=============================================================================
39 module com
{ module sun
{ module star
{ module view
{
41 //=============================================================================
43 /** makes it possible to append and remove objects from a selection.
45 <p>The method <method>XSelectionSupplier::setSelection</method> for an
46 instance that also supports <type>XMultiSelectionSupplier</method> should
47 be implemented that it also takes either a selectable object or a sequence
48 of selectable objects.</p>
50 <p>Adding an object more than once to a selection should not toggle the
51 selection for that object but only select it once</p>
53 interface XMultiSelectionSupplier
: XSelectionSupplier
55 //-------------------------------------------------------------------------
57 /** adds the object or the objects represented by <var>Selection</var> to the selection
58 of this <type>XMultiSelectionSupplier</type>.
61 either an Object that is selectable or a sequence of objects that are selectable.
64 <TRUE/>/, if <var>Selection</var> was added to the current selection.
65 <FALSE/>, if <var>Selection</var> or parts of <var>Selection</var> could not be
66 added to the current selection. For example, if the selection already contains
67 objects that are forbidden to be selected together with <var>Selection</var>
69 @raises com::sun::star::lang::IllegalArgumentException
70 If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>.
71 <p>Adding an object to the selection that is already part of the selection should not raise this exception</p>
73 boolean addSelection
( [in] any Selection
)
74 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
76 //-------------------------------------------------------------------------
78 /** remove the object or objects represented by <var>Selection</var> from the
79 selection of this <type>XMultiSelectionSupplier</type>.
82 either an Object that is selectable or a sequence of objects that are selectable.
85 <TRUE/>/, if <var>Selection</var> was added to the current selection.
86 <FALSE/>, if <var>Selection</var> or parts of <var>Selection</var> could not be
87 added to the current selection. For example, if the selection already contains
88 objects that are forbidden to be selected together with <var>Selection</var>.
90 @raises com::sun::star::lang::IllegalArgumentException
91 If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>.
92 <p>Removing an object from the selection that is not part of the selection should not raise this exception</p>
94 void removeSelection
( [in] any Selection
)
95 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
97 //-------------------------------------------------------------------------
99 /** clears the selection of this <type>XMultiSelectionSupplier</type>.
101 void clearSelection
();
103 //-------------------------------------------------------------------------
105 /** returns the number of selected objects of this <type>XMultiSelectionSupplier</type>.
107 long getSelectionCount
();
109 //-------------------------------------------------------------------------
112 a new object to enumerate the selection of this <type>XMultiSelectionSupplier</type>.
113 It returns NULL if there are no objects in the selection.
115 com
::sun
::star
::container
::XEnumeration createSelectionEnumeration
();
119 a new object to enumerate the selection of this <type>XMultiSelectionSupplier</type>
120 in reverse order. If the order of the selected objects
121 It returns NULL if there are no objects in the selection.
123 com
::sun
::star
::container
::XEnumeration createReverseSelectionEnumeration
();
127 //=============================================================================