LibreOffice Module vcl (master)  1
viewdataentry.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_VIEWDATAENTRY_HXX
21 #define INCLUDED_VCL_VIEWDATAENTRY_HXX
22 
23 #include <tools/solar.h>
24 
25 #include <vector>
26 
27 class SvTreeListBox;
28 
30 {
31  int mnWidth = 0;
32  int mnHeight = 0;
33 };
34 
45 {
46  friend class SvTreeList;
47 
48  std::vector<SvViewDataItem> maItems;
50  bool mbSelected:1;
51  bool mbHighlighted:1;
52  bool mbExpanded:1;
53  bool mbFocused:1;
54  bool mbSelectable:1;
55  bool mbDragTarget:1;
56 
57 public:
61 
62  bool IsSelected() const { return mbSelected;}
63  bool IsHighlighted() const { return mbHighlighted;}
64  bool IsExpanded() const { return mbExpanded;}
65  bool HasFocus() const { return mbFocused;}
66  bool IsSelectable() const { return mbSelectable;}
67  bool IsDragTarget() const { return mbDragTarget;}
68  void SetFocus( bool bFocus );
69  void SetSelected( bool bSelected );
70  void SetExpanded( bool bExpanded );
71  void SetSelectable( bool bSelectable );
72  void SetDragTarget( bool bDragTarget )
73  {
74  mbDragTarget = bDragTarget;
75  }
76 
77  void Init(size_t nSize);
78 
79  const SvViewDataItem& GetItem(size_t nPos) const;
80  SvViewDataItem& GetItem(size_t nPos);
81 };
82 
83 #endif
84 
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsSelectable() const
bool IsHighlighted() const
sal_uIntPtr sal_uLong
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
void SetFocus(bool bFocus)
bool IsExpanded() const
void Init(size_t nSize)
bool IsDragTarget() const
std::vector< SvViewDataItem > maItems
void SetSelected(bool bSelected)
const SvViewDataItem & GetItem(size_t nPos) const
void SetExpanded(bool bExpanded)
void SetSelectable(bool bSelectable)
bool IsSelected() const
bool HasFocus() const
void SetDragTarget(bool bDragTarget)