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 Gtk::Widget& widget () {
29 void move_selected_tracks (bool);
30 void initial_display ();
31 void show_track_in_display (TimeAxisView &);
32 void suspend_redisplay () {
35 void resume_redisplay () {
36 _no_redisplay = false;
40 void update_visibility ();
41 void routes_added (std::list<RouteTimeAxisView*> routes);
42 void hide_track_in_display (TimeAxisView &);
43 std::list<TimeAxisView*> views () const;
44 void hide_all_tracks (bool);
49 void on_tv_rec_enable_toggled (Glib::ustring const &);
52 void route_deleted (Gtk::TreeModel::Path const &);
53 void changed (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const &);
54 void reordered (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const &, int *);
55 bool button_press (GdkEventButton *);
56 void route_name_changed (boost::weak_ptr<ARDOUR::Route>);
57 void sync_order_keys (char const *);
58 void route_removed (TimeAxisView *);
59 void handle_gui_changes (std::string const &, void *);
60 void update_rec_display ();
61 void set_all_tracks_visibility (bool);
62 void set_all_audio_visibility (int, bool);
63 void show_all_routes ();
64 void hide_all_routes ();
65 void show_all_audiotracks ();
66 void hide_all_audiotracks ();
67 void show_all_audiobus ();
68 void hide_all_audiobus ();
69 void display_drag_data_received (
70 Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
72 void track_list_reorder (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const & iter, int* new_order);
73 bool selection_filter (Glib::RefPtr<Gtk::TreeModel> const &, Gtk::TreeModel::Path const &, bool);
75 struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
84 Gtk::TreeModelColumn<Glib::ustring> text;
85 Gtk::TreeModelColumn<bool> visible;
86 Gtk::TreeModelColumn<bool> rec_enabled;
87 Gtk::TreeModelColumn<bool> is_track;
88 Gtk::TreeModelColumn<TimeAxisView*> tv;
89 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
92 Gtk::ScrolledWindow _scroller;
93 Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
94 Glib::RefPtr<Gtk::ListStore> _model;
95 ModelColumns _columns;
98 bool _redisplay_does_not_sync_order_keys;
99 bool _redisplay_does_not_reset_order_keys;