bump product version to 4.1.6.2
[LibreOffice.git] / fpicker / source / office / PlacesListBox.hxx
blob4f032c45c5b9cb71fcbf67a23135df7820cfd7d3
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/.
8 */
9 #ifndef _PLACESLISTBOX_HXX_
10 #define _PLACESLISTBOX_HXX_
12 #include <iodlg.hxx>
14 #include <boost/shared_ptr.hpp>
15 #include <svtools/place.hxx>
16 #include <svtools/svtabbx.hxx>
18 #include <vector>
20 typedef boost::shared_ptr< Place > PlacePtr;
22 class PlacesListBox;
23 class PlacesListBox_Impl : public SvHeaderTabListBox
25 private:
26 HeaderBar* mpHeaderBar;
27 PlacesListBox* mpParent;
29 public:
30 PlacesListBox_Impl( PlacesListBox* pParent, const OUString& rTitle );
31 ~PlacesListBox_Impl( );
33 virtual void MouseButtonUp( const MouseEvent& rMEvt );
36 /** ListBox to handle Places.
38 class PlacesListBox : public Control
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;
50 public:
51 PlacesListBox( SvtFileDialog* pFileDlg, const OUString& rTitle, const ResId& rResId );
52 ~PlacesListBox( );
54 void AppendPlace( PlacePtr pPlace );
55 void RemovePlace( sal_uInt16 nPos );
56 void RemoveSelectedPlace();
57 sal_Int32 GetNbEditablePlaces();
58 bool IsUpdated();
59 const std::vector<PlacePtr>& GetPlaces();
61 void SetAddHdl( const Link& rHdl );
62 void SetDelHdl( const Link& rHdl );
63 void SetDelEnabled( bool enabled );
64 void SetSizePixel( const Size& rNewSize );
65 void updateView( );
67 private:
69 Image getEntryIcon( PlacePtr pPlace );
71 DECL_LINK( Selection, void* );
72 DECL_LINK( DoubleClick, void* );
75 #endif
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */