bump product version to 4.1.6.2
[LibreOffice.git] / include / svtools / viewdataentry.hxx
blob3800b293fd2b76d7071e8b79e567d181d5374915
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_VIEWDATAENTRY_HXX__
21 #define __SVTOOLS_VIEWDATAENTRY_HXX__
23 #include "svtdllapi.h"
24 #include "tools/solar.h"
25 #include "tools/gen.hxx"
27 #include <vector>
29 struct SvViewDataItem
31 Size maSize;
34 /**
35 * View-dependent data for a tree list entry created in the virtual function
36 * SvTreeListBox::CreateViewData(). The item array contains the same number
37 * of items as that of the items in its corresponding tree list entry.
39 * When an entry is selected, it is logically selected and visually
40 * highlighted. When an entry is only highlighted, it looks visually
41 * highlighted, but not logically selected.
43 class SVT_DLLPUBLIC SvViewDataEntry
45 friend class SvTreeList;
47 std::vector<SvViewDataItem> maItems;
48 sal_uLong nVisPos;
49 bool mbSelected:1;
50 bool mbHighlighted:1;
51 bool mbExpanded:1;
52 bool mbFocused:1;
53 bool mbCursored:1;
54 bool mbSelectable:1;
56 public:
57 SvViewDataEntry();
58 SvViewDataEntry( const SvViewDataEntry& );
59 ~SvViewDataEntry();
61 bool IsSelected() const;
62 bool IsHighlighted() const;
63 bool IsExpanded() const;
64 bool HasFocus() const;
65 bool IsCursored() const;
66 bool IsSelectable() const;
67 void SetFocus( bool bFocus );
68 void SetSelected( bool bSelected );
69 void SetHighlighted( bool bHighlighted );
70 void SetExpanded( bool bExpanded );
71 void SetSelectable( bool bSelectable );
73 void Init(size_t nSize);
75 const SvViewDataItem* GetItem(size_t nPos) const;
76 SvViewDataItem* GetItem(size_t nPos);
79 #endif
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */