From d4a05b52711b4e92be619037f468d5595428eb44 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 13 Oct 2007 10:38:26 +0000 Subject: Check buttons to select visibility of destination groups. git-svn-id: svn://localhost/ardour2/trunk@2551 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/io_selector.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour/io_selector.h') 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 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 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 PortGroupList (ARDOUR::Session &, boost::shared_ptr, 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 _io; -- cgit v1.2.3