Branch libreoffice-5-0-4
[LibreOffice.git] / include / vcl / lstbox.h
blobb6e654ae9774c3c15d5824ef25b9166b25c87526
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 INCLUDED_VCL_LSTBOX_H
21 #define INCLUDED_VCL_LSTBOX_H
23 #include <sal/types.h>
24 #include <o3tl/typed_flags_set.hxx>
26 #define LISTBOX_APPEND (SAL_MAX_INT32)
27 #define LISTBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
28 #define LISTBOX_ERROR (SAL_MAX_INT32)
29 #define LISTBOX_MAX_ENTRIES (SAL_MAX_INT32 - 1)
33 // the following defines can be used for the SetEntryFlags()
34 // and GetEntryFlags() methods
36 // !! Do not use these flags for user data as they are reserved !!
37 // !! to change the internal behaviour of the ListBox implementation !!
38 // !! for specific entries. !!
40 enum class ListBoxEntryFlags
42 NONE = 0x0000,
43 /** this flag disables a selection of an entry completely. It is not
44 possible to select such entries either from the user interface
45 nor from the ListBox methods. Cursor traveling is handled correctly.
46 This flag can be used to add titles to a ListBox.
48 DisableSelection = 0x0001,
50 /** this flag can be used to make an entry multine capable
51 A normal entry is single line and will therefore be clipped
52 at the right listbox border. Setting this flag enables
53 word breaks for the entry text.
55 MultiLine = 0x0002,
57 /** this flags lets the item be drawn disabled (e.g. in grey text)
58 usage only guaranteed with ListBoxEntryFlags::DisableSelection
60 DrawDisabled = 0x0004,
62 namespace o3tl
64 template<> struct typed_flags<ListBoxEntryFlags> : is_typed_flags<ListBoxEntryFlags, 0x0007> {};
67 #endif // INCLUDED_VCL_LSTBOX_H
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */