summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_channel_selector.h
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2008-04-17 10:27:03 +0000
committerHans Baier <hansfbaier@googlemail.com>2008-04-17 10:27:03 +0000
commit7ba87f7672caf9a0ae395e895c1ca50543442636 (patch)
treed377bffbc0f3103cccbdb8232e207ac74aba93c1 /gtk2_ardour/midi_channel_selector.h
parent0c66131fea79acd8d540be8c943865257d49b001 (diff)
* 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
Diffstat (limited to 'gtk2_ardour/midi_channel_selector.h')
-rw-r--r--gtk2_ardour/midi_channel_selector.h16
1 files changed, 13 insertions, 3 deletions
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 <set>
@@ -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<uint8_t>& 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<uint8_t> _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__*/