summaryrefslogtreecommitdiff
path: root/gtk2_ardour/canvas-note-event.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-02 02:36:05 +0000
committerDavid Robillard <d@drobilla.net>2009-02-02 02:36:05 +0000
commit166ef64e3db4ab72b7b1e7455234e2b9ceddf6d8 (patch)
tree0f28067a301556c5c0a67091c691c82960db57c1 /gtk2_ardour/canvas-note-event.h
parentead5dd45689be089d79a4a5daad88da737ca4cd9 (diff)
Make (MIDI) event time stamp type a template parameter.
git-svn-id: svn://localhost/ardour2/branches/3.0@4473 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-note-event.h')
-rw-r--r--gtk2_ardour/canvas-note-event.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h
index ee22e00dac..1f22a5b797 100644
--- a/gtk2_ardour/canvas-note-event.h
+++ b/gtk2_ardour/canvas-note-event.h
@@ -32,7 +32,7 @@
class Editor;
class MidiRegionView;
-namespace Evoral { class Note; }
+namespace Evoral { template<typename T> class Note; }
namespace Gnome {
namespace Canvas {
@@ -51,10 +51,11 @@ namespace Canvas {
*/
class CanvasNoteEvent : public sigc::trackable, public InteractiveItem {
public:
+ typedef Evoral::Note<double> NoteType;
CanvasNoteEvent(
- MidiRegionView& region,
- Item* item,
- const boost::shared_ptr<Evoral::Note> note = boost::shared_ptr<Evoral::Note>());
+ MidiRegionView& region,
+ Item* item,
+ const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>());
virtual ~CanvasNoteEvent();
@@ -87,7 +88,7 @@ public:
virtual double x2() = 0;
virtual double y2() = 0;
- const boost::shared_ptr<Evoral::Note> note() const { return _note; }
+ const boost::shared_ptr<NoteType> note() const { return _note; }
inline static uint32_t meter_style_fill_color(uint8_t vel)
{
@@ -116,14 +117,14 @@ public:
protected:
enum State { None, Pressed, Dragging };
- MidiRegionView& _region;
- Item* const _item;
- InteractiveText* _text;
- Widget* _channel_selector_widget;
- State _state;
- const boost::shared_ptr<Evoral::Note> _note;
- bool _own_note;
- bool _selected;
+ MidiRegionView& _region;
+ Item* const _item;
+ InteractiveText* _text;
+ Widget* _channel_selector_widget;
+ State _state;
+ const boost::shared_ptr<NoteType> _note;
+ bool _own_note;
+ bool _selected;
};
} // namespace Gnome