#include <set>
#include "boost/shared_ptr.hpp"
#include "sigc++/trackable.h"
+
#include "gtkmm/table.h"
#include "gtkmm/button.h"
-#include "gtkmm/togglebutton.h"
#include "gtkmm/label.h"
-#include "ardour/types.h"
+#include "gtkmm2ext/stateful_button.h"
+#include "ardour/types.h"
class MidiChannelSelector : public Gtk::Table
{
MidiChannelSelector(int n_rows = 4, int n_columns = 4, int start_row = 0, int start_column = 0);
virtual ~MidiChannelSelector() = 0;
- sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
sigc::signal<void> clicked;
void set_channel_colors(const uint32_t new_channel_colors[16]);
protected:
virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr) = 0;
Gtk::Label _button_labels[4][4];
- Gtk::ToggleButton _buttons[4][4];
+ Gtkmm2ext::StatefulToggleButton _buttons[4][4];
int _recursion_counter;
bool was_clicked (GdkEventButton*);
};
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);
/**