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 &);
34 void suspend_redisplay () {
38 void resume_redisplay () {
39 _no_redisplay = false;
44 void update_visibility ();
45 void routes_added (std::list<RouteTimeAxisView*> routes);
46 void hide_track_in_display (TimeAxisView &);
47 std::list<TimeAxisView*> views () const;
48 void hide_all_tracks (bool);
50 void sync_order_keys (std::string const &);
54 void initial_display ();
55 void on_tv_rec_enable_toggled (Glib::ustring const &);
56 void on_tv_mute_enable_toggled (Glib::ustring const &);
57 void on_tv_solo_enable_toggled (Glib::ustring const &);
60 void route_deleted (Gtk::TreeModel::Path const &);
61 void changed (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const &);
62 void reordered (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const &, int *);
63 bool button_press (GdkEventButton *);
64 void route_name_changed (boost::weak_ptr<ARDOUR::Route>);
65 void route_removed (TimeAxisView *);
66 void handle_gui_changes (std::string const &, void *);
67 void update_rec_display ();
68 void update_mute_display (void* /*src*/);
69 void update_solo_display (void* /*src*/);
70 void set_all_tracks_visibility (bool);
71 void set_all_audio_visibility (int, bool);
72 void show_all_routes ();
73 void hide_all_routes ();
74 void show_all_audiotracks ();
75 void hide_all_audiotracks ();
76 void show_all_audiobus ();
77 void hide_all_audiobus ();
79 void display_drag_data_received (
80 Glib::RefPtr<Gdk::DragContext> const &, gint, gint, Gtk::SelectionData const &, guint, guint
83 void track_list_reorder (Gtk::TreeModel::Path const &, Gtk::TreeModel::iterator const & iter, int* new_order);
84 bool selection_filter (Glib::RefPtr<Gtk::TreeModel> const &, Gtk::TreeModel::Path const &, bool);
85 void name_edit (Glib::ustring const &, Glib::ustring const &);
86 void solo_changed_so_update_mute ();
88 struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
101 Gtk::TreeModelColumn<Glib::ustring> text;
102 Gtk::TreeModelColumn<bool> visible;
103 Gtk::TreeModelColumn<bool> rec_enabled;
104 Gtk::TreeModelColumn<uint32_t> mute_state;
105 Gtk::TreeModelColumn<uint32_t> solo_state;
106 Gtk::TreeModelColumn<bool> is_track;
107 Gtk::TreeModelColumn<TimeAxisView*> tv;
108 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
109 Gtk::TreeModelColumn<bool> name_editable;
112 Gtk::ScrolledWindow _scroller;
113 Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > _display;
114 Glib::RefPtr<Gtk::ListStore> _model;
115 ModelColumns _columns;
117 bool _ignore_reorder;
119 bool _redisplay_does_not_sync_order_keys;
120 bool _redisplay_does_not_reset_order_keys;