LCOV - code coverage report
Current view: top level - include/svtools - viewdataentry.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 7 7 100.0 %
Date: 2015-06-13 12:38:46 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_SVTOOLS_VIEWDATAENTRY_HXX
      21             : #define INCLUDED_SVTOOLS_VIEWDATAENTRY_HXX
      22             : 
      23             : #include <svtools/svtdllapi.h>
      24             : #include <tools/solar.h>
      25             : #include <tools/gen.hxx>
      26             : 
      27             : #include <vector>
      28             : 
      29         202 : struct SvViewDataItem
      30             : {
      31             :     Size maSize;
      32             : };
      33             : 
      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.
      38             :  *
      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.
      42             :  */
      43             : class SVT_DLLPUBLIC SvViewDataEntry
      44             : {
      45             :     friend class SvTreeList;
      46             : 
      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;
      55             :     Rectangle maPaintRectangle;
      56             : 
      57             : public:
      58             :     SvViewDataEntry();
      59             :     SvViewDataEntry( const SvViewDataEntry& );
      60             :     ~SvViewDataEntry();
      61             : 
      62         134 :     bool IsSelected() const { return mbSelected;}
      63         218 :     bool IsHighlighted() const { return mbHighlighted;}
      64        1120 :     bool IsExpanded() const { return mbExpanded;}
      65          38 :     bool HasFocus() const { return mbFocused;}
      66         116 :     bool IsCursored() const { return mbCursored;}
      67          20 :     bool IsSelectable() const { return mbSelectable;}
      68             :     void SetFocus( bool bFocus );
      69             :     void SetSelected( bool bSelected );
      70             :     void SetHighlighted( bool bHighlighted );
      71             :     void SetExpanded( bool bExpanded );
      72             :     void SetSelectable( bool bSelectable );
      73             : 
      74             :     void Init(size_t nSize);
      75             : 
      76             :     const SvViewDataItem* GetItem(size_t nPos) const;
      77             :     SvViewDataItem* GetItem(size_t nPos);
      78             : 
      79             :     void SetPaintRectangle(Rectangle aRectangle);
      80             :     Rectangle GetPaintRectangle() const;
      81             : 
      82             : };
      83             : 
      84             : #endif
      85             : 
      86             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11