Preferences/Config changes for image-surface settings
[ardour.git] / gtk2_ardour / note.h
1 /*
2  * Copyright (C) 2013-2018 Paul Davis <paul@linuxaudiosystems.com>
3  *
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.
8  *
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.
13  *
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.
17  */
18
19 #ifndef __gtk_ardour_note_h__
20 #define __gtk_ardour_note_h__
21
22 #include <iostream>
23 #include "note_base.h"
24 #include "midi_util.h"
25
26 namespace ArdourCanvas {
27         class Container;
28         class Note;
29 }
30
31 class Note : public NoteBase
32 {
33 public:
34         typedef Evoral::Note<Temporal::Beats> NoteType;
35
36         Note (MidiRegionView&                   region,
37               ArdourCanvas::Item*               parent,
38               const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>(),
39               bool with_events = true);
40
41         ~Note ();
42
43         ArdourCanvas::Coord x0 () const;
44         ArdourCanvas::Coord y0 () const;
45         ArdourCanvas::Coord x1 () const;
46         ArdourCanvas::Coord y1 () const;
47
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);
53
54         void set_outline_what (ArdourCanvas::Rectangle::What);
55         void set_outline_all ();
56
57         void set_outline_color (uint32_t);
58         void set_fill_color (uint32_t);
59
60         void show ();
61         void hide ();
62
63         void set_ignore_events (bool);
64
65         void set_velocity (double);
66         void move_event (double dx, double dy);
67
68 private:
69         ArdourCanvas::Note* _note;
70 };
71
72 #endif /* __gtk_ardour_note_h__ */