ardour
note.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 Paul Davis
3  Author: Dave Robillard
4  Author: Hans Baier
5 
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.
10 
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.
15 
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.
19 */
20 
21 #ifndef __gtk_ardour_note_h__
22 #define __gtk_ardour_note_h__
23 
24 #include <iostream>
25 #include "note_base.h"
26 #include "midi_util.h"
27 
28 namespace ArdourCanvas {
29  class Container;
30 }
31 
32 class Note : public NoteBase
33 {
34 public:
36 
37  Note (MidiRegionView& region,
38  ArdourCanvas::Item* parent,
40  bool with_events = true);
41 
42  ~Note ();
43 
44  ArdourCanvas::Coord x0 () const;
45  ArdourCanvas::Coord y0 () const;
46  ArdourCanvas::Coord x1 () const;
47  ArdourCanvas::Coord y1 () const;
48 
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 move_event (double dx, double dy);
66 
67 private:
68  ArdourCanvas::Rectangle* _rectangle;
69 };
70 
71 #endif /* __gtk_ardour_note_h__ */
void set_y0(ArdourCanvas::Coord)
Definition: note.cc:107
void set_y1(ArdourCanvas::Coord)
Definition: note.cc:119
Definition: note.h:32
void set_outline_all()
Definition: note.cc:131
void move_event(double dx, double dy)
Definition: note.cc:47
void set_outline_what(ArdourCanvas::Rectangle::What)
Definition: note.cc:125
void set_fill_color(uint32_t)
Definition: note.cc:83
~Note()
Definition: note.cc:41
Note(MidiRegionView &region, ArdourCanvas::Item *parent, const boost::shared_ptr< NoteType > note=boost::shared_ptr< NoteType >(), bool with_events=true)
void set_outline_color(uint32_t)
Definition: note.cc:77
ArdourCanvas::Coord y1() const
Definition: note.cc:71
void set_x0(ArdourCanvas::Coord)
Definition: note.cc:101
ArdourCanvas::Rectangle * _rectangle
Definition: note.h:68
const boost::shared_ptr< NoteType > note() const
Definition: note_base.h:103
void hide()
Definition: note.cc:95
void show()
Definition: note.cc:89
ArdourCanvas::Coord x0() const
Definition: note.cc:53
void set_x1(ArdourCanvas::Coord)
Definition: note.cc:113
Evoral::Note< Evoral::Beats > NoteType
Definition: note.h:35
ArdourCanvas::Coord x1() const
Definition: note.cc:59
ArdourCanvas::Coord y0() const
Definition: note.cc:65
void set_ignore_events(bool)
Definition: note.cc:137