X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fcanvas-program-change.h;h=40939845557b97b6f38bfde56321563af17bee1f;hb=d936bdb3a8e55d26a238376d4b99f56ebeb582b1;hp=18f7d9a9d7c40f3ce390b01ced1e424738133c04;hpb=e009016b03ea5c5c690d7d4939b264313600fd4b;p=ardour.git diff --git a/gtk2_ardour/canvas-program-change.h b/gtk2_ardour/canvas-program-change.h index 18f7d9a9d7..4093984555 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 { @@ -12,17 +18,50 @@ class CanvasProgramChange : public CanvasFlag { public: CanvasProgramChange( - MidiRegionView& region, - Group& parent, - string text, - double height, - double x = 0.0, - double y = 0.0 + MidiRegionView& region, + Group& parent, + const string& text, + double height, + double x, + double y, + string& model_name, + string& custom_device_mode, + double _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; } + + double event_time() const { return _event_time; } + void set_event_time(double new_time) { _event_time = new_time; }; + + uint8_t program() const { return _program; } + void set_program(uint8_t new_program) { _program = new_program; }; + + 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: + string _model_name; + string _custom_device_mode; + double _event_time; + uint8_t _channel; + uint8_t _program; + Gtk::Menu _popup; + bool _popup_initialized; }; } // namespace Canvas