2008-04-29 07:28:24 +00:00
|
|
|
#ifndef CANVASPROGRAMCHANGE_H_
|
|
|
|
|
#define CANVASPROGRAMCHANGE_H_
|
|
|
|
|
|
2008-12-11 08:06:27 +00:00
|
|
|
#include "canvas-flag.h"
|
2008-04-29 07:28:24 +00:00
|
|
|
|
2008-04-29 21:58:05 +00:00
|
|
|
class MidiRegionView;
|
|
|
|
|
|
|
|
|
|
namespace Gnome {
|
|
|
|
|
namespace Canvas {
|
2008-04-29 07:28:24 +00:00
|
|
|
|
2008-12-11 08:06:27 +00:00
|
|
|
class CanvasProgramChange : public CanvasFlag
|
2008-04-29 07:28:24 +00:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CanvasProgramChange(
|
|
|
|
|
MidiRegionView& region,
|
|
|
|
|
Group& parent,
|
2008-12-12 05:17:53 +00:00
|
|
|
string& text,
|
2008-04-29 07:28:24 +00:00
|
|
|
double height,
|
|
|
|
|
double x = 0.0,
|
|
|
|
|
double y = 0.0
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
virtual ~CanvasProgramChange();
|
|
|
|
|
|
2008-12-12 22:04:22 +00:00
|
|
|
virtual bool on_event(GdkEvent* ev);
|
|
|
|
|
|
2008-12-14 22:56:44 +00:00
|
|
|
nframes_t event_time() const { return _event_time; }
|
|
|
|
|
void set_event_time(nframes_t new_time) { _event_time = new_time; };
|
|
|
|
|
|
|
|
|
|
uint8_t program() const { return _program; }
|
|
|
|
|
void set_program(uint8_t new_time) { _program = new_time; };
|
|
|
|
|
|
|
|
|
|
uint8_t channel() const { return _channel; }
|
|
|
|
|
void set_channel(uint8_t new_time) { _channel = new_time; };
|
|
|
|
|
|
|
|
|
|
|
2008-04-29 07:28:24 +00:00
|
|
|
private:
|
2008-12-14 22:56:44 +00:00
|
|
|
void previous_patch();
|
|
|
|
|
void next_patch();
|
|
|
|
|
|
|
|
|
|
nframes_t _event_time;
|
|
|
|
|
uint8_t _program;
|
|
|
|
|
uint8_t _channel;
|
2008-04-29 07:28:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Canvas
|
|
|
|
|
} // namespace Gnome
|
|
|
|
|
|
|
|
|
|
#endif /*CANVASPROGRAMCHANGE_H_*/
|