bump product version to 4.1.6.2
[LibreOffice.git] / include / svtools / extensionlistbox.hxx
blob62f5c383579ae5cb09b3628977d06aa7f925d521
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef _SVTOOLS_EXTENSIONLISTBOX_HXX
21 #define _SVTOOLS_EXTENSIONLISTBOX_HXX
23 #include <vcl/ctrl.hxx>
24 #include <rtl/ustring.hxx>
26 // ============================================================================
28 namespace svt
31 // ============================================================================
33 /** This abstract class provides methods to implement an extension list box.
34 This header is needed for the automatic test tool
36 class IExtensionListBox: public Control
38 public:
39 enum { ENTRY_NOTFOUND = -1 };
41 IExtensionListBox( Window* pParent, WinBits nWinStyle = 0 ): Control( pParent, nWinStyle ){}
43 /** @return The count of the entries in the list box. */
44 virtual sal_Int32 getItemCount() const = 0;
46 /** @return The index of the first selected entry in the list box.
47 When nothing is selected, which is the case when getItemCount returns '0',
48 then this function returns ENTRY_NOTFOUND */
49 virtual sal_Int32 getSelIndex() const = 0;
51 /** @return The item name of the entry with the given index
52 The index starts with 0.
53 Throws an com::sun::star::lang::IllegalArgumentException, when the position is invalid. */
54 virtual OUString getItemName( sal_Int32 index ) const = 0;
56 /** @return The version string of the entry with the given index
57 The index starts with 0.
58 Throws an com::sun::star::lang::IllegalArgumentException, when the position is invalid. */
59 virtual OUString getItemVersion( sal_Int32 index ) const = 0;
61 /** @return The description string of the entry with the given index
62 The index starts with 0.
63 Throws an com::sun::star::lang::IllegalArgumentException, when the position is invalid. */
64 virtual OUString getItemDescription( sal_Int32 index ) const = 0;
66 /** @return The publisher string of the entry with the given index
67 The index starts with 0.
68 Throws an com::sun::star::lang::IllegalArgumentException, when the position is invalid. */
69 virtual OUString getItemPublisher( sal_Int32 index ) const = 0;
71 /** @return The link behind the publisher text of the entry with the given index
72 The index starts with 0.
73 Throws an com::sun::star::lang::IllegalArgumentException, when the position is invalid. */
74 virtual OUString getItemPublisherLink( sal_Int32 index ) const = 0;
76 /** The entry at the given position will be selected
77 Index starts with 0.
78 Throws an com::sun::star::lang::IllegalArgumentException, when the position is invalid. */
79 virtual void select( sal_Int32 index ) = 0;
81 /** The first found entry with the given name will be selected
82 When there was no entry found with the name, the selection doesn't change.
83 Please note that there might be more than one entry with the same
84 name, because:
85 1. the name is not unique
86 2. one extension can be installed as user and shared extension.
88 virtual void select( const OUString & sName ) = 0;
90 // ============================================================================
92 } // namespace svt
94 // ============================================================================
96 #endif // _SVTOOLS_EXTENSIONLISTBOX_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */