X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fbundle_manager.h;h=f553b5cccd60b4b557dbd9ee7800f49cf4d6bf1b;hb=79731a716deae9a90be646695480f06f92c268f5;hp=2be459c610c4ad44a20aee0807ef32dd3cd09cd5;hpb=272cad6241ababb0e2033f27e0511596b3e32b15;p=ardour.git diff --git a/gtk2_ardour/bundle_manager.h b/gtk2_ardour/bundle_manager.h index 2be459c610..f553b5cccd 100644 --- a/gtk2_ardour/bundle_manager.h +++ b/gtk2_ardour/bundle_manager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Paul Davis + Copyright (C) 2007 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,12 +20,14 @@ #ifndef __ardour_ui_bundle_manager_h__ #define __ardour_ui_bundle_manager_h__ -#include -#include #include +#include +#include + +#include "ardour/user_bundle.h" + #include "ardour_dialog.h" #include "port_matrix.h" -#include "i18n.h" namespace ARDOUR { class Session; @@ -34,15 +36,15 @@ namespace ARDOUR { class BundleEditorMatrix : public PortMatrix { - public: - BundleEditorMatrix (Gtk::Window *, ARDOUR::Session &, boost::shared_ptr); +public: + BundleEditorMatrix (Gtk::Window *, ARDOUR::Session *, boost::shared_ptr); void set_state (ARDOUR::BundleChannel c[2], bool s); PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const; - bool can_add_channel (boost::shared_ptr) const; - - void add_channel (boost::shared_ptr); + bool can_add_channels (boost::shared_ptr) const; + + void add_channel (boost::shared_ptr, ARDOUR::DataType); bool can_remove_channels (boost::shared_ptr) const; void remove_channel (ARDOUR::BundleChannel); bool can_rename_channels (boost::shared_ptr) const; @@ -50,46 +52,43 @@ class BundleEditorMatrix : public PortMatrix void setup_ports (int); bool list_is_global (int) const; - std::string disassociation_verb () const { - return _("Disassociate"); - } + std::string disassociation_verb () const; - private: +private: enum { OTHER = 0, OURS = 1 }; - + boost::shared_ptr _port_group; boost::shared_ptr _bundle; }; class BundleEditor : public ArdourDialog { - public: - BundleEditor (ARDOUR::Session &, boost::shared_ptr, bool); +public: + BundleEditor (ARDOUR::Session *, boost::shared_ptr); - protected: +protected: void on_map (); - private: +private: void name_changed (); void input_or_output_changed (); - void type_changed (); - + void on_show (); + BundleEditorMatrix _matrix; boost::shared_ptr _bundle; Gtk::Entry _name; Gtk::ComboBoxText _input_or_output; - Gtk::ComboBoxText _type; }; class BundleManager : public ArdourDialog { - public: - BundleManager (ARDOUR::Session &); +public: + BundleManager (ARDOUR::Session *); - private: +private: void new_clicked (); void edit_clicked (); @@ -97,6 +96,7 @@ class BundleManager : public ArdourDialog void add_bundle (boost::shared_ptr); void bundle_changed (ARDOUR::Bundle::Change, boost::shared_ptr); void set_button_sensitivity (); + void row_activated (Gtk::TreeModel::Path const & p, Gtk::TreeViewColumn* c); class ModelColumns : public Gtk::TreeModelColumnRecord { @@ -105,17 +105,17 @@ class BundleManager : public ArdourDialog add (name); add (bundle); } - - Gtk::TreeModelColumn name; + + Gtk::TreeModelColumn name; Gtk::TreeModelColumn > bundle; }; - + Gtk::TreeView _tree_view; Glib::RefPtr _list_model; ModelColumns _list_model_columns; - ARDOUR::Session& _session; Gtk::Button edit_button; Gtk::Button delete_button; + PBD::ScopedConnectionList bundle_connections; }; class NameChannelDialog : public ArdourDialog @@ -129,9 +129,8 @@ public: private: void setup (); - + boost::shared_ptr _bundle; - uint32_t _channel; Gtk::Entry _name; bool _adding; };