X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.h;h=8352ce76a259be9351c60fcfdc003d8e984d5862;hb=bdfddec6fc45b9570d1f3fc03182f4166187c52c;hp=ba72ba2cba7b31cab15ab81c5b94b2349bf26baf;hpb=b68256a8ff670d0f9206858daa69e1bdf7810684;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index ba72ba2cba..8352ce76a2 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -31,20 +31,23 @@ #include #include #include +#include #include "pbd/stateful.h" #include "pbd/signals.h" #include "ardour/ardour.h" +#include "ardour/types.h" #include "ardour/session_handle.h" -#include "route_processor_selection.h" +#include "gtkmm2ext/visibility_tracker.h" + #include "enums.h" +#include "mixer_actor.h" namespace ARDOUR { class Route; class RouteGroup; - class AudioDiskstream; }; class MixerStrip; @@ -52,17 +55,18 @@ class PluginSelector; class MixerGroupTabs; class MonitorSection; -class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr +class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor, public Gtkmm2ext::VisibilityTracker { public: - Mixer_UI (); + static Mixer_UI* instance(); ~Mixer_UI(); void set_session (ARDOUR::Session *); + void track_editor_selection (); PluginSelector* plugin_selector(); - void set_strip_width (Width); + void set_strip_width (Width, bool save = false); Width get_strip_width () const { return _strip_width; } void unselect_strip_in_display (MixerStrip*); @@ -71,19 +75,32 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR XMLNode& get_state (void); int set_state (const XMLNode& ); + void show_mixer_list (bool yn); + void show_window (); bool hide_window (GdkEventAny *ev); void show_strip (MixerStrip *); void hide_strip (MixerStrip *); + void maximise_mixer_space(); + void restore_mixer_space(); + void ensure_float (Gtk::Window&); - void toggle_auto_rebinding (); - void set_auto_rebinding(bool); - RouteRedirectSelection& selection() { return _selection; } MonitorSection* monitor_section() const { return _monitor_section; } + void deselect_all_strip_processors(); + void delete_processors(); + + void select_none (); + + protected: + void set_route_targets_for_operation (); + private: + Mixer_UI (); + static Mixer_UI* _instance; + bool _visible; Gtk::HBox global_hpacker; @@ -124,10 +141,13 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR bool strip_scroller_button_release (GdkEventButton*); void scroll_left (); void scroll_right (); + void toggle_midi_input_active (bool flip_others); - void add_strip (ARDOUR::RouteList&); + void add_strips (ARDOUR::RouteList&); void remove_strip (MixerStrip *); + MixerStrip* strip_by_route (boost::shared_ptr); + void hide_all_strips (bool with_select); void unselect_all_strips(); void select_all_strips (); @@ -136,14 +156,9 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR 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); - void follow_strip_selection (); - gint start_updating (); gint stop_updating (); @@ -159,7 +174,6 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR 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); @@ -167,7 +181,9 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void show_track_list_menu (); void set_all_strips_visibility (bool yn); - void set_all_audio_visibility (int tracks, bool yn); + void set_all_audio_midi_visibility (int, bool); + void track_visibility_changed (std::string const & path); + void update_track_visibility (); void hide_all_routes (); void show_all_routes (); @@ -175,8 +191,9 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void hide_all_audiobus (); void show_all_audiotracks(); void hide_all_audiotracks (); + void show_all_miditracks(); + void hide_all_miditracks (); - Gtk::Menu* route_group_context_menu; bool in_group_row_change; void group_selected (gint row, gint col, GdkEvent *ev); @@ -184,13 +201,13 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void group_display_active_clicked(); 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_name_edit (const std::string&, const std::string&); void route_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter); + void route_group_row_deleted (Gtk::TreeModel::Path const &); Gtk::Menu *track_menu; void track_column_click (gint); @@ -212,7 +229,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR add (strip); } Gtk::TreeModelColumn visible; - Gtk::TreeModelColumn text; + Gtk::TreeModelColumn text; Gtk::TreeModelColumn > route; Gtk::TreeModelColumn strip; }; @@ -224,7 +241,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR add (group); } Gtk::TreeModelColumn visible; - Gtk::TreeModelColumn text; + Gtk::TreeModelColumn text; Gtk::TreeModelColumn group; }; @@ -242,22 +259,45 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR bool strip_button_release_event (GdkEventButton*, MixerStrip*); - RouteRedirectSelection _selection; - 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 sync_order_keys_from_treeview (); + void sync_treeview_from_order_keys (); + void reset_remote_control_ids (); + void reset_order_keys (); + + bool ignore_reorder; void parameter_changed (std::string const &); void set_route_group_activation (ARDOUR::RouteGroup *, bool); + void setup_track_display (); + void new_track_or_bus (); + static const int32_t default_width = 478; static const int32_t default_height = 765; + /** true if we are rebuilding the route group list, or clearing + it during a session teardown. + */ + bool _in_group_rebuild_or_clear; + bool _route_deletion_in_progress; + + void update_title (); + MixerStrip* strip_by_x (int x); + friend class MixerGroupTabs; + + void follow_editor_selection (); + bool _following_editor_selection; + + void monitor_section_going_away (); + + /// true if we are in fullscreen mode + bool _maximised; + + // true if mixer list is visible + bool _show_mixer_list; }; #endif /* __ardour_mixer_ui_h__ */