diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-04-14 06:23:11 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-04-14 06:23:11 +0000 |
commit | 8b3d298f6b16fbe819a9b9911e018c811b4914e3 (patch) | |
tree | 0070828d11b1dc2c5df0f896d5197fdd9137a0a3 /gtk2_ardour/midi_channel_selector.h | |
parent | 2656e0a43bb34aaa615f9cfd6f7ecb3ac4b03262 (diff) |
* first working version of editing MIDI channels of individual notes, see: http://www.flickr.com/photos/24012642@N02/2412142661/
git-svn-id: svn://localhost/ardour2/branches/3.0@3252 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_channel_selector.h')
-rw-r--r-- | gtk2_ardour/midi_channel_selector.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h new file mode 100644 index 0000000000..5060087ea6 --- /dev/null +++ b/gtk2_ardour/midi_channel_selector.h @@ -0,0 +1,49 @@ +#ifndef __ardour_ui_midi_channel_selector_h__ +#define __ardour_ui_midi_channel_selector_h__ + +#include "gtkmm/table.h" +#include "sigc++/trackable.h" +#include "gtkmm/togglebutton.h" +#include "gtkmm/label.h" +#include <set> + +class MidiChannelSelector : public Gtk::Table +{ +public: + MidiChannelSelector(); + virtual ~MidiChannelSelector() = 0; + +protected: + virtual void button_toggled(Gtk::ToggleButton *button, uint8_t button_nr) = 0; + Gtk::Label _button_labels[4][4]; + Gtk::ToggleButton _buttons[4][4]; +}; + +class SingleMidiChannelSelector : public MidiChannelSelector +{ +public: + SingleMidiChannelSelector(uint8_t active_channel = 0); + + const uint8_t get_active_channel() const { return _active_channel; } + + sigc::signal<void, uint8_t> channel_selected; + +protected: + virtual void button_toggled(Gtk::ToggleButton *button, uint8_t button_nr); + + Gtk::ToggleButton *_active_button; + uint8_t _active_channel; +}; + +class MidiMultipleChannelSelector : public MidiChannelSelector +{ +public: + const std::set<uint8_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; +}; + +#endif /*__ardour_ui_midi_channel_selector_h__*/ |