-protected:
- virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr) = 0;
- Gtk::Label _button_labels[4][4];
- Gtkmm2ext::StatefulToggleButton _buttons[4][4];
- int _recursion_counter;
+ protected:
+ virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr) = 0;
+ Gtk::Label _button_labels[4][4];
+ Gtkmm2ext::StatefulToggleButton _buttons[4][4];
+ int _recursion_counter;
-public:
- MidiMultipleChannelSelector(ARDOUR::ChannelMode mode = ARDOUR::FilterChannels,
- uint16_t initial_selection = 0xFFFF);
-
- virtual ~MidiMultipleChannelSelector();
-
- /** The channel mode or selected channel(s) has changed.
- * First parameter is the new channel mode, second parameter is a bitmask
- * of the currently selected channels.
- */
- sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
-
- void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
- ARDOUR::ChannelMode get_channel_mode () const { return _channel_mode; }
-
- /**
- * @return each bit in the returned word represents a midi channel, eg.
- * bit 0 represents channel 0 and bit 15 represents channel 15
- *
- */
- uint16_t get_selected_channels() const;
- void set_selected_channels(uint16_t selected_channels);
-
-protected:
- ARDOUR::ChannelMode _channel_mode;
- ARDOUR::NoteMode _note_mode;
-
- virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
- void force_channels_button_toggled();
-
- void select_all(bool on);
- void invert_selection(void);
-
- Gtk::Button _select_all;
- Gtk::Button _select_none;
- Gtk::Button _invert_selection;
- Gtk::ToggleButton _force_channel;
+ public:
+ MidiMultipleChannelSelector(ARDOUR::ChannelMode mode = ARDOUR::FilterChannels,
+ uint16_t initial_selection = 0xFFFF);
+
+ virtual ~MidiMultipleChannelSelector();
+
+ /** The channel mode or selected channel(s) has changed.
+ * First parameter is the new channel mode, second parameter is a bitmask
+ * of the currently selected channels.
+ */
+ sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
+
+ void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
+ ARDOUR::ChannelMode get_channel_mode () const { return _channel_mode; }
+
+ /**
+ * @return each bit in the returned word represents a midi channel, eg.
+ * bit 0 represents channel 0 and bit 15 represents channel 15
+ *
+ */
+ uint16_t get_selected_channels() const;
+ void set_selected_channels(uint16_t selected_channels);
+
+ protected:
+ ARDOUR::ChannelMode _channel_mode;
+ ARDOUR::NoteMode _note_mode;
+
+ virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr);
+ void force_channels_button_toggled();
+
+ void select_all(bool on);
+ void invert_selection(void);
+
+ Gtk::Button _select_all;
+ Gtk::Button _select_none;
+ Gtk::Button _invert_selection;
+ Gtk::ToggleButton _force_channel;
- Gtk::ToggleButton* playback_all_button;
- Gtk::ToggleButton* playback_filter_button;
- Gtk::ToggleButton* playback_force_button;
- Gtk::ToggleButton* capture_all_button;
- Gtk::ToggleButton* capture_filter_button;
- Gtk::ToggleButton* capture_force_button;
+ std::vector<Gtk::Widget*> playback_mask_controls;
+ std::vector<Gtk::Widget*> capture_mask_controls;
+
+ Gtk::HBox capture_mask_box;
+ Gtk::HBox playback_mask_box;
+ Gtk::RadioButtonGroup playback_button_group;
+ Gtk::RadioButton playback_all_button;
+ Gtk::RadioButton playback_filter_button;
+ Gtk::RadioButton playback_force_button;
+ Gtk::RadioButtonGroup capture_button_group;
+ Gtk::RadioButton capture_all_button;
+ Gtk::RadioButton capture_filter_button;
+ Gtk::RadioButton capture_force_button;
+
+ ARDOUR::ChannelMode last_drawn_capture_mode;
+ ARDOUR::ChannelMode last_drawn_playback_mode;