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 #ifndef __ardour_gtk_editor_route_h__
21 #define __ardour_gtk_editor_route_h__
23 #include "pbd/signals.h"
24 #include "editor_component.h"
26 class EditorRoutes
: public EditorComponent
, public PBD::ScopedConnectionList
29 EditorRoutes (Editor
*);
31 void set_session (ARDOUR::Session
*);
33 Gtk::Widget
& widget () {
37 void move_selected_tracks (bool);
38 void show_track_in_display (TimeAxisView
&);
40 void suspend_redisplay () {
44 void resume_redisplay () {
45 _no_redisplay
= false;
50 void update_visibility ();
51 void routes_added (std::list
<RouteTimeAxisView
*> routes
);
52 void route_removed (TimeAxisView
*);
53 void hide_track_in_display (TimeAxisView
&);
54 std::list
<TimeAxisView
*> views () const;
55 void hide_all_tracks (bool);
57 void sync_order_keys (std::string
const &);
61 void initial_display ();
62 void on_tv_rec_enable_toggled (Glib::ustring
const &);
63 void on_tv_mute_enable_toggled (Glib::ustring
const &);
64 void on_tv_solo_enable_toggled (Glib::ustring
const &);
65 void on_tv_solo_isolate_toggled (Glib::ustring
const &);
66 void on_tv_solo_safe_toggled (Glib::ustring
const &);
69 void route_deleted (Gtk::TreeModel::Path
const &);
70 void visible_changed (Glib::ustring
const &);
71 void reordered (Gtk::TreeModel::Path
const &, Gtk::TreeModel::iterator
const &, int *);
72 bool button_press (GdkEventButton
*);
73 void route_property_changed (const PBD::PropertyChange
&, boost::weak_ptr
<ARDOUR::Route
>);
74 void handle_gui_changes (std::string
const &, void *);
75 void update_rec_display ();
76 void update_mute_display ();
77 void update_solo_display (bool);
78 void update_solo_isolate_display ();
79 void update_solo_safe_display ();
80 void set_all_tracks_visibility (bool);
81 void set_all_audio_midi_visibility (int, bool);
82 void show_all_routes ();
83 void hide_all_routes ();
84 void show_all_audiotracks ();
85 void hide_all_audiotracks ();
86 void show_all_audiobus ();
87 void hide_all_audiobus ();
88 void show_all_miditracks ();
89 void hide_all_miditracks ();
90 void show_tracks_with_regions_at_playhead ();
92 void display_drag_data_received (
93 Glib::RefPtr
<Gdk::DragContext
> const &, gint
, gint
, Gtk::SelectionData
const &, guint
, guint
96 void track_list_reorder (Gtk::TreeModel::Path
const &, Gtk::TreeModel::iterator
const & iter
, int* new_order
);
97 bool selection_filter (Glib::RefPtr
<Gtk::TreeModel
> const &, Gtk::TreeModel::Path
const &, bool);
98 void name_edit (Glib::ustring
const &, Glib::ustring
const &);
99 void solo_changed_so_update_mute ();
101 struct ModelColumns
: public Gtk::TreeModel::ColumnRecord
{
108 add (solo_isolate_state
);
109 add (solo_safe_state
);
116 Gtk::TreeModelColumn
<Glib::ustring
> text
;
117 Gtk::TreeModelColumn
<bool> visible
;
118 Gtk::TreeModelColumn
<bool> rec_enabled
;
119 Gtk::TreeModelColumn
<uint32_t> mute_state
;
120 Gtk::TreeModelColumn
<uint32_t> solo_state
;
121 Gtk::TreeModelColumn
<uint32_t> solo_isolate_state
;
122 Gtk::TreeModelColumn
<uint32_t> solo_safe_state
;
123 Gtk::TreeModelColumn
<bool> is_track
;
124 Gtk::TreeModelColumn
<TimeAxisView
*> tv
;
125 Gtk::TreeModelColumn
<boost::shared_ptr
<ARDOUR::Route
> > route
;
126 Gtk::TreeModelColumn
<bool> name_editable
;
129 Gtk::ScrolledWindow _scroller
;
130 Gtkmm2ext::DnDTreeView
<boost::shared_ptr
<ARDOUR::Route
> > _display
;
131 Glib::RefPtr
<Gtk::ListStore
> _model
;
132 ModelColumns _columns
;
134 bool _ignore_reorder
;
136 bool _redisplay_does_not_sync_order_keys
;
137 bool _redisplay_does_not_reset_order_keys
;
142 #endif /* __ardour_gtk_editor_route_h__ */