LCOV - code coverage report
Current view: top level - fpicker/source/office - PlacesListBox.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 2 0.0 %
Date: 2014-11-03 Functions: 0 2 0.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             : #ifndef INCLUDED_FPICKER_SOURCE_OFFICE_PLACESLISTBOX_HXX
      10             : #define INCLUDED_FPICKER_SOURCE_OFFICE_PLACESLISTBOX_HXX
      11             : 
      12             : #include <iodlg.hxx>
      13             : 
      14             : #include <boost/shared_ptr.hpp>
      15             : #include <svtools/place.hxx>
      16             : #include <svtools/svtabbx.hxx>
      17             : 
      18             : #include <vector>
      19             : 
      20             : typedef boost::shared_ptr< Place > PlacePtr;
      21             : 
      22             : class PlacesListBox;
      23             : class PlacesListBox_Impl : public SvHeaderTabListBox
      24             : {
      25             :     private:
      26             :         HeaderBar*           mpHeaderBar;
      27             :         PlacesListBox*       mpParent;
      28             : 
      29             :     public:
      30             :         PlacesListBox_Impl( PlacesListBox* pParent, const OUString& rTitle );
      31             :         virtual ~PlacesListBox_Impl( );
      32             : 
      33             :         virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
      34             : };
      35             : 
      36             : /** ListBox to handle Places.
      37             :   */
      38             : class PlacesListBox : public Control
      39             : {
      40             :     private:
      41             :         std::vector< PlacePtr > maPlaces;
      42             :         SvtFileDialog*       mpDlg;
      43             :         PlacesListBox_Impl*  mpImpl;
      44             :         PushButton*          mpAddBtn;
      45             :         PushButton*          mpDelBtn;
      46             :         sal_Int32            mnNbEditables;
      47             :         bool                 mbUpdated;
      48             :         bool                 mbSelectionChanged;
      49             : 
      50             :     public:
      51             :         PlacesListBox( vcl::Window* pParent, SvtFileDialog* pFileDlg, const OUString& rTitle, WinBits nBits );
      52             :         virtual ~PlacesListBox( );
      53             : 
      54             :         void AppendPlace( PlacePtr pPlace );
      55             :         void RemovePlace( sal_uInt16 nPos );
      56             :         void RemoveSelectedPlace();
      57           0 :         sal_Int32 GetNbEditablePlaces() { return mnNbEditables;}
      58             :         bool IsUpdated();
      59           0 :         const std::vector<PlacePtr>& GetPlaces() { return maPlaces;}
      60             : 
      61             :         void SetAddHdl( const Link& rHdl );
      62             :         void SetDelHdl( const Link& rHdl );
      63             :         void SetDelEnabled( bool enabled );
      64             :         void SetSizePixel( const Size& rNewSize ) SAL_OVERRIDE;
      65             :         void updateView( );
      66             : 
      67             :     private:
      68             : 
      69             :         Image getEntryIcon( PlacePtr pPlace );
      70             : 
      71             :         DECL_LINK( Selection, void* );
      72             :         DECL_LINK( DoubleClick, void* );
      73             : };
      74             : 
      75             : #endif
      76             : 
      77             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10