update emoji autocorrect entries from po-files
[LibreOffice.git] / fpicker / source / office / PlacesListBox.hxx
blob3149d7972e392826c3903542aeaa055296c917c5
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 INCLUDED_FPICKER_SOURCE_OFFICE_PLACESLISTBOX_HXX
10 #define INCLUDED_FPICKER_SOURCE_OFFICE_PLACESLISTBOX_HXX
12 #include <iodlg.hxx>
14 #include <svtools/place.hxx>
15 #include <svtools/svtabbx.hxx>
17 #include <memory>
18 #include <vector>
20 typedef std::shared_ptr< Place > PlacePtr;
22 class PlacesListBox;
23 class PlacesListBox_Impl : public SvHeaderTabListBox
25 private:
26 VclPtr<HeaderBar> mpHeaderBar;
27 VclPtr<PlacesListBox> mpParent;
29 public:
30 PlacesListBox_Impl( PlacesListBox* pParent, const OUString& rTitle );
31 virtual ~PlacesListBox_Impl( );
32 virtual void dispose() SAL_OVERRIDE;
34 virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
37 /** ListBox to handle Places.
39 class PlacesListBox : public Control
41 private:
42 std::vector< PlacePtr > maPlaces;
43 VclPtr<SvtFileDialog> mpDlg;
44 VclPtr<PlacesListBox_Impl> mpImpl;
45 VclPtr<PushButton> mpAddBtn;
46 VclPtr<PushButton> mpDelBtn;
47 sal_Int32 mnNbEditables;
48 bool mbUpdated;
49 bool mbSelectionChanged;
51 public:
52 PlacesListBox( vcl::Window* pParent, SvtFileDialog* pFileDlg, const OUString& rTitle, WinBits nBits );
53 virtual ~PlacesListBox( );
54 virtual void dispose() SAL_OVERRIDE;
56 void AppendPlace( PlacePtr pPlace );
57 void RemovePlace( sal_uInt16 nPos );
58 void RemoveSelectedPlace();
59 sal_Int32 GetNbEditablePlaces() { return mnNbEditables;}
60 bool IsUpdated();
61 const std::vector<PlacePtr>& GetPlaces() { return maPlaces;}
63 void SetAddHdl( const Link<>& rHdl );
64 void SetDelHdl( const Link<>& rHdl );
65 void SetDelEnabled( bool enabled );
66 void SetSizePixel( const Size& rNewSize ) SAL_OVERRIDE;
67 void updateView( );
69 VclPtr<PushButton> GetAddButton() const { return mpAddBtn; }
70 VclPtr<PushButton> GetDeleteButton() const { return mpDelBtn; }
71 VclPtr<PlacesListBox_Impl> GetPlacesListBox() const { return mpImpl; }
73 virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
75 private:
77 Image getEntryIcon( PlacePtr pPlace );
79 DECL_LINK( Selection, void* );
80 DECL_LINK( DoubleClick, void* );
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */