/*
- 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
class BundleEditorMatrix : public PortMatrix
{
public:
- BundleEditorMatrix (ARDOUR::Session &, boost::shared_ptr<ARDOUR::Bundle>);
-
- void set_state (
- boost::shared_ptr<ARDOUR::Bundle> ab,
- uint32_t ac,
- boost::shared_ptr<ARDOUR::Bundle> bb,
- uint32_t bc,
- bool s,
- uint32_t k
- );
-
- bool get_state (
- boost::shared_ptr<ARDOUR::Bundle> ab,
- uint32_t ac,
- boost::shared_ptr<ARDOUR::Bundle> bb,
- uint32_t bc
- ) const;
-
- void add_channel (boost::shared_ptr<ARDOUR::Bundle>);
- void remove_channel (boost::shared_ptr<ARDOUR::Bundle>, uint32_t);
- bool can_rename_channels () const {
- return true;
- }
- void rename_channel (boost::shared_ptr<ARDOUR::Bundle>, uint32_t);
+ BundleEditorMatrix (Gtk::Window *, ARDOUR::Session *, boost::shared_ptr<ARDOUR::Bundle>);
+
+ 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<ARDOUR::Bundle>) const;
+
+ void add_channel (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::DataType);
+ bool can_remove_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
+ void remove_channel (ARDOUR::BundleChannel);
+ bool can_rename_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
+ void rename_channel (ARDOUR::BundleChannel);
+ void setup_ports (int);
+ bool list_is_global (int) const;
+
+ std::string disassociation_verb () const;
+
+ private:
+ enum {
+ OTHER = 0,
+ OURS = 1
+ };
+
+ boost::shared_ptr<PortGroup> _port_group;
+ boost::shared_ptr<ARDOUR::Bundle> _bundle;
};
class BundleEditor : public ArdourDialog
{
public:
- BundleEditor (ARDOUR::Session &, boost::shared_ptr<ARDOUR::UserBundle>, bool);
+ BundleEditor (ARDOUR::Session *, boost::shared_ptr<ARDOUR::UserBundle>);
protected:
void on_map ();
private:
void name_changed ();
void input_or_output_changed ();
- void type_changed ();
-
+ void on_show ();
+
BundleEditorMatrix _matrix;
boost::shared_ptr<ARDOUR::UserBundle> _bundle;
Gtk::Entry _name;
Gtk::ComboBoxText _input_or_output;
- Gtk::ComboBoxText _type;
};
class BundleManager : public ArdourDialog
{
public:
- BundleManager (ARDOUR::Session &);
+ BundleManager (ARDOUR::Session *);
private:
void edit_clicked ();
void delete_clicked ();
void add_bundle (boost::shared_ptr<ARDOUR::Bundle>);
- void bundle_name_changed (boost::shared_ptr<ARDOUR::UserBundle>);
+ void bundle_changed (ARDOUR::Bundle::Change, boost::shared_ptr<ARDOUR::UserBundle>);
void set_button_sensitivity ();
+ void row_activated (Gtk::TreeModel::Path const & p, Gtk::TreeViewColumn* c);
class ModelColumns : public Gtk::TreeModelColumnRecord
{
add (name);
add (bundle);
}
-
- Gtk::TreeModelColumn<Glib::ustring> name;
+
+ Gtk::TreeModelColumn<std::string> name;
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::UserBundle> > bundle;
};
-
+
Gtk::TreeView _tree_view;
Glib::RefPtr<Gtk::ListStore> _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
private:
void setup ();
-
+
boost::shared_ptr<ARDOUR::Bundle> _bundle;
uint32_t _channel;
Gtk::Entry _name;