From 7ba87f7672caf9a0ae395e895c1ca50543442636 Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Thu, 17 Apr 2008 10:27:03 +0000 Subject: * added All/None/Invert Buttons to MidiMultipleChannelSelector * Added assertion at crash location introduced by latest merge in ProcessorBox::build_processor_menu: git-svn-id: svn://localhost/ardour2/branches/3.0@3260 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_channel_selector.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour/midi_channel_selector.h') diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h index 5060087ea6..5b3e20e859 100644 --- a/gtk2_ardour/midi_channel_selector.h +++ b/gtk2_ardour/midi_channel_selector.h @@ -1,8 +1,10 @@ #ifndef __ardour_ui_midi_channel_selector_h__ #define __ardour_ui_midi_channel_selector_h__ +#include "boost/shared_ptr.hpp" #include "gtkmm/table.h" #include "sigc++/trackable.h" +#include "gtkmm/button.h" #include "gtkmm/togglebutton.h" #include "gtkmm/label.h" #include @@ -10,7 +12,7 @@ class MidiChannelSelector : public Gtk::Table { public: - MidiChannelSelector(); + MidiChannelSelector(int no_rows = 4, int no_columns = 4, int start_row = 0, int start_column = 0); virtual ~MidiChannelSelector() = 0; protected: @@ -38,12 +40,20 @@ protected: class MidiMultipleChannelSelector : public MidiChannelSelector { public: - const std::set& get_selected_channels() const { return _selected_channels; } + MidiMultipleChannelSelector(uint16_t initial_selection = 1); + + const uint16_t get_selected_channels() const { return _selected_channels; } protected: virtual void button_toggled(Gtk::ToggleButton *button, uint8_t button_nr); - std::set _selected_channels; + void select_all(bool on); + void invert_selection(void); + + Gtk::Button _select_all; + Gtk::Button _select_none; + Gtk::Button _invert_selection; + uint16_t _selected_channels; }; #endif /*__ardour_ui_midi_channel_selector_h__*/ -- cgit v1.2.3