diff options
author | Carl Hetherington <carl@carlh.net> | 2007-10-13 10:38:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2007-10-13 10:38:26 +0000 |
commit | d4a05b52711b4e92be619037f468d5595428eb44 (patch) | |
tree | d7dadfe0292b431050638111e62e65111766a8fa /gtk2_ardour/io_selector.h | |
parent | 465a64520f163ee850c147d1b52c3ef0db8ae764 (diff) |
Check buttons to select visibility of destination groups.
git-svn-id: svn://localhost/ardour2/trunk@2551 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/io_selector.h')
-rw-r--r-- | gtk2_ardour/io_selector.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h index 04779590c1..65ad02df57 100644 --- a/gtk2_ardour/io_selector.h +++ b/gtk2_ardour/io_selector.h @@ -37,12 +37,14 @@ namespace ARDOUR { class PortGroup { public: - PortGroup (std::string const & p) : prefix (p) {} + PortGroup (std::string const & n, std::string const & p) : name (n), prefix (p), visible (true) {} void add (std::string const & p); + std::string name; std::string prefix; ///< prefix (before colon) e.g. "ardour:" std::vector<std::string> ports; ///< port names + bool visible; }; /// A table of checkbuttons to provide the GUI for connecting to a PortGroup @@ -53,6 +55,7 @@ class PortGroupTable Gtk::Widget& get_widget (); std::pair<int, int> unit_size () const; + PortGroup& port_group () { return _port_group; } private: void check_button_toggled (Gtk::CheckButton*, int, std::string const &); @@ -73,7 +76,7 @@ class PortGroupList : public std::list<PortGroup> PortGroupList (ARDOUR::Session &, boost::shared_ptr<ARDOUR::IO>, bool); void refresh (); - int n_ports () const; + int n_visible_ports () const; std::string get_port_by_index (int, bool with_prefix = true) const; private: @@ -91,7 +94,8 @@ class RotatedLabelSet : public Gtk::Widget { void set_angle (int); void set_base_width (int); - + void update_visibility (); + protected: virtual void on_size_request (Gtk::Requisition*); virtual void on_size_allocate (Gtk::Allocation&); @@ -140,6 +144,7 @@ class IOSelector : public Gtk::VBox { bool row_label_button_pressed (GdkEventButton*, int); void add_port (); void remove_port (int); + void group_visible_toggled (Gtk::CheckButton*, std::string const &); PortGroupList _port_group_list; boost::shared_ptr<ARDOUR::IO> _io; |