2 Copyright (C) 2000 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.
21 #ifndef __ardour_mixer_ui_h__
22 #define __ardour_mixer_ui_h__
28 #include <ardour/ardour.h>
29 #include <ardour/stateful.h>
30 #include <ardour/io.h>
32 #include "keyboard_target.h"
33 #include "route_redirect_selection.h"
47 class Mixer_UI : public Gtk::Window, public KeyboardTarget
50 Mixer_UI (ARDOUR::AudioEngine&);
53 void connect_to_session (ARDOUR::Session *);
55 PluginSelector& plugin_selector() { return *_plugin_selector; }
57 void set_strip_width (Width);
58 Width get_strip_width () const { return _strip_width; }
60 void unselect_strip_in_display (MixerStrip*);
61 void select_strip_in_display (MixerStrip*);
63 XMLNode& get_state (void);
64 int set_state (const XMLNode& );
68 void ensure_float (Gtk::Window&);
70 RouteRedirectSelection& selection() { return _selection; }
73 ARDOUR::AudioEngine& engine;
74 ARDOUR::Session *session;
76 Gtk::HBox global_hpacker;
77 Gtk::VBox global_vpacker;
78 Gtk::ScrolledWindow scroller;
79 Gtk::EventBox scroller_base;
80 Gtk::HBox scroller_hpacker;
81 Gtk::VBox mixer_scroller_vpacker;
82 Gtk::VBox list_vpacker;
83 Gtk::CList track_display_list;
84 Gtk::CList group_list;
85 Gtk::Label group_list_button_label;
86 Gtk::Button group_list_button;
87 Gtk::ScrolledWindow track_display_scroller;
88 Gtk::ScrolledWindow group_list_scroller;
89 Gtk::VBox group_list_vbox;
90 Gtk::Frame track_display_frame;
91 Gtk::Frame group_list_frame;
92 Gtk::VPaned rhs_pane1;
93 Gtk::VPaned rhs_pane2;
94 Gtk::HBox strip_packer;
96 Gtk::HPaned list_hpane;
98 void pane_allocation_handler (GtkAllocation*, Gtk::Paned*);
100 list<MixerStrip *> strips;
102 gint strip_scroller_button_release (GdkEventButton*);
104 void add_strip (ARDOUR::Route*);
105 void remove_strip (MixerStrip *);
107 void show_strip (MixerStrip *);
108 void hide_strip (MixerStrip *);
110 void hide_all_strips (bool with_select);
111 void unselect_all_strips();
112 void select_all_strips ();
113 void unselect_all_audiotrack_strips ();
114 void select_all_audiotrack_strips ();
115 void unselect_all_audiobus_strips ();
116 void select_all_audiobus_strips ();
118 void follow_strip_selection ();
120 gint start_updating ();
121 gint stop_updating ();
123 void disconnect_from_session ();
125 SigC::Connection screen_update_connection;
126 void update_strips ();
127 SigC::Connection fast_screen_update_connection;
128 void fast_update_strips ();
130 void snapshot_display_selected (gint row, gint col, GdkEvent* ev);
132 void track_display_selected (gint row, gint col, GdkEvent *ev);
133 void track_display_unselected (gint row, gint col, GdkEvent *ev);
134 void queue_track_display_reordered (gint row, gint col);
135 gint track_display_reordered ();
136 void track_name_changed (MixerStrip *);
138 void group_selected (gint row, gint col, GdkEvent *ev);
139 void group_unselected (gint row, gint col, GdkEvent *ev);
140 gint group_list_button_press_event (GdkEventButton *);
141 void group_list_button_clicked();
142 void new_mix_group ();
143 void add_mix_group (ARDOUR::RouteGroup *);
145 Gtk::Menu *track_menu;
146 void track_column_click (gint);
147 void build_track_menu ();
149 PluginSelector *_plugin_selector;
151 void strip_name_changed (void *src, MixerStrip *);
153 static GdkPixmap *check_pixmap;
154 static GdkBitmap *check_mask;
155 static GdkPixmap *empty_pixmap;
156 static GdkBitmap *empty_mask;
158 void group_flags_changed (void *src, ARDOUR::RouteGroup *);
162 Gtk::CList snapshot_display;
163 Gtk::ScrolledWindow snapshot_display_scroller;
165 void redisplay_snapshots();
166 void session_state_saved (string);
168 gint strip_button_release_event (GdkEventButton*, MixerStrip*);
170 RouteRedirectSelection _selection;
174 static const int32_t default_width = -1;
175 static const int32_t default_height = 765;
178 #endif /* __ardour_mixer_ui_h__ */