X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.h;h=4f1c6823e76ce5cc9400f9ecebd1e1bc8b627197;hb=43f7813b248686bfa89600f91dccd83017dfe669;hp=c8d3bacae00fce801ca0a0febe0f649c78e024a5;hpb=f0748535a5023d132eff03999a705a3e56c516db;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index c8d3bacae0..4f1c6823e7 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*); @@ -77,13 +81,16 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void hide_strip (MixerStrip *); 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; } + protected: + void set_route_targets_for_operation (); + private: + Mixer_UI (); + static Mixer_UI* _instance; + bool _visible; Gtk::HBox global_hpacker; @@ -124,10 +131,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 +146,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,15 +164,16 @@ 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); void initial_track_display (); void show_track_list_menu (); - + void set_all_strips_visibility (bool yn); void set_all_audio_visibility (int tracks, bool yn); + void track_visibility_changed (std::string const & path); + void update_track_visibility (); void hide_all_routes (); void show_all_routes (); @@ -176,7 +182,6 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void show_all_audiotracks(); void hide_all_audiotracks (); - Gtk::Menu* route_group_context_menu; bool in_group_row_change; void group_selected (gint row, gint col, GdkEvent *ev); @@ -184,13 +189,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); @@ -200,8 +205,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR PluginSelector *_plugin_selector; void strip_property_changed (const PBD::PropertyChange&, MixerStrip *); - - void group_flags_changed (void *src, ARDOUR::RouteGroup *); + void route_group_property_changed (ARDOUR::RouteGroup *, const PBD::PropertyChange &); /* various treeviews */ @@ -213,7 +217,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; }; @@ -225,7 +229,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; }; @@ -243,22 +247,38 @@ 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 (ARDOUR::RouteSortOrderKey); + void reset_remote_control_ids (); + void reset_order_keys (ARDOUR::RouteSortOrderKey); + + 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; + + 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 (); }; #endif /* __ardour_mixer_ui_h__ */