2 Copyright (C) 2007 Paul Davis
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "evoral/Note.hpp"
22 #include "canvas/rectangle.h"
24 #include "midi_region_view.h"
25 #include "public_editor.h"
27 using namespace ARDOUR;
28 using namespace ArdourCanvas;
31 MidiRegionView& region,
33 const boost::shared_ptr<NoteType> note,
36 : NoteBase (region, with_events, note)
38 _rectangle = new Rectangle (group);
39 _rectangle->name = "note";
40 set_item (_rectangle);
49 Note::move_event (double dx, double dy)
51 _rectangle->move (Duple (dx, dy));
56 // _text->property_x() = _text->property_x() + dx;
57 // _text->property_y() = _text->property_y() + dy;
65 return _rectangle->x0 ();
71 return _rectangle->x1 ();
77 return _rectangle->y0 ();
83 return _rectangle->y1 ();
87 Note::set_outline_color (uint32_t color)
89 _rectangle->set_outline_color (color);
93 Note::set_fill_color (uint32_t color)
95 _rectangle->set_fill_color (color);
111 Note::set_x0 (Coord x0)
113 _rectangle->set_x0 (x0);
117 Note::set_y0 (Coord y0)
119 _rectangle->set_y0 (y0);
123 Note::set_x1 (Coord x1)
125 _rectangle->set_x1 (x1);
129 Note::set_y1 (Coord y1)
131 _rectangle->set_y1 (y1);
135 Note::set_outline_what (int what)
137 _rectangle->set_outline_what (what);
141 Note::set_ignore_events (bool ignore)
143 _rectangle->set_ignore_events (ignore);