X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.h;h=41609e8de218c7bab84905d3ae203fa0b885cc8c;hb=9d9905f443f797efaabb7b8b36217b71e57c6c06;hp=35320b3a48483ed720917ce0a830d94044afcefd;hpb=c33d0ad760e311c37cfcb99e48948cc92472ad55;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index 35320b3a48..41609e8de2 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #ifndef __ardour_mixer_ui_h__ @@ -33,29 +32,28 @@ #include #include -#include -#include -#include +#include "pbd/stateful.h" -#include "keyboard_target.h" -#include "route_redirect_selection.h" +#include "ardour/ardour.h" + +#include "route_processor_selection.h" #include "enums.h" namespace ARDOUR { class Route; class RouteGroup; class Session; - class DiskStream; - class AudioEngine; + class AudioDiskstream; }; class MixerStrip; class PluginSelector; +class MixerGroupTabs; class Mixer_UI : public Gtk::Window { public: - Mixer_UI (ARDOUR::AudioEngine&); + Mixer_UI (); ~Mixer_UI(); void connect_to_session (ARDOUR::Session *); @@ -72,45 +70,58 @@ class Mixer_UI : public Gtk::Window int set_state (const XMLNode& ); void show_window (); + bool hide_window (GdkEventAny *ev); void show_strip (MixerStrip *); void hide_strip (MixerStrip *); void ensure_float (Gtk::Window&); + void toggle_auto_rebinding (); + void set_auto_rebinding(bool); RouteRedirectSelection& selection() { return _selection; } - + private: - ARDOUR::AudioEngine& engine; ARDOUR::Session *session; + + bool _visible; + + Gtk::HBox global_hpacker; + Gtk::VBox global_vpacker; + Gtk::ScrolledWindow scroller; + Gtk::EventBox scroller_base; + Gtk::HBox scroller_hpacker; + Gtk::VBox mixer_scroller_vpacker; + Gtk::VBox list_vpacker; + Gtk::Label group_display_button_label; + Gtk::Button group_display_button; + Gtk::ScrolledWindow track_display_scroller; + Gtk::ScrolledWindow group_display_scroller; + Gtk::VBox group_display_vbox; + Gtk::Frame track_display_frame; + Gtk::Frame group_display_frame; + Gtk::VPaned rhs_pane1; + Gtk::HBox strip_packer; + Gtk::HBox out_packer; + Gtk::HPaned list_hpane; + + MixerGroupTabs* _group_tabs; + + // for restoring window geometry. + int m_root_x, m_root_y, m_width, m_height; - Gtk::HBox global_hpacker; - Gtk::VBox global_vpacker; - Gtk::ScrolledWindow scroller; - Gtk::EventBox scroller_base; - Gtk::HBox scroller_hpacker; - Gtk::VBox mixer_scroller_vpacker; - Gtk::VBox list_vpacker; - Gtk::Label group_display_button_label; - Gtk::Button group_display_button; - Gtk::ScrolledWindow track_display_scroller; - Gtk::ScrolledWindow group_display_scroller; - Gtk::VBox group_display_vbox; - Gtk::Frame track_display_frame; - Gtk::Frame group_display_frame; - Gtk::VPaned rhs_pane1; - Gtk::HBox strip_packer; - Gtk::HBox out_packer; - Gtk::HPaned list_hpane; + void set_window_pos_and_size (); + void get_window_pos_and_size (); bool on_key_press_event (GdkEventKey*); + bool on_key_release_event (GdkEventKey*); void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*); - list strips; + std::list strips; bool strip_scroller_button_release (GdkEventButton*); - void add_strip (ARDOUR::Route*); + void add_strip (ARDOUR::RouteList&); void remove_strip (MixerStrip *); void hide_all_strips (bool with_select); @@ -121,6 +132,9 @@ class Mixer_UI : public Gtk::Window void unselect_all_audiobus_strips (); void select_all_audiobus_strips (); + void auto_rebind_midi_controls (); + bool auto_rebinding; + void strip_select_op (bool audiotrack, bool select); void select_strip_op (MixerStrip*, bool select); @@ -139,9 +153,11 @@ class Mixer_UI : public Gtk::Window void redisplay_track_list (); bool no_track_list_redisplay; bool track_display_button_press (GdkEventButton*); + void strip_width_changed (); void track_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&); void track_list_delete (const Gtk::TreeModel::Path&); + void track_list_reorder (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* new_order); void initial_track_display (); void show_track_list_menu (); @@ -156,21 +172,21 @@ class Mixer_UI : public Gtk::Window void show_all_audiotracks(); void hide_all_audiotracks (); - Gtk::Menu* mix_group_context_menu; + Gtk::Menu* route_group_context_menu; bool in_group_row_change; void group_selected (gint row, gint col, GdkEvent *ev); void group_unselected (gint row, gint col, GdkEvent *ev); void group_display_active_clicked(); - void new_mix_group (); - void remove_selected_mix_group (); - void build_mix_group_context_menu (); - void activate_all_mix_groups (); - void disable_all_mix_groups (); - void add_mix_group (ARDOUR::RouteGroup *); - void mix_groups_changed (); - void mix_group_name_edit (const Glib::ustring&, const Glib::ustring&); - void mix_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter); + void new_route_group (); + void remove_selected_route_group (); + void build_route_group_context_menu (); + void activate_all_route_groups (); + void disable_all_route_groups (); + void add_route_group (ARDOUR::RouteGroup *); + void route_groups_changed (); + void route_group_name_edit (const Glib::ustring&, const Glib::ustring&); + void route_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter); Gtk::Menu *track_menu; void track_column_click (gint); @@ -178,7 +194,7 @@ class Mixer_UI : public Gtk::Window PluginSelector *_plugin_selector; - void strip_name_changed (void *src, MixerStrip *); + void strip_name_changed (MixerStrip *); void group_flags_changed (void *src, ARDOUR::RouteGroup *); @@ -193,21 +209,19 @@ class Mixer_UI : public Gtk::Window } Gtk::TreeModelColumn visible; Gtk::TreeModelColumn text; - Gtk::TreeModelColumn route; + Gtk::TreeModelColumn > route; Gtk::TreeModelColumn strip; }; struct GroupDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { GroupDisplayModelColumns() { - add (active); add (visible); add (text); add (group); } - Gtk::TreeModelColumn active; - Gtk::TreeModelColumn visible; - Gtk::TreeModelColumn text; - Gtk::TreeModelColumn group; + Gtk::TreeModelColumn visible; + Gtk::TreeModelColumn text; + Gtk::TreeModelColumn group; }; TrackDisplayModelColumns track_columns; @@ -228,8 +242,18 @@ class Mixer_UI : public Gtk::Window Width _strip_width; + void sync_order_keys (std::string const &); + bool strip_redisplay_does_not_reset_order_keys; + bool strip_redisplay_does_not_sync_order_keys; + bool ignore_sync; + + void parameter_changed (std::string const &); + void set_route_group_activation (ARDOUR::RouteGroup *, bool); + static const int32_t default_width = 478; static const int32_t default_height = 765; + + friend class MixerGroupTabs; }; #endif /* __ardour_mixer_ui_h__ */