Ardour  8.7-15-gadf511264b
gtk2_ardour/note.h
Go to the documentation of this file.
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:
35 
36  Note (MidiRegionView& region,
37  ArdourCanvas::Item* parent,
38  const std::shared_ptr<NoteType> note = std::shared_ptr<NoteType>(),
39  bool with_events = true);
40 
41  ~Note ();
42 
47 
53 
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  /* Just changes the visual display of velocity during a drag */
66  void set_velocity (double);
67  double visual_velocity () const;
68  void move_event (double dx, double dy);
69 
70 private:
72 };
73 
74 #endif /* __gtk_ardour_note_h__ */
const std::shared_ptr< NoteType > note() const
Definition: note_base.h:117
void set_outline_what(ArdourCanvas::Rectangle::What)
void set_outline_all()
ArdourCanvas::Coord y0() const
void set(ArdourCanvas::Rect)
void set_y1(ArdourCanvas::Coord)
void set_x0(ArdourCanvas::Coord)
void set_fill_color(uint32_t)
void set_outline_color(uint32_t)
void set_velocity(double)
void set_x1(ArdourCanvas::Coord)
void set_y0(ArdourCanvas::Coord)
void hide()
Note(MidiRegionView &region, ArdourCanvas::Item *parent, const std::shared_ptr< NoteType > note=std::shared_ptr< NoteType >(), bool with_events=true)
ArdourCanvas::Coord y1() const
void show()
ArdourCanvas::Coord x0() const
void move_event(double dx, double dy)
void set_ignore_events(bool)
Evoral::Note< Temporal::Beats > NoteType
ArdourCanvas::Note * _visual_note
double visual_velocity() const
ArdourCanvas::Coord x1() const