1 #ifndef CANVASPROGRAMCHANGE_H_
2 #define CANVASPROGRAMCHANGE_H_
4 #include "canvas-flag.h"
10 struct PatchPrimaryKey;
17 class CanvasProgramChange : public CanvasFlag
21 MidiRegionView& region,
28 string& custom_device_mode,
34 virtual ~CanvasProgramChange();
36 virtual bool on_event(GdkEvent* ev);
38 string model_name() const { return _model_name; }
39 void set_model_name(string model_name) { _model_name = model_name; }
41 string custom_device_mode() const { return _custom_device_mode; }
42 void set_custom_device_mode(string custom_device_mode) { _custom_device_mode = custom_device_mode; }
44 nframes_t event_time() const { return _event_time; }
45 void set_event_time(nframes_t new_time) { _event_time = new_time; };
47 uint8_t program() const { return _program; }
48 void set_program(uint8_t new_program) { _program = new_program; };
50 uint8_t channel() const { return _channel; }
51 void set_channel(uint8_t new_channel) { _channel = new_channel; };
53 void initialize_popup_menus();
55 void on_patch_menu_selected(const MIDI::Name::PatchPrimaryKey& key);
59 string _custom_device_mode;
60 nframes_t _event_time;
64 bool _popup_initialized;
70 #endif /*CANVASPROGRAMCHANGE_H_*/