diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-12-23 06:03:45 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-12-23 06:03:45 +0000 |
commit | e9a9fe30cf8661aeb48b5392d5e8f5c3f432b809 (patch) | |
tree | 471dca8335157be6136cbb1f3bcbdf8e2a4eadf7 /gtk2_ardour/canvas-program-change.h | |
parent | e6c2f03ca1200381f379da8e84f8068d2901bbaf (diff) |
* added comments to midi_region_view.h
* implemented choosing patches with context menu on the program change flag
* added convenience method and a little refactoring in midi_patch_manager.h
Conflicts:
.cproject
build-tmp.sh
git-svn-id: svn://localhost/ardour2/branches/3.0@4338 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-program-change.h')
-rw-r--r-- | gtk2_ardour/canvas-program-change.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/gtk2_ardour/canvas-program-change.h b/gtk2_ardour/canvas-program-change.h index 2620359036..39c11dc090 100644 --- a/gtk2_ardour/canvas-program-change.h +++ b/gtk2_ardour/canvas-program-change.h @@ -5,6 +5,12 @@ class MidiRegionView; +namespace MIDI { + namespace Name { + struct PatchPrimaryKey; + } +} + namespace Gnome { namespace Canvas { @@ -16,14 +22,25 @@ public: Group& parent, string& text, double height, - double x = 0.0, - double y = 0.0 + double x, + double y, + string& model_name, + string& custom_device_mode, + nframes_t event_time, + uint8_t channel, + uint8_t program ); virtual ~CanvasProgramChange(); virtual bool on_event(GdkEvent* ev); + string model_name() const { return _model_name; } + void set_model_name(string model_name) { _model_name = model_name; } + + string custom_device_mode() const { return _custom_device_mode; } + void set_custom_device_mode(string custom_device_mode) { _custom_device_mode = custom_device_mode; } + nframes_t event_time() const { return _event_time; } void set_event_time(nframes_t new_time) { _event_time = new_time; }; @@ -33,11 +50,17 @@ public: uint8_t channel() const { return _channel; } void set_channel(uint8_t new_channel) { _channel = new_channel; }; + void initialize_popup_menus(); + + void on_patch_menu_selected(const MIDI::Name::PatchPrimaryKey& key); private: - nframes_t _event_time; - uint8_t _program; - uint8_t _channel; + string _model_name; + string _custom_device_mode; + nframes_t _event_time; + uint8_t _channel; + uint8_t _program; + Gtk::Menu _popup; }; } // namespace Canvas |