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 #ifndef _PLACESLISTBOX_HXX_
10 #define _PLACESLISTBOX_HXX_
14 #include <boost/shared_ptr.hpp>
15 #include <svtools/place.hxx>
16 #include <svtools/svtabbx.hxx>
20 typedef boost::shared_ptr
< Place
> PlacePtr
;
23 class PlacesListBox_Impl
: public SvHeaderTabListBox
26 HeaderBar
* mpHeaderBar
;
27 PlacesListBox
* mpParent
;
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
41 std::vector
< PlacePtr
> maPlaces
;
43 PlacesListBox_Impl
* mpImpl
;
46 sal_Int32 mnNbEditables
;
48 bool mbSelectionChanged
;
51 PlacesListBox( SvtFileDialog
* pFileDlg
, const OUString
& rTitle
, const ResId
& rResId
);
54 void AppendPlace( PlacePtr pPlace
);
55 void RemovePlace( sal_uInt16 nPos
);
56 void RemoveSelectedPlace();
57 sal_Int32
GetNbEditablePlaces();
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
);
69 Image
getEntryIcon( PlacePtr pPlace
);
71 DECL_LINK( Selection
, void* );
72 DECL_LINK( DoubleClick
, void* );
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */