X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplaylist_selector.h;h=d0b71a6265e1adc3b0b96bff90e65c6a84e4a8c6;hb=098b0f8a8b904313bc2e9e3147cc3c05fd83f3e6;hp=3988a1d7234bd6e2e54ad9bad1a4245b67981316;hpb=e493b2b7c4fbbbfc457f02babf9546289b430177;p=ardour.git diff --git a/gtk2_ardour/playlist_selector.h b/gtk2_ardour/playlist_selector.h index 3988a1d723..d0b71a6265 100644 --- a/gtk2_ardour/playlist_selector.h +++ b/gtk2_ardour/playlist_selector.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Paul Davis + Copyright (C) 2004 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,11 +20,16 @@ #ifndef __ardour_playlist_selector_h__ #define __ardour_playlist_selector_h__ -#include -#include -#include +#include -#include +#include +#include +#include +#include +#include + +#include "ardour_dialog.h" +#include "ardour/session_handle.h" namespace ARDOUR { class Session; @@ -34,32 +39,44 @@ namespace ARDOUR { class RouteUI; -class PlaylistSelector : public ArdourDialog +class PlaylistSelector : public ArdourDialog { - public: +public: PlaylistSelector (); ~PlaylistSelector (); - void set_session (ARDOUR::Session*); void show_for (RouteUI*); - private: - typedef std::map*> DSPL_Map; +protected: + bool on_unmap_event (GdkEventAny*); + +private: + typedef std::map >*> TrackPlaylistMap; - ARDOUR::Session* session; - Gtk::VBox vpacker; Gtk::ScrolledWindow scroller; - Gtk::CTree tree; - Gtk::Button close_button; - DSPL_Map dspl_map; + TrackPlaylistMap trpl_map; RouteUI* rui; sigc::connection select_connection; - void add_playlist_to_map (ARDOUR::Playlist*); + void add_playlist_to_map (boost::shared_ptr); void clear_map (); void close_button_click (); - void row_selected (Gtk::CTree::Row, int32_t col); + void selection_changed (); + + struct ModelColumns : public Gtk::TreeModel::ColumnRecord + { + ModelColumns () { + add (text); + add (playlist); + } + Gtk::TreeModelColumn text; + Gtk::TreeModelColumn > playlist; + }; + + ModelColumns columns; + Glib::RefPtr model; + Gtk::TreeView tree; }; #endif // __ardour_playlist_selector_h__