2 * Copyright (C) 2005-2009 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
4 * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __ardour_playlist_selector_h__
22 #define __ardour_playlist_selector_h__
24 #include <boost/shared_ptr.hpp>
26 #include <gtkmm/box.h>
27 #include <gtkmm/scrolledwindow.h>
28 #include <gtkmm/button.h>
29 #include <gtkmm/treeview.h>
30 #include <gtkmm/treestore.h>
32 #include "ardour_dialog.h"
33 #include "ardour/session_handle.h"
43 class PlaylistSelector : public ArdourDialog
49 void show_for (RouteUI*);
52 bool on_unmap_event (GdkEventAny*);
55 typedef std::map<PBD::ID,std::list<boost::shared_ptr<ARDOUR::Playlist> >*> TrackPlaylistMap;
57 Gtk::ScrolledWindow scroller;
58 TrackPlaylistMap trpl_map;
61 sigc::connection select_connection;
63 void add_playlist_to_map (boost::shared_ptr<ARDOUR::Playlist>);
65 void close_button_click ();
66 void selection_changed ();
68 struct ModelColumns : public Gtk::TreeModel::ColumnRecord
74 Gtk::TreeModelColumn<std::string> text;
75 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Playlist> > playlist;
79 Glib::RefPtr<Gtk::TreeStore> model;
83 #endif // __ardour_playlist_selector_h__