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 .
20 #include "svtools/viewdataentry.hxx"
22 #include "tools/debug.hxx"
24 DBG_NAME(SvViewDataEntry
);
26 SvViewDataEntry::SvViewDataEntry() :
35 DBG_CTOR(SvViewDataEntry
,0);
38 SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry
& rData
) :
39 nVisPos(rData
.nVisPos
),
42 mbExpanded(rData
.mbExpanded
),
44 mbCursored(rData
.mbCursored
),
45 mbSelectable(rData
.mbSelectable
)
47 DBG_CTOR(SvViewDataEntry
,0);
50 SvViewDataEntry::~SvViewDataEntry()
52 DBG_DTOR(SvViewDataEntry
,0);
58 bool SvViewDataEntry::IsSelected() const
63 bool SvViewDataEntry::IsHighlighted() const
68 bool SvViewDataEntry::IsExpanded() const
73 bool SvViewDataEntry::HasFocus() const
78 bool SvViewDataEntry::IsCursored() const
83 bool SvViewDataEntry::IsSelectable() const
88 void SvViewDataEntry::SetFocus( bool bFocus
)
93 void SvViewDataEntry::SetSelected( bool bSelected
)
95 mbSelected
= bSelected
;
96 mbHighlighted
= bSelected
;
99 void SvViewDataEntry::SetHighlighted( bool bHighlighted
)
101 mbHighlighted
= bHighlighted
;
104 void SvViewDataEntry::SetExpanded( bool bExpanded
)
106 mbExpanded
= bExpanded
;
109 void SvViewDataEntry::SetSelectable( bool bSelectable
)
111 mbSelectable
= bSelectable
;
114 void SvViewDataEntry::Init(size_t nSize
)
116 maItems
.resize(nSize
);
119 const SvViewDataItem
* SvViewDataEntry::GetItem(size_t nPos
) const
121 return &maItems
[nPos
];
124 SvViewDataItem
* SvViewDataEntry::GetItem(size_t nPos
)
126 return &maItems
[nPos
];
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */