1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module view
{
24 /** makes it possible to append and remove objects from a selection.
26 <p>The method XSelectionSupplier::setSelection() for an
27 instance that also supports XMultiSelectionSupplier should
28 be implemented that it also takes either a selectable object or a sequence
29 of selectable objects.</p>
31 <p>Adding an object more than once to a selection should not toggle the
32 selection for that object but only select it once</p>
34 interface XMultiSelectionSupplier
: XSelectionSupplier
37 /** adds the object or the objects represented by <var>Selection</var> to the selection
38 of this XMultiSelectionSupplier.
41 either an Object that is selectable or a sequence of objects that are selectable.
44 `TRUE`, if <var>Selection</var> was added to the current selection.
45 `FALSE`, if <var>Selection</var> or parts of <var>Selection</var> could not be
46 added to the current selection. For example, if the selection already contains
47 objects that are forbidden to be selected together with <var>Selection</var>
49 @throws com::sun::star::lang::IllegalArgumentException
50 If <var>Selection</var> is not a selectable object for this XMultiSelectionSupplier.
51 <p>Adding an object to the selection that is already part of the selection should not raise this exception</p>
53 boolean addSelection
( [in] any Selection
)
54 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
57 /** remove the object or objects represented by <var>Selection</var> from the
58 selection of this XMultiSelectionSupplier.
61 either an Object that is selectable or a sequence of objects that are selectable.
63 @throws com::sun::star::lang::IllegalArgumentException
64 If <var>Selection</var> is not a selectable object for this XMultiSelectionSupplier.
65 <p>Removing an object from the selection that is not part of the selection should not raise this exception</p>
67 void removeSelection
( [in] any Selection
)
68 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
71 /** clears the selection of this XMultiSelectionSupplier.
73 void clearSelection
();
76 /** returns the number of selected objects of this XMultiSelectionSupplier.
78 long getSelectionCount
();
82 a new object to enumerate the selection of this XMultiSelectionSupplier.
83 It returns NULL if there are no objects in the selection.
85 com
::sun
::star
::container
::XEnumeration createSelectionEnumeration
();
89 a new object to enumerate the selection of this XMultiSelectionSupplier
90 in reverse order. If the order of the selected objects
91 It returns NULL if there are no objects in the selection.
93 com
::sun
::star
::container
::XEnumeration createReverseSelectionEnumeration
();
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */