X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.h;h=70a0e630b73d9ac53fbc7fe11314837af1120e38;hb=da7d7f950233f109f82f7e7ea5c62f81ef3d7bbb;hp=a909228b06894e0f77af2592a8f3a3014e6a7c4a;hpb=28f8b7d5d6bd99e97b495d68af766d9d980f2021;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index a909228b06..70a0e630b7 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -42,10 +41,12 @@ #include "ardour/plugin.h" #include "ardour/plugin_manager.h" -#include "gtkmm2ext/visibility_tracker.h" #include "gtkmm2ext/dndtreeview.h" +#include #include "gtkmm2ext/treeutils.h" +#include "gtkmm2ext/tabbable.h" + #include "enums.h" #include "mixer_actor.h" @@ -54,10 +55,12 @@ namespace ARDOUR { class RouteGroup; }; +class AxisView; class MixerStrip; class PluginSelector; class MixerGroupTabs; class MonitorSection; +class VCAMasterStrip; class PluginTreeStore : public Gtk::TreeStore { @@ -72,12 +75,15 @@ protected: virtual bool row_drop_possible_vfunc (const Gtk::TreeModel::Path&, const Gtk::SelectionData&) const; }; -class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor, public Gtkmm2ext::VisibilityTracker +class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor { public: static Mixer_UI* instance(); ~Mixer_UI(); + Gtk::Window* use_own_window (bool and_fill_it); + void show_window (); + void set_session (ARDOUR::Session *); void track_editor_selection (); @@ -86,88 +92,93 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void set_strip_width (Width, bool save = false); Width get_strip_width () const { return _strip_width; } - void unselect_strip_in_display (MixerStrip*); - void select_strip_in_display (MixerStrip*); - - XMLNode& get_state (void); - int set_state (const XMLNode& ); + XMLNode& get_state (); + int set_state (const XMLNode&, int /* version */); void show_mixer_list (bool yn); void show_monitor_section (bool); - - 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&); - MonitorSection* monitor_section() const { return _monitor_section; } void deselect_all_strip_processors(); void delete_processors(); - + void select_strip (MixerStrip&, bool add=false); void select_none (); + bool window_not_visible () const; + + void do_vca_assign (boost::shared_ptr); + void do_vca_unassign (boost::shared_ptr); + void show_vca_slaves (boost::shared_ptr); + bool showing_vca_slaves_for (boost::shared_ptr) const; + + sigc::signal1 > show_vca_change; + protected: - void set_route_targets_for_operation (); + void set_axis_targets_for_operation (); private: Mixer_UI (); - static Mixer_UI* _instance; - - 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::ScrolledWindow favorite_plugins_scroller; - Gtk::VBox group_display_vbox; - Gtk::Frame track_display_frame; - Gtk::Frame group_display_frame; - Gtk::Frame favorite_plugins_frame; - Gtk::VPaned rhs_pane1; - Gtk::VPaned rhs_pane2; - Gtk::HBox strip_packer; - Gtk::HBox out_packer; - Gtk::HPaned list_hpane; + static Mixer_UI* _instance; + Gtk::VBox _content; + 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::ScrolledWindow favorite_plugins_scroller; + Gtk::VBox group_display_vbox; + Gtk::Frame track_display_frame; + Gtk::Frame group_display_frame; + Gtk::Frame favorite_plugins_frame; + Gtkmm2ext::VPane rhs_pane1; + Gtkmm2ext::VPane rhs_pane2; + Gtkmm2ext::HPane inner_pane; + Gtk::HBox strip_packer; + Gtk::ScrolledWindow vca_scroller; + Gtk::HBox vca_hpacker; + Gtk::VBox vca_vpacker; + Gtk::EventBox vca_label_bar; + Gtk::Label vca_label; + Gtk::EventBox vca_scroller_base; + Gtk::HBox out_packer; + Gtkmm2ext::HPane list_hpane; MixerGroupTabs* _group_tabs; - // for restoring window geometry. - int m_root_x, m_root_y, m_width, m_height; - - void set_window_pos_and_size (); - void get_window_pos_and_size (); - - bool on_key_press_event (GdkEventKey*); - bool on_key_release_event (GdkEventKey*); bool on_scroll_event (GdkEventScroll*); - void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*); - std::list strips; + void scroller_drag_data_received (const Glib::RefPtr&, int, int, const Gtk::SelectionData&, guint, guint); bool strip_scroller_button_release (GdkEventButton*); + bool masters_scroller_button_release (GdkEventButton*); void scroll_left (); void scroll_right (); void toggle_midi_input_active (bool flip_others); - void add_strips (ARDOUR::RouteList&); + void add_stripables (ARDOUR::StripableList&); + + void add_routes (ARDOUR::RouteList&); void remove_strip (MixerStrip *); - MixerStrip* strip_by_route (boost::shared_ptr); + void add_masters (ARDOUR::VCAList&); + void remove_master (VCAMasterStrip*); + + MixerStrip* strip_by_route (boost::shared_ptr) const; + AxisView* axis_by_stripable (boost::shared_ptr) const; void hide_all_strips (bool with_select); void unselect_all_strips(); @@ -191,6 +202,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void track_name_changed (MixerStrip *); void redisplay_track_list (); + void spill_redisplay (boost::shared_ptr); bool no_track_list_redisplay; bool track_display_button_press (GdkEventButton*); void strip_width_changed (); @@ -255,50 +267,50 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR MonitorSection* _monitor_section; PluginSelector *_plugin_selector; - void strip_property_changed (const PBD::PropertyChange&, MixerStrip *); + void stripable_property_changed (const PBD::PropertyChange& what_changed, boost::weak_ptr ws); void route_group_property_changed (ARDOUR::RouteGroup *, const PBD::PropertyChange &); /* various treeviews */ - struct TrackDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { - TrackDisplayModelColumns () { - add (text); - add (visible); - add (route); - add (strip); - } - Gtk::TreeModelColumn visible; - Gtk::TreeModelColumn text; - Gtk::TreeModelColumn > route; - Gtk::TreeModelColumn strip; + struct StripableDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { + StripableDisplayModelColumns () { + add (text); + add (visible); + add (stripable); + add (strip); + } + Gtk::TreeModelColumn visible; + Gtk::TreeModelColumn text; + Gtk::TreeModelColumn > stripable; + Gtk::TreeModelColumn strip; }; struct GroupDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { - GroupDisplayModelColumns() { - add (visible); - add (text); - add (group); - } - Gtk::TreeModelColumn visible; - Gtk::TreeModelColumn text; - Gtk::TreeModelColumn group; + GroupDisplayModelColumns() { + add (visible); + add (text); + add (group); + } + Gtk::TreeModelColumn visible; + Gtk::TreeModelColumn text; + Gtk::TreeModelColumn group; }; struct PluginsDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { - PluginsDisplayModelColumns() { - add (name); - add (plugin); - } - Gtk::TreeModelColumn name; - Gtk::TreeModelColumn plugin; + PluginsDisplayModelColumns() { + add (name); + add (plugin); + } + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn plugin; }; ARDOUR::PluginInfoList favorite_order; std::map favorite_ui_state; - TrackDisplayModelColumns track_columns; - GroupDisplayModelColumns group_columns; - PluginsDisplayModelColumns favorite_plugins_columns; + StripableDisplayModelColumns stripable_columns; + GroupDisplayModelColumns group_columns; + PluginsDisplayModelColumns favorite_plugins_columns; Gtk::TreeView track_display; Gtk::TreeView group_display; @@ -315,10 +327,8 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR Width _strip_width; - void sync_order_keys_from_treeview (); - void sync_treeview_from_order_keys (); - void reset_remote_control_ids (); - void reset_order_keys (); + void sync_presentation_info_from_treeview (); + void sync_treeview_from_presentation_info (); bool ignore_reorder; @@ -362,8 +372,10 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR // true if mixer list is visible bool _show_mixer_list; -}; -#endif /* __ardour_mixer_ui_h__ */ + mutable boost::weak_ptr spilled_vca; + void escape (); +}; +#endif /* __ardour_mixer_ui_h__ */