2 Copyright (C) 2009 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 class EditorRoutes : public EditorComponent
23 EditorRoutes (Editor *);
25 void connect_to_session (ARDOUR::Session *);
27 Gtk::Widget& widget () {
31 void move_selected_tracks (bool);
32 void show_track_in_display (TimeAxisView &);
33 void suspend_redisplay () {
36 void resume_redisplay () {
37 _no_redisplay = false;
41 void update_visibility ();
42 void routes_added (std::list<RouteTimeAxisView*> routes);
43 void hide_track_in_display (TimeAxisView &);
44 std::list<TimeAxisView*> views () const;
45 void hide_all_tracks (bool);
47 void sync_order_keys (std::string const &);
51 void initial_display ();
52 void on_tv_rec_enable_toggled (Glib::ustring const &);
55 void route_deleted (Gtk::TreeModel::Path const &);
56 void changed (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const &);
57 void reordered (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const &, int *);
58 bool button_press (GdkEventButton *);
59 void route_name_changed (boost::weak_ptr<ARDOUR::Route>);
60 void route_removed (TimeAxisView *);
61 void handle_gui_changes (std::string const &, void *);
62 void update_rec_display ();
63 void set_all_tracks_visibility (bool);
64 void set_all_audio_visibility (int, bool);
65 void show_all_routes ();
66 void hide_all_routes ();
67 void show_all_audiotracks ();
68 void hide_all_audiotracks ();
69 void show_all_audiobus ();
70 void hide_all_audiobus ();
71 void display_drag_data_received (
72 Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
74 void track_list_reorder (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const & iter, int* new_order);
75 bool selection_filter (Glib::RefPtr<Gtk::TreeModel> const &, Gtk::TreeModel::Path const &, bool);
77 struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
86 Gtk::TreeModelColumn<Glib::ustring> text;
87 Gtk::TreeModelColumn<bool> visible;
88 Gtk::TreeModelColumn<bool> rec_enabled;
89 Gtk::TreeModelColumn<bool> is_track;
90 Gtk::TreeModelColumn<TimeAxisView*> tv;
91 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
94 Gtk::ScrolledWindow _scroller;
95 Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
96 Glib::RefPtr<Gtk::ListStore> _model;
97 ModelColumns _columns;
100 bool _redisplay_does_not_sync_order_keys;
101 bool _redisplay_does_not_reset_order_keys;