2 * Copyright (C) 2013-2018 Paul Davis <paul@linuxaudiosystems.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef __gtk_ardour_note_h__
20 #define __gtk_ardour_note_h__
23 #include "note_base.h"
24 #include "midi_util.h"
26 namespace ArdourCanvas {
31 class Note : public NoteBase
34 typedef Evoral::Note<Temporal::Beats> NoteType;
36 Note (MidiRegionView& region,
37 ArdourCanvas::Item* parent,
38 const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>(),
39 bool with_events = true);
43 ArdourCanvas::Coord x0 () const;
44 ArdourCanvas::Coord y0 () const;
45 ArdourCanvas::Coord x1 () const;
46 ArdourCanvas::Coord y1 () const;
48 void set (ArdourCanvas::Rect);
49 void set_x0 (ArdourCanvas::Coord);
50 void set_y0 (ArdourCanvas::Coord);
51 void set_x1 (ArdourCanvas::Coord);
52 void set_y1 (ArdourCanvas::Coord);
54 void set_outline_what (ArdourCanvas::Rectangle::What);
55 void set_outline_all ();
57 void set_outline_color (uint32_t);
58 void set_fill_color (uint32_t);
63 void set_ignore_events (bool);
65 void set_velocity (double);
66 void move_event (double dx, double dy);
69 ArdourCanvas::Note* _note;
72 #endif /* __gtk_ardour_note_h__ */